Tag Archives: mysql

WordPress and OSX Lion local install sluggish performance fix

A mirror of a wordpress installlation on my Macbook ran very sluggish. I was using OSX Lion. The fix was to optimise all the MySQL database tables for the installation! Simple!

Posted in Web Development | Also tagged , | Leave a comment

Convert PHP unix timestamp to a MySQL date format

In PHP: $mysqldate = date( ‘Y-m-d H:i:s’, $unixdate ); $unixdate = strtotime( $mysqldate ); In the MySQL query: $query = "UPDATE table SET datetimefield = FROM_UNIXTIME($phpdate) WHERE…"; $query = "SELECT UNIX_TIMESTAMP(datetimefield) FROM table WHERE…";

Posted in PHP | Also tagged | Leave a comment

Symfony database configuration

Run this symfony task to configure you database. php symfony configure:database "mysql:host=localhost;dbname=dbname" root mYsEcret

Posted in Symfony | Also tagged | Leave a comment

Create a new MySQL database with mysqladmin

Quickly create a new MySQL database. mysqladmin -uroot -p create dbname

Posted in General | Tagged | Leave a comment