1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Linux MySQL d'oh

Discussion in 'Software' started by dfhaii, 1 Apr 2004.

  1. dfhaii

    dfhaii internets

    Joined:
    24 Mar 2002
    Posts:
    520
    Likes Received:
    0
    I installed mysql with slackware while it was going in but since then i have not been able to use it. it would appear that hte server is starting when the computer boots but when i try to connect to it i get an error about not being able to connect through mysql.sock . i have looked in the directory it says but there is no mysql.sock in there. Does anyone know the problem and how to fix.

    (i have since then tried installing mysql from binarys and jave also compiled the source for it.)

    Cheers
    Dfhaii
     
  2. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    I never could get mySQL to work more than once either - it's an old version they throw in anyway so my advice is to:

    1) use pkgtool to remove mysql
    2) explain what went wrong when you tried to use a binary set / compile from src

    ...and i'll tell you where you're going wrong :D
     
  3. Hargle

    Hargle What's a Dremel?

    Joined:
    13 Oct 2001
    Posts:
    404
    Likes Received:
    1
    It's probably a problem with permissions on the directory it's trying to create the mysql.sock file in. If I recall correctly it uses a couple of directories in /var (run/ and spool/ perhaps?). Try finding the relevant mysql directories in there and do a recursive chmod/chown (with 'mysql' as user and group).

    I agree with RTT though, it would be a good idea to update to the latest version while you're messing around with stuff.
     
  4. sk8o

    sk8o What's a Dremel?

    Joined:
    22 Jan 2002
    Posts:
    138
    Likes Received:
    1
    i got that error once and it was becuase mysql.sock (or whetever its called) was not in /tmp
     
  5. dfhaii

    dfhaii internets

    Joined:
    24 Mar 2002
    Posts:
    520
    Likes Received:
    0
    i have used the pkgtool thing to get rid of the mysql installed with slackware. now i have the one i compiled in /usr/local/mysql/ none of the apps are useable unless i go to the /usr/local/mysql/bin/ and ./appname

    When this is done and i have run mysqld_safe to start the server if i try to check the version of it it says
    Code:
    root@boris:/usr/local/mysql/bin# mysqladmin version
    -bash: mysqladmin: command not found
    root@boris:/usr/local/mysql/bin# ./mysqladmin version
    ./mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'
    Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
    
    i dunno what i have done wrong :wallbash: :duh: .

    Cheers
    Col
     
  6. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    First, the reason why you're having to stick './' on the front of the command is because its not in your $PATH. When you try to run a binary bash looks for it in all the dirs listed in your $PATH * (echo $PATH to see all the dirs) - this is why you can run, for example, 'tar' no matter what directory you are working in. Where as ./ tells bash that the binary you wish to run is not in your path and is in the current directory.
    Add '/usr/local/mysql/bin' to your $PATH in /etc/profile and then you'll not have to use ./ anymore.

    Anyway...
    did you run the install scripts? run mysql from /etc/rc.d/mysql.server rather than doing it manually, and see if it still acts up.

    *actually it uses tables to store the locations of commonly used bins for much quicker operation...
     
  7. sk8o

    sk8o What's a Dremel?

    Joined:
    22 Jan 2002
    Posts:
    138
    Likes Received:
    1
    If you carefully read the install instructions that come with the mysql source, they tell you the exact steps to get it up and running....
     
  8. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    Sorted it with him over IM :cooldude:
     
Tags:

Share This Page