Educational ICT Virtualisation Specialist

Twitter LinkedIn E-mail
Precedence Technologies Ltd
Technology House, 36a Union Lane
Cambridge, CB4 1QB, United Kingdom
T: +44 (0)8456 446 800 / +44 (0)1223 359900
E: enquiries@precedence.co.uk
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

  1. Dump SQL:
    backup 1# mkdir /usr/mysqlbackup
    backup 2# mysqladd -o /usr/mysqlbackup
    
  2. Stop MySQL server:
    backup 3# /etc/rc.d/mysqld stop
    Stopping mysqld.
    Waiting for PIDS: 224.
    
  3. Backup raw databases and dump SQL:
    backup 4# cp -pR /usr/mysql /usr/mysqlbackup/mysql
    
  4. Check and repair database files:
    backup 5# myisamchk -r /usr/mysql/*/*.MYI
    
  5. Start MySQL server:
    backup 6# /etc/rc.d/mysqld start
    Starting mysqld.
    
  6. Update structure:
    backup 7# mysqlaction upgrade
    [snip]
    Running 'mysql_fix_privilege_tables'...
    OK
    
  7. 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
  8. Run pre-upgrade check again:
    backup 8# updatecheck
    
  9. Update server:
    backup 9# updateserver
    
  10. Reboot:
    backup 10# shutdown -r now
    
  11. Log in as root and check MySQL server is running:
    backup 1# /etc/rc.d/mysqld status
    mysqld is running as pid 14871.
    
  12. Check databases are present:
    backup 2# mysqladd -l
    intranet
    jabberd
    
  13. Delete backups:
    backup 3# rm -r /usr/mysqlbackup
    
© Copyright Precedence Technologies 1999-2024
Page last modified on December 20, 2013, at 11:23 AM by sborrill