Answered by the Webhosting Experts
Tags +

Hivelocity
Dedicated Servers

Bare Metal Computing
Tired of overpaying for outdated hardware or nonexistent technical support?

Click here to chat with one of our highly skilled account managers for Hivelocity's latest server deals or browse our bare metal servers by clicking the link below.

Tags +
Tags
...
...
160x600_hivelocity_dec20

Using the mysql_upgrade Command

What is mysql_upgrade?

If your server runs MySQL databases, then the mysql_upgrade command is one you’ll want to familiarize yourself with. Available only in Unix, mysql_upgrade is a command that checks all tables in all databases for incompatibilities with your current version of the MySQL Server.

After checking your databases, if a table is found to have possible incompatibilities, it is investigated in detail. If any problems are found, the table is repaired automatically.

Once all tables have been checked and repaired, they are marked with the current MySQL version number. This ensures that the next time you run the mysql_upgrade command with the same version of the server, it can determine whether there is any need to check or repair these tables again.

Another feature of mysql_upgrade is that it saves the MySQL version number into a file named mysql_upgrade.info. Contained within the data directory, this file is used to quickly review if all tables are current for this release, allowing future table-checking to be skipped.

Lastly, mysql_upgrade also upgrades the system tables. This allows users to take advantage of new privileges or capabilities that might have been added in new versions of MySQL.

For these reasons, mysql_upgrade should be executed each time you upgrade the MySQL Server to ensure that your tables remain up-to-date and compatible. 

 

How to Use mysq_upgrade

To use mysql_upgrade, you’ll first need to make sure that your server is up and running. Then, from within the terminal, enter the following command:

shell> mysql_upgrade

The way mysql_upgrade works, is by automatically executing the following commands:

mysqlcheck --check-upgrade --all-databases --auto-repair
mysql_fix_privilege_tables

 

Popular Links

Looking for more information on MySQL? Search our Knowledge Base!

Interested in more articles about Databases? Navigate to our Categories page using the bar on the left or check out these popular articles:

Popular tags within this category include: MySQL, MSSQL, phpMyAdmin, PostgreSQL, and more. 

Don’t see what you’re looking for? Use the search bar at the top to search our entire Knowledge Base.

 

The Hivelocity Difference

Seeking a better Dedicated Server solution? In the market for Private Cloud or Colocation services? Check out Hivelocity’s extensive list of products for great deals and offers.

With best-in-class customer service, affordable pricing, a wide-range of fully-customizable options, and a network like no other, Hivelocity is the hosting solution you’ve been waiting for.

Unsure which of our services is best for your particular needs? Call or live chat with one of our sales agents today and see the difference Hivelocity can make for you.

Share

Facebook
Twitter
LinkedIn
Email
WhatsApp

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.

Watch our servers in their natural habitat

Click here to see more live streams or take a tour of our facilities.

Hivelocity
Dedicated Servers

Bare Metal Computing
Tired of overpaying for outdated hardware or nonexistent technical support?

Click here to chat with one of our highly skilled account managers for Hivelocity's latest server deals or browse our bare metal servers by clicking the link below.