Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)
edited by
I have installed the MySQL Server 5.0 on my Windows 7 OS.

My existing USERNAME And PASSWORD for the MySQL is "root" for both. Now I want to change both the USERNAME And the PASSWORD.

Can anyone tell me HOW and from WHERE can I change those?

1 Answer

0 votes
by (12.7k points)
edited by

You can simply execute the following query from the MySQL console:

 UPDATE mysql.user SET user='newusername',
 password=PASSWORD('newpassword') WHERE user='root';
 FLUSH PRIVILEGES;

Join the SQL Course by Intellipaat fast, to Learn SQL concepts in detail and get certified.

Watch the below MySQL video tutorial to gain more knowledge on MySQL...

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 12, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
asked Dec 22, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer
asked Jun 26, 2020 in SQL by Sudhir_1997 (55.6k points)

Browse Categories

...