How to set MySQL root password?
To set MySQL server root user password,
start the server, then issue the following commands:
# /usr/bin/mysqladmin -u root password 'new-password'
# /usr/bin/mysqladmin -u root -h www.example.net password
'new-password'
Alternatively you can run:
# /usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
No comments:
Post a Comment