Results 1 to 7 of 7

Thread: Re-Creating a Mysql.lock?

  1. #1
    Join Date
    Oct 2009
    Location
    Albuquerque, NM
    Posts
    263

    Unhappy Re-Creating a Mysql.lock?

    I tried to down grade my PHP5.3.x to 5.2.6 and some how I broke the connection to my Mysql. I needed to do this for version 6.xx of Drupal. Anyone know a quick fix to the mysql.lock or do I have to re-install Mysql?

    Error Message:
    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13).
    OpenSuse 12.1 (3.1.9-1.4) x64, 7.7GB RAM, GNOME 3.2.1
    Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz VT x 4
    NVIDIA GeForce 9500 GT 256/512 MB

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Re-Creating a Mysql.lock?

    It's not a lock, it's a sock. It means the application and mysql don't agree on which directory the Unix socket is located. Usually caused by mysql libraries and server at different versions. You can change the socket path in /etc/my.cnf. Sorry, I can't say which directory is correct as I don't run into such mismatches.

  3. #3
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,497

    Default Re: Re-Creating a Mysql.lock?

    There is a CLI version of this which I don't recall exactly but check YaST>System services to determine whether mysqld is running; if it isn't, starting it should work. If it is running, you could try turning it off and then turning it on and seeing if that works.

  4. #4
    Join Date
    Oct 2009
    Location
    Albuquerque, NM
    Posts
    263

    Default Re: Re-Creating a Mysql.lock?

    I did restart it and I had the File Manager open in both directories according to the my.cnf:
    [client]
    #password = your_password
    port = 3306
    socket = /var/run/mysql/mysql.sock

    # The MySQL server
    [mysqld]
    port = 3306
    socket = /var/run/mysql/mysql.sock


    ....and I notice the mysql.sock was being removed and created in the client path and database path.... So do I make the change to point to /var/lib/mysql for Drupal and if I do, would anything else break? I'm assuming it would be ok?
    OpenSuse 12.1 (3.1.9-1.4) x64, 7.7GB RAM, GNOME 3.2.1
    Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz VT x 4
    NVIDIA GeForce 9500 GT 256/512 MB

  5. #5
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,497

    Default Re: Re-Creating a Mysql.lock?

    Why not simply add a link to /var/run/mysql/mysql.sock? Or change the paths in Drupal? Then you won't upset any other programs that expect it there.

  6. #6
    Join Date
    Oct 2009
    Location
    Albuquerque, NM
    Posts
    263

    Default Re: Re-Creating a Mysql.lock?

    Good Idea!... Thanks I shall do that...
    OpenSuse 12.1 (3.1.9-1.4) x64, 7.7GB RAM, GNOME 3.2.1
    Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz VT x 4
    NVIDIA GeForce 9500 GT 256/512 MB

  7. #7
    Join Date
    Oct 2009
    Location
    Albuquerque, NM
    Posts
    263

    Default Re: Re-Creating a Mysql.lock?

    The links are not working for PHP5.2.6! ......I created another Vbox (3.2.8) VM, install 11.3, install the Web & LAMP Server (defualt PHP3.2x), configured everything along with Drupal 7 and everything worked fine as I expect it!

    But, when I installed PHP5.2.6 from the 11.1 version (which was the only way I found to get php5.2.6), I get the disconnection error:
    PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in lock_may_be_available() (line 163 of /srv/www/vhosts/drupal-7.x-dev/includes/lock.inc).

    I also post this on the Drupal site and see what this can be resolved.
    OpenSuse 12.1 (3.1.9-1.4) x64, 7.7GB RAM, GNOME 3.2.1
    Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz VT x 4
    NVIDIA GeForce 9500 GT 256/512 MB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •