Find the answer to your Linux question:
Results 1 to 10 of 10
mysqltest: Failed in mysql_real_connect(): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) If You Know Please Help i Get Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    43

    What Does This Mean I Cant Find English Help If I Google It


    mysqltest: Failed in mysql_real_connect(): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)

    If You Know Please Help i Get Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) every time i try do something... and when i go to /var/run/mysql/ there isnt anything there is that the problem...

    Please help Me Out...
    Cheer
    Confused L33tLinuxN00b

  2. #2
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    Have you actually created a database? It's a bit counterintuitive, but mysql doesn't actually create a database when you install it...you have to do that after you install mysql or it won't start properly. Try:
    Code:
    su mysq
    so that you become the mysql user, then
    Code:
    mysql_install_db
    to create a database. You may also need to
    Code:
    chown mysql /var/lib/mysql/*
    chown mysql /var/lib/mysql/mysql/*
    I also seem to remember reading in an earlier thread somewhere that in Slack you have to
    Code:
    ln -s /var/run/mysql/mysql.sock /tmp/mysql.sock
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Posts
    43
    chown: `/var/lib/mysql/ib_arch_log_0000000000': invalid user
    and i am root

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    hmmm...try
    Code:
    chown -R mysql /var/lib/mysql/*
    chgrp daemon /var/lib/mysql/*
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  6. #5
    Just Joined!
    Join Date
    Apr 2005
    Posts
    43
    soz typed wrong thing for chown... its getting further... its getting ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) now

  7. #6
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    Try
    Code:
    mysql -u root
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  8. #7
    Just Joined!
    Join Date
    Apr 2005
    Posts
    43
    /usr/bin# mysql -u root
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

  9. #8
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    You may have to create your root mysql password; try the following:

    Code:
    mysqladmin -u root password
    that will set the root password

    now, add a new user:

    Code:
    mysql -u root -p
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  10. #9
    Just Joined!
    Join Date
    Apr 2005
    Posts
    43
    Yay It Woked Thank You So Much

  11. #10
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    Glad to hear you got it working. Have fun
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

Posting Permissions

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