PASSWORD
SET/CHANGE WITH MYSQLADMIN
Every database has its own default passwords such as ‘root’
and ‘sa’. This can be horrible when you find your database hacked due to them.
In MySQL your default password is root, now the time to change it. Go to mysqladmin, and run the following
commands.
Syntax:
mysqladmin
-u root password “newpassword”
mysqladmin -u root -h host_name password “newpassword”
Example:
mysqladmin
-u root password ws8dr8as3
mysqladmin -u root -h localhost password ws8dr8as3
Note: This way puts
your password in the shell history.
SECURE
PASSWORD SET/CHANGE WITH MYSQL CONSOLE
Go to MySQL console then type the given command with the desired password:
mysql> SET PASSWORD FOR
root@localhost=PASSWORD(‘newpasswordgoeshere’);
No comments:
Post a Comment
Thanks for visiting...