debian-sys-maint default user for MySQL restart
cat /etc/mysql/debian.cnf
DO NOT CHANGE THE PASSWORD
| restart mysql | restart |
| /etc/network/interfaces | static IP |
| /etc/init.d/networking restart |
OPTIMIZE TABLE foo
mysqlcheck -op -u root bacula
mysqlcheck -op -u root --all-databases
Get the newest record based on a timestamp field.
SELECT trackid FROM `table` WHERE updated=(SELECT max(updated) FROM `table` WHERE userid=8 )
SELECT trackid FROM `table` WHERE userid=8 ORDER BY updated DESC LIMIT 1