- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
mysql_upgrade - Check and Upgrade MySQL Tables
Let us understand mysql_upgrade program −
Every time MySQL is upgraded, the user should execute mysql_upgrade, that looks for incompatibilities with the upgraded MySQL server.
It upgrades the system tables in the mysql schema so that the user can take advantage of new privileges or capabilities that could have been added after the upgrade.
It basically upgrades the Performance Schema and sys schema.
It also examines user schemas.
If mysql_upgrade finds that a table has a possible incompatibility, it performs a table check and, if some problems are found, attempts a table repair operation
The mysql_upgrade can be used as shown below −
Ensure that the server is currently running.
Invoke mysql_upgrade to upgrade the system tables in the mysql schema.
Check and repair tables in other schemas using the below command −
shell> mysql_upgrade [options]
Stop the server and restart it so that any system table changes can take effect.
If there are multiple MySQL server instances that need to be upgraded, then mysql_upgrade can be invoked with connection parameters that are appropriate to connect to each of the desired servers. Let us take an example −
With servers running on the local host on ports 3306 through 3308, upgrade each of the servers by connecting to the appropriate port. This can be done using the below commands −
shell> mysql_upgrade --protocol=tcp -P 3306 [other_options] shell> mysql_upgrade --protocol=tcp -P 3307 [other_options] shell> mysql_upgrade --protocol=tcp -P 3308 [other_options]
For local host connections on Unix, the --protocol=tcp option will force a connection using TCP/IP instead of the Unix socket file.
- Steps to upgrade a MySQL installation
- How to upgrade MySQL server from command line?
- How to upgrade your smartphone to android m
- Upgrade your computer for free to windows 10
- ISO It’s time for an Upgrade
- With use of SAP .NET Connector to perform an upgrade
- Explanation about SAP ABAP Stack and JAVA Stack and role of Java Stack during ECC upgrade
- C++ code to find how many upgrade to make HP greater than current
- Getting Information About MySQL Databases and Tables
- MySQL join two tables?
- List MySQL tables and sizes ordered by size?
- MySQL count(*) from multiple tables?
- Compare two tables and return missing ids in MySQL?
- Rename all tables and columns to lower case in MySQL?
- What is the use of CHECK TABLE statement in maintaining the MySQL tables?