Linux – Upgrade thesql 5.5.40 to 5.6 on centos 6.4

centoslinuxMySQLupgrade

I can't find a repo to add to my repolist that has an update for mysql 5.6. Does anyone know how to do this? I tried this [link] but it broke everything. I was getting a mysql_connect() undefined function after I ran that update. I tried updating the php-mysql lib but there were a lot of dependencies that didn't work out. After 5 hours of trying to fix dependencies and running updates, I ended up wiping php, apache, mysql and reinstalling with yum. Now I'm running PHP 5.6.1 and apache mysql 5.5.40

Best Answer

You could just do the following

STEP #01 : mysqldump all the data except the mysql schema

STEP #02 : Backup the mysql grants

MYSQL_USER=root
MYSQL_PASS=rootpassword
MYSQL_CONN="-u${MYSQL_USER} -p${MYSQL_PASS}"
SQL="SELECT CONCAT('SHOW GRANTS FOR ',QUOTE(user),'@',QUOTE(host),';')"
SQL="${SQL} FROM mysql.user WHERE user<>''"
mysql ${MYSQL_CONN} -ANe"${SQL}" | mysql ${MYSQL_CONN} -N | sed 's/$/;/g' > Grants.sql

STEP #03 : Download MySQL 5.6

STEP #04 : Uninstall MySQL 5.5

STEP #05 : Install MySQL 5.6

STEP #06 : Load Grants.sql from STEP #02

STEP #07 : Load Data from STEP #01

GIVE IT A TRY !!!