What is MySQL and how to restore MySQL grants?

What-is-MySQL-and-how-to-restore-MySQL-grants1

In this article, you will come to know what is MySQL and how to use the UPDATE command to restore full rights to the MySQL root user.

So, let us understand what is MySQL.

1) In MySQL “My” stands for Monty Widenius, she is the daughter of MySQL’s business partner. Whereas, SQL stands for Structured Query Language. 

2) MySQL is the grouping of My and SQL, MySQL.

3) It’s a database management system (DBMS). You can use this application to handle relational databases.

4)  It’s Oracle-backed open-source software. It simply implies that you can use MySQL for free.

5) You can also edit the source code to suit your needs if you like.

6) MySQL is free software, but Oracle offers a commercial license that includes premium support too.

7)  MySQL may support a wide range of systems, including UNIX, Linux, and Windows.

8) MySQL is a good choice if you’re creating websites or web apps.

9) Data storage, e-commerce, and monitoring applications are just a few of the usage for applications.

We hope, now you have a better understanding of MySQL.

Now, let us know how to to use the UPDATE command to restore full rights to the MySQL root user.

Firstly, you need to stop my and restart it with the –skip-grant-tables option. After that, connect to the MySQL server with only MySQL.

To restore the MySQL root user with full privileges, use the command below in the MySQL client.

mysql> UPDATE mysql.user SET Grant_priv = ‘Y’, Super_priv = ‘Y’ WHERE User = ‘root’;

Query OK, 0 rows affected (0.04 sec)

Rows matched: 1  Changed: 0  Warnings: 0

We’ve selected super privilege above.

Super_priv = ‘Y’

Use the FLUSH command to flush the privileges.

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.18 sec)

Hope you found it useful. For more such articles visit our site on regular basis.


eTechSupport is a Managed Services Provider specialising in services like Web Hosting Support, Server Administration, Management & Monitoring, Live Support (Ticket Support - Chat Support), Database Administration, Remote Backup Configuration & Management and Migration as a Service.

Get your free trial now