MySQL Set Root Password For The First Time


After installing MySQL database  server, step by step guide to set MySQL Root Password For The First Time
Login into MySQL database for the first time

[root@server ~]# mysql -u root

Set the root password for all the local domains of the server. (use ur own domain names)
mysql> set password for root@localhost=password('mypassword123');
mysql> set password for root@127.0.0.1=password('mypassword123');
mysql> set password for root@localhost.localdomain=password('mypassword123');

Deny anonymous users to MySQL database
mysql> delete from mysql.user where user='';
mysql> exit
Bye

Login into MySQL database with the password
[root@server ~]# mysql -u root -p
Password                                 <enter the password>

Was this helpfull ?

0 comments:

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons