From The Blog

MySQL: Get locked tables

29 May 2014, in

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 In_use > 0



Post a Comment

Find and Replace Text in MySQL Database using UPDATE statement

3 June 2013, in

update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, 'find this string', 'replace found string with this string');



Post a Comment

CakePHP and MySQL tinyint datatype

21 September 2012, in

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



Post a Comment

install mysql server 5 on ubuntu

20 June 2012, in

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>



Post a Comment