Update-MySQL
Jump To: Support > KB > NetManager > Update > MySQL
Upgrading MySQL databases
Here is the procedure for reference. The instructions will be somewhat terse. You should watch out for errors at every step and go no further if you see anything untoward
- Dump SQL:
backup 1# mkdir /usr/mysqlbackup backup 2# mysqladd -o /usr/mysqlbackup
- Stop MySQL server:
backup 3# /etc/rc.d/mysqld stop Stopping mysqld. Waiting for PIDS: 224.
- Backup raw databases and dump SQL:
backup 4# cp -pR /usr/mysql /usr/mysqlbackup/mysql
- Check and repair database files:
backup 5# myisamchk -r /usr/mysql/*/*.MYI
- Start MySQL server:
backup 6# /etc/rc.d/mysqld start Starting mysqld.
- Update structure:
backup 7# mysqlaction upgrade [snip] Running 'mysql_fix_privilege_tables'... OK
- If above step gives a command not found error, ensure you have already tried to run updateserver (to update the tools) and type rehash before trying again
- Run pre-upgrade check again:
backup 8# updatecheck
- Update server:
backup 9# updateserver
- Reboot:
backup 10# shutdown -r now
- Log in as root and check MySQL server is running:
backup 1# /etc/rc.d/mysqld status mysqld is running as pid 14871.
- Check databases are present:
backup 2# mysqladd -l intranet jabberd
- Delete backups:
backup 3# rm -r /usr/mysqlbackup