: When I am root, "mysql" connects without a password, even though I've set one When I am root, "mysql" connects without a password, even though I've set one: # mysqladmin -u root password 'whatever'
When I am root, "mysql" connects without a password, even though I've set one:
# mysqladmin -u root password 'whatever'
# mysql -u root -p
Enter password: (typing the 'whatever' above)
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 4 to server version: 4.1.22-standard
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> Bye
but unfortunately this also happens...
# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 25 to server version: 4.1.22-standard
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>
So even though I've set the password, and it IS checked when I use "-p",
it is however not necessary!?!?
More posts by @Steve110
1 Comments
Sorted by latest first Latest Oldest Best
Check your .my.cnf config file for the lines user=root and password=whatever. These enable you to log in without a username or password. Delete those lines if you want to be prompted for a password instead.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.