This article is also available as a TechRepublic download, which includes the code listings in a more manageable text file format.
Category Archives: MySQL
10 Tips for Optimizing MySQL Queries
Justin Silverton at Jaslabs has a supposed list of 10 tips for optimizing MySQL queries. I couldn’t read this and let it stand because this list is really, really bad. Some guy named Mike noted this, too. So in this entry I’ll do two things: first, I’ll explain why his list is bad; second, I’ll …
How to Find & Replace Data in MySQL
To find a string in a certain field and replace it with another string:
Mysql max_connections
On accessing the Plesk control panel you may receive the “PleskFatalException Unable to connect to database: Too many connections” error message and this is caused when the mysql connections on the server are exceeded than the specified value.
Show the last queries executed on MySQL
1) Execute SET GLOBAL log_output = ‘TABLE’; 2) Execute SET GLOBAL general_log = ‘ON’; 3) Take a look at the table mysql.general_log
MySQL append string
Use a combination of CONCAT and IFNULL (to handle the NULL case):