Very fast upgrade MySQL system table _ MySQL

Source: Internet
Author: User
Quickly upgrade the MySQL system Table. some MySQL releases have changed the structure of the system table in the MySQL database and added new permissions or features. When you update to the new MySQL version, you should update the system tables at the same time to ensure that their structure is up-to-date. First, back up the mysql database, and then follow the procedure below.

In Unix or Unix systems, run the mysql_fix_privilege_tables script to update the system table:

Shell> mysql_fix_privilege_tables

You must execute this script when the server is running. It tries to connect to the server running with root on the local machine. If the root account requires a password, use the following method in the command line:

Shell> mysql_fix_privilege_tables -- password = root_password

The mysql_fix_privilege_tables script can convert the system table to the current format. You may see some Duplicate column name warnings at runtime; you can ignore them.

After the script is run, stop the server and restart it.

In Windows, MySQL distribution includes mysql_fix_privilege_tables. SQL scripts, which can be run on the mysql client. For example, if MySQL is installed in C: Program FilesMySQLMySQL Server 5.1, the command should be:

C:> C: Program FilesMySQLMySQL Server 5.1 inmysql-u root-p mysqlmysql> source c:/Program Files/MySQL Server5.1/scripts/mysql_fix_privilege_tables. SQL

If it is installed in another directory, change the path name accordingly.

The mysql command prompts you to enter the root password. follow the prompts to enter the password.

In Unix, when mysql processes statements in mysql_fix_privilege_tables. SQL script, you may see Duplicate column name Warnings. you can ignore them.

After the script is run, stop the server and restart it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.