Mobile app version of vmapp.org
Login or Join
Steve110

: 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'

@Steve110

Posted in: #Mysql #Password

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!?!?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Steve110

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme