
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@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>
0 comments:
Post a Comment