MySQL Can Connect Remotely but not Locally

后端 未结 8 1501
迷失自我
迷失自我 2021-01-19 20:29

This is a weird problem and I\'m not sure what\'s going on. I installed MySQL on a linux box I have running Ubuntu 10.04 LTS. I can access mysql via SSH mysql -p

8条回答
  •  悲&欢浪女
    2021-01-19 20:55

    As the first and good answer says, MySQL isn't listening to your local TCP/IP sockets.

    Connect your mysql.Client module using:

    client.port = '/tmp/mysql.sock';

    and fill in wherever your mysql socket file is located. If you can't find this, consider using this heavy but success-guaranteed system-wide search

    cd / ; find * | grep mysql.sock

提交回复
热议问题