Home > database >  - the skip - grant - tables start mysql, but still need password
- the skip - grant - tables start mysql, but still need password

Time:10-09

/root @ LZL ~ # mysql - uroot - P3307
ERROR 1045 (28000) : Access denied for user 'root' @ 'localhost' (using password: NO)
/root @ LZL ~ #
/root @ LZL ~ #
/root @ LZL ~ #
/root @ LZL ~ # ps - ef | grep 3307
Mysql 10287, 10202, 11:03 PTS/3 00:00:00 mysqld -- defaults - file=/etc/my3307 CNF - skip - grant - tables
Root 10334, 10202, his PTS/3 00:00:00 grep 3307
Root @ LZL ~ #

CodePudding user response:

Estimate is not around to try again and see if version database password is not the same way

CodePudding user response:

reference 1st floor kunlunningxue response:
estimation is not around to try again, see if version is not the same as the way of database password

Is not what meaning be? Password? Didn't quite understand

CodePudding user response:

Uh huh mysql 5.6 and 5.7 a password when the function is not the same;
If there is a socket is docker installed link way

CodePudding user response:

reference kunlunningxue reply: 3/f
uh-huh mysql 5.6 and 5.7 a password when the function is not the same;
If there is a socket is docker installed link way the problem of


[root @ LZL mysql] # mysql - uroot - p - S/TMP/mysql3307. The sock
Enter the password:
ERROR 1045 (28000) : Access denied for user 'root' @ 'localhost' (using password: NO)
[root @ LZL mysql] # mysql - uroot -s/TMP/mysql3307 sock
ERROR 1045 (28000) : Access denied for user 'root' @ 'localhost' (using password: NO)
[root @ LZL mysql] # mysql - uroot -s/TMP/mysql3307 sock -p
Enter the password:
ERROR 1045 (28000) : Access denied for user 'root' @ 'localhost' (using password: YES)

The socket is not

CodePudding user response:

Add the options in a configuration file my3307. Try CNF

CodePudding user response:

reference 5 floor will respond to the heavy rain:
add options in a configuration file my3307. Try the CNF
can try this method

CodePudding user response:

reference 5 floor will respond to the heavy rain:
add options in a configuration file my3307. Try the CNF

Find the problem, you should specify - h127.0.0.1, using tcpip log in, do not need a password, do not specify a default -h will use the socket

/root @ LZL ~ # mysql - P3307 - uroot -p
Enter the password:
ERROR 1045 (28000) : Access denied for user 'root' @ 'localhost' (using password: NO)


/root @ LZL ~ # mysql - P3307 uroot - p - h127.0.0.1
Enter the password:
Welcome to the MySQL monitor. Commands end with; Or \ g.
Your MySQL connection id is 3
Server version: 5.7.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Market metrix.

Type 'help. 'or' h \ 'for help. Type' \ c 'to clear the current input statement.

Mysql>

Finally I also tested the skip - grant - tables on the command line and CNF, all the same, can don't password -h
  • Related