
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to upgrade MySQL server from command line?
First, you need to open the CMD with the help of shortcut key Windows+R key.
After typing cmd, press the OK button. On pressing, you will get a command prompt. The screenshot is as follows −
After that, you need to reach the /bin directory. Follow the below instructions. If you are a Windows user, then use the below query to reach the /bin directory.
The query is as follows −
mysql> select @@datadir;
The following is the output displaying the path −
+---------------------------------------------+ | @@datadir | +---------------------------------------------+ | C:\ProgramData\MySQL\MySQL Server 8.0\Data\ | +---------------------------------------------+ 1 row in set (0.00 sec)
From above, now you know the path of MySQL installation. Now reach the /bin by following the below instructions −
After reaching the /bin directory, you need to use the following command −
mysql_upgrade -u root -p –force
Now enter the password. This begins the upgradation process as displayed in the following screenshot −
The following is the screenshot displayed after the upgradation ends −
After that, you need to restart the server.
- Related Articles
- How can we analyze the tables of a particular database from MySQL Server command line?
- How to repair MySQL tables from the command line?
- Connect to MySQL database from command line
- How can we get the list of tables in a particular database from MySQL Server command line?
- How can we return to windows command shell from MySQL command line tool?
- Connecting to MySQL database from the command line?
- How to find the MySQL data directory from command line in Windows?
- How to run TestNG from command line?
- Command Options for Connecting to the MySQL Server
- Connecting to the MySQL Server Using Command Options
- How to open MySQL command line on Windows10?
- How to run Python functions from command line?
- How to call Python module from command line?
- How to adjust display settings of MySQL command line?
- How to display records vertically in MySQL command line?
