I am using on one project InnoDB type of tables. There is very important have actual data. So I am actively using foreign keys for tables linking. And once I came across problem when tried to delete from table (`group`) which linked by foreign key with another table (`subgroup`) which linked by foreign key with [...]
Posted on November 14th, 2011 by admin
Filed under: Development | Comments Off
Just a few notes about mysqldump. Create dump of mysql base: # mysqldump -uDBUSER -pPASSWORD DBNAME > filename.sql or # mysqldump –user=username –password=password DBNAME > filename.sql if you need to make dump of a few databases you can use parametr -B (or –databases): mysqldump -uDBUSER -pPASSWORD -B DBNAME1 DBNAME2 > filename.sql Make dump of the [...]
Posted on July 5th, 2011 by admin
Filed under: Development, Software, Tips | Comments Off
If you want to activate logging of mysql queries, add in your my.cnf (by default it is /var/db/mysql/my.cnf) in [mysqld] section: log=/var/log/mysql.log create log file: #touch /var/log/mysql.log #chmod 666 /var/log/mysql.log and restart mysql-server: #/usr/local/etc/rc.d/mysql-server restart (it can be different on you server) That is all. PS: I don’t recommend you use it on hight loaded [...]
Posted on March 10th, 2011 by admin
Filed under: Tips | Comments Off