Solved Upgrading mysql from 5.5 to 5.6

After a slightly botched upgrade of FreeBSD from 9.3 to 10.3 I've got a bit panicky about upgrading mysql from 5.5.54 to 5.6

Can anyone help me in this regard as I can't find anything on it to reference. I've backed up the database and saved the my.cnf file so far.
 
Make sure the backups are good.

This worked for me:
  1. Stop MySQL: service mysql-server stop
  2. Add to /etc/rc.conf:
    Code:
    mysql_args="--explicit_defaults_for_timestamp=true --skip-grant-tables --skip-slave-start --thread_stack=256K"
    These are needed, it prevents the slave process from starting, skips grant tables (so you always have access), the thread stack seems to be required, I ran out of it a couple of times
  3. Remove MySQL 5.5 server: pkg delete mysql55-server
  4. Install MySQL 5.6: pkg install mysql56-server
  5. Start it: service mysql-server start
    Note, this starts MySQL with the arguments we added above.
  6. Run the upgrade script: mysql_upgrade
  7. Stop MySQL server: service mysql-server stop
  8. Remove the mysql_args line from /etc/rc.conf
  9. Start MySQL server service mysql-server start
  10. Done
 
Yes, or else it's going to conflict with mysql56-client. We use our own repository where I switched the default MySQL. I didn't remove the client because that would also remove a couple of ports that depended on it. Instead I used pkg upgrade to 'automagically' replace mysql55-client with mysql56-client without having to remove those dependent ports.
 
I started the upgrade but ran into a problem. For some reason I cannot start mysql5.6.35 unless I rename my.cnf.

After I started it and during the mysql_upgrade -u root -p I got the following at the end after it had listed some but not all of the tables...

Code:
: Got error: 1102: Incorrect database name '' when executing 'CHECK TABLE ...  FOR UPGRADE'
FATAL ERROR: Error during call to mysql_check for upgrading the tables names on all db(s) except mysql

I then tried to rename the my.cnf back to what it should be but again mysql5.6.35 would not start.

Help!
 
Back
Top