Friday, July 25, 2008

skip FK check in MySql

run this before the query of concern.

SET foreign_key_checks=false;

Note this only works within the same connection.

Thursday, July 17, 2008

use mysql in PHP script

edit /etc/php.ini,
if not exists, copy /etc/php.ini.default to /etc/php.ini

add this mysql.default_socket = /tmp/mysql.sock