root@demo:~# mysql -u admin -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) root@wgtws:~#

Asked by Jasmeet Singh

i am facing this error. PHPmyadmin is working with the same password . i have checked all solution from the chatGPT .

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

mount | grep \/tmp; lsb_release -a; uname -a

Thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Try also adding one of the below to the command (try both separately)

-h 127.0.0.1
-h localhost

Revision history for this message
Jasmeet Singh (sdrjasmeetsingh) said :
#3

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
Linux wgtws 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Can you help with this problem?

Provide an answer of your own, or ask Jasmeet Singh for more information if necessary.

To post a message you must log in.