To get locked table you can use: show open tables WHERE In_use > 0 To get locked table in database (for ex.: database name: test_db) show open tables FROM test_db WHERE In_use > 0 To check whether or not a table is locked show open tables FROM test_db WHERE Table LIKE 'tb_employees' AND … Continue reading MySQL: Get locked tables
Tag: mysql
update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, 'find this string', 'replace found string with this string');
I observed that CakePHP treats tinyint fields as boolean (true/false) , but after investigation found that: if you set the data type for a field to tinyint with length of 1, then CakePHP will treat it as boolean. So I changed it to tinyint(2), That's weird about CakePHP
Open a terminal window, and use the following command: sudo apt-get install mysql-server If you are running PHP you will also need to install the php module for mysql 5: sudo apt-get install php5-mysql To create a new database, use the mysqladmin command: mysqladmin create <databasename>