Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2003
    Posts
    15

    Unanswered: no '/var/run/mysql/mysql.sock' (beginer here)

    hi,

    I'm just starting to play around with mysql and PHP for the first time. Both came default installed with Slackware 8.1. Well my problem is that whenever I try to do anything I get the error:

    MySQL Connection Failed: Can't connect to local MySQL server through socket 'var/run/mysql/mysql.sock'

    Any ideas. I tried reading through the MySQL pdf manual I got off their site before posting but the slackware people installed it a funny way.

    Thanks in advance for your help.

    -Trevor

  2. #2
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320

    Re: no '/var/run/mysql/mysql.sock' (beginer here)

    Originally posted by trevor
    hi,

    I'm just starting to play around with mysql and PHP for the first time. Both came default installed with Slackware 8.1. Well my problem is that whenever I try to do anything I get the error:

    MySQL Connection Failed: Can't connect to local MySQL server through socket 'var/run/mysql/mysql.sock'

    Any ideas. I tried reading through the MySQL pdf manual I got off their site before posting but the slackware people installed it a funny way.

    Thanks in advance for your help.

    -Trevor
    DId you try to run safe_mysqld as root ?
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

  3. #3
    Join Date
    Jan 2003
    Posts
    15

    Re: no '/var/run/mysql/mysql.sock' (beginer here)

    yeah I tried that. i cant remember what it said but it a couple lines poped up and it ended.

    is that how its supposed to happen?

    thanks,

    Trevor

  4. #4
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320

    Re: no '/var/run/mysql/mysql.sock' (beginer here)

    Originally posted by trevor
    yeah I tried that. i cant remember what it said but it a couple lines poped up and it ended.

    is that how its supposed to happen?

    thanks,

    Trevor
    You need to run safe_mysqld with a special user (ie. mysql).

    Create a special user/group for that.

    chown -R root /var/run/mysql/
    chown -R mysql /var/run/mysql/
    chgrp -R mysql /var/run/mysql/

    try to start the server in console ./safe_mysqld -user=mysql

    to see if any error happen
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

  5. #5
    Join Date
    Jan 2003
    Posts
    15
    ok

    I did that, I guess my permissoins were messed up or something. I now have a /var/run/mysql/mysql.sock file.

    so i then run

    # safe_mysqld --user=mysql &

    and i get the output:

    [1] 390
    # Starting mysqld daemon with databases from /var/lib/mysql
    030108 15:47:12 mysqld ended

    (i dont think that is right)

    I think my permissions are still a little messed up somewhere. I accedently deleted the user mysql a long while ago before I knew what mySQL was.

    I am reading the pdf manual and it says everything should be installed to /usr/local/mysql/. and mine is in /usr/bin. I know it doesn't matter but when it talks about /usr/local/mysql/var, I dont have a /usr/bin/var. and I know I have to chown -R /usr/local/var but I cant find it.

    this probably sounds very newbie.

    thanks for your help so far.

    -Trevor

  6. #6
    Join Date
    Jan 2003
    Posts
    15

    fixed it!!!

    thanks everyone for your help

    FYI - what I missed was when I removed the user mysql all the permissions for everything went to "27". because slackware installs everything funny I couldn't go by the manual to find out what stuff needed to be changed.

    anyways I forgot to chane the ownership of /var/lib/mysql/

    thanks again,

    Trevor

Posting Permissions

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