Upgrading from MySQL 5.1 to MySQL 5.5 / 5.6


Upgrading from MySQL 5.1 to MySQL 5.5 / 5.6 when there is existing data is quite head-cache and scary story. Some notes might also help you when do upgrading:

  • After upgrading, we need to run mysql_upgrade. In order to do that, we must have the mysql service running[bash]mysqld –skip-grant-tables –user=mysql
    mysql_upgrade -u root -p’PASSWORD'[/bash]
  • If mysql cannot be accessed using old password, reset it
  • When upgrading a slave server, be sure to remove all configuration starting with master- from the my.cnf file, since 5.5 and 5.6 do not accept these information to be configured on my.cnf. Instead, we must stop slave, and do update master information within mysql command line.

Troubleshooting

n. If faced “ERROR! MySQL (Percona Server) PID file could not be found!” when stopping db server:

[bash][root@search ~]# ps -auxfw | grep mysql
Warning: bad syntax, perhaps a bogus ‘-‘? See /usr/share/doc/procps-3.2.8/FAQ
mysql 12117 0.8 1.8 1236928 592744 pts/0 Sl+ 06:33 0:02 | \_ mysqld –skip-grant-tables –user=mysql
root 12355 0.0 0.0 103240 816 pts/1 S+ 06:38 0:00 \_ grep mysql
[root@search ~]# echo 12117 > /data/var/lib/mysql/search.younetco.com.pid
[root@search ~]# service mysql stop
[/bash]


About NhocConan

A super lazy guy who tries to write tech blog entries in English.He is lazy, so he can only write when he is in a good mood or when he is tired of coding.

Leave a comment

Your email address will not be published. Required fields are marked *