JimmyRayJit
|
To secure the anonymous accounts on MySQL, we use password protection. In the same way today we can set-up a password protection for root account on MySQL. To set up the password in root account of MySQL can be different as OS platform. Here I will discuss about only Windows.
To setup the password for root account, you need to perform the below given steps:
• Connect to the MySQL Server as root
• Use the “Set Password” statements
To assign the password, use PASSWORD function with following steps or commands:
shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('*************');
mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('***************');
If you want to connect to the MySQL server after assign the password for root account MySQL, you will have to supply the password as:
shell> mysqladmin -u root -p shutdown
Enter password: (******************)
During these events if any negative aspects occur, you will need to go for MySQL Repair.
Posted 275 days ago
|