![]() ![]() ![]() You can describe the user table and see the list of the columns stored in the user table using the following command –Īfter selecting these columns for the root user, you will observe that the root user has almost all the privileges assigned to it and have a ‘Y’ value stored in the privilege column that stands for yes.Īlternatively, one more command can be used to login as the root user into a MySQL database that is as follows – There are many properties, and informatical fields stored n the user table for all the user-related information. We have retrieved all the password related fields of the user in the above select query statement. The execution of the above query gives the following output. Select user, authentication_string, plugin, password_lifetime, password_last_changed, password_expired from user Now, we will fire the select query on the user table in mysql database using the following query statement – That gives the following output after execution – Now, we will specify that we have to use the mysql database using the following command – We can use the following command to enter the MySQL database using the root user – In this article, we will learn about how we can change the password or set the password to the root user. Setting the strong passwords for your root user is very important from the security view so that the sensitive data stored in your MySQL database remains protected. Further, there might be a situation that you have forgotten your root password and wish to set the new password, or sometimes you will wish to set the password of the root user stronger than the previous. If this does not happen and you want to set the password for the default root user, then you can do so at a later time. By default, whenever you install the MySQL on your machine, the user named root is created, and the password for that user is prompted and asked. But, when you want to perform the database operations that require many higher privileges, you can use the account created by default in MySQL and has almost all the privileges assigned to it that is the root user. There can be multiple users having different privileges assigned to each of them in the MySQL database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |