One of the difficulties with a large and active MySQL database is
making clean backups without having to bring the server down.
Otherwise, a backup may slow down the system and there may be
inconsistency with data, since related tables may be changed while
another is being backed up. Taking the server down will ensure
consistency of data, but it means interruption of service to users.
Sometimes this is necessary and unavoidable, but daily server outages
for backing up data may be unacceptable. A simple alternative method
to ensure reliable backups without having to shut down the server daily
is to set up replication for MySQL
substring_index is very handy.
Assume you have a name field that contains ‘Firstname Lastname’ and you want to order a SELECT statement by last name.
The simple answer is
ORDER BY substring_index(namefield, ‘ ‘, -1)
which will take the last part of the string back to the first space. A -2 in this case would get the whole string.
Compare and contrast RMU/SHOW USERS and STOP/ID=nnn
rmu/show users uis
mysql> show processlist;
mysql> kill n (where n is the processid from “show processlist”)
It’s not a bug – it’s a gotcha. A “gotcha” is a feature or function which works as advertised – but not as expected.
Companies to collaborate on open source offering [InfoWorld: Top News]