0

I am upgrading mysql 5.1 to mysql 5.5 in centos 7 server.

As time limit,I only mysqldump and source several small database to mysql 5.5,and then mysql_upgrade --verbose -u root -p,everything is ok.

Several days later, I import a big database db3 to mysql 5.5.

[root@localhost ~]# mysql -u root -p < db3.sql
Enter password: 
[root@localhost ~]# mysql_upgrade --verbose -u root -p
Enter password: 
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
This installation of MySQL is already upgraded to 5.5.60-MariaDB, use --force if you still need to run mysql_upgrade
[root@localhost ~]# mysql_upgrade --verbose --force -u root -p
Enter password: 
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Phase 1/4: Fixing views

Pls notice This installation of MySQL is already upgraded to 5.5.60-MariaDB, use --force if you still need to run mysql_upgrade.
Do I need to run mysql_upgrade --verbose -u root -p again?

1 Answer 1

0

mysql_upgrade may or may not be needed. It is useful after you upgrade the server version.

In some cases (I don't remember 5.1 to 5.5), there were changes to datatypes that necessitated "fixing" the schema and the data in table(s) affected by such.

If you are dumping from the same major version that you are loading into, there should be no need for running mysql_upgrade.

If you have clues of what it changed, we can discuss further.

(Note: Even 5.5 is getting rather "old". I hope you will be moving forward soon.)

As I understand it, mysql_upgrade leaves a file behind after it runs. The file tells it "I have upgraded to X.YY.ZZ, so I don't need to run again".

Apparently, that file (on your machine) says that it has upgrated to 5.5, so it should not be needed again.

Do you have any symptoms of things not working 'right'? If so, let's approach the question from there.

2
  • I revised question, I get notice as :This installation of MySQL is already upgraded to 5.5.60-MariaDB, use --force if you still need to run mysql_upgrade.
    – kittygirl
    Jan 19, 2019 at 0:59
  • @kittygirl - I added to my answer.
    – Rick James
    Jan 19, 2019 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.