Unsupported Screen Size: The viewport size is too small for the theme to render properly.

sja can't connect to /var/lib/mysql/mysql.sock

forums forums SQLyog Using SQLyog sja can't connect to /var/lib/mysql/mysql.sock

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #8943
      Anonymous
      Guest

      hi,

      i am always getting the error

      “Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Could not connect to SOURCE MySQL server”

      well, that's because the mysql.sock is in /tmp. i have specified this in my.cnf and restarted the database, but sja still appears to look for mysql.sock in /var/lib/mysql

      is there anyway i can specify the location of mysql.sock to sja ?

      many thanks

      jamie

    • #17571
      Ritesh
      Member

      Thanks for the report.

      I have forwarded it to my development team.

    • #17572
      Anonymous
      Guest

      hi ritesh.

      will you announce it here on the main page when it is fixed?

      thanks

      p.s. in the meantime i have simply changed the socket location.

      in case someone else has this problem, here is how i fixed it:

      if the directory /var/lib/mysql doesn't exist than create it and chown to user mysql:

      mkdir /var/lib/mysql; chown mysql /var/lib/mysql

      i then edited the /etc/my.cnf file and specified

      [mysqld]

      socket=/var/lib/mysql/mysql.socket

      [client]

      socket=/var/lib/mysql/mysql.socket

      i then restarted the mysql server (etc/init.d/mysql restart)

      that is enough for mysql. however if you use it with php, the chances are that php was compiled with a different default mysql socket location (e.g. /tmp/mysql.sock). in which case you have to edit the php.ini file and find the variable “mysql.default_socket”. set this to the above value

      mysql.default_socket = /var/lib/mysql/mysql.socket

      and restart apache to re-read the php.ini file

      the mysql docs are here:

      http://dev.mysql.com/doc/mysql/en/problems…mysql-sock.html

      hth

    • #17573
      tumerotata
      Member

      Hello, I resolved this problem creating a link to the socket:

      Code:
      # cd /var/lib/mysql/
      # ln -s /var/run/mysqld/mysqld.sock mysql.sock

      I'm using debian sarge and mysql 4.1

      😆

Viewing 3 reply threads
  • You must be logged in to reply to this topic.