Professional Web Applications Themes

mysql error [newbie] - MySQL

I just installed mysql and ran the upgrade for fedora 4 but i get this error [rootlocalhost etc]# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) similar prob when try to run $ mysqladmin ping mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! TIA. Frel....

  1. #1

    Default mysql error [newbie]

    I just installed mysql and ran the upgrade for fedora 4 but i get this
    error

    [rootlocalhost etc]# mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server
    through socket '/var/lib/mysql/mysql.sock' (2)

    similar prob when try to run
    $ mysqladmin ping
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!


    TIA.
    Frel.

    Frel Guest

  2. #2

    Default Re: mysql error [newbie]

    Frel wrote:
    > I just installed mysql and ran the upgrade for fedora 4 but i get this
    > error
    >
    > [rootlocalhost etc]# mysql
    > ERROR 2002 (HY000): Can't connect to local MySQL server
    > through socket '/var/lib/mysql/mysql.sock' (2)
    >
    > similar prob when try to run
    > $ mysqladmin ping
    > mysqladmin: connect to server at 'localhost' failed
    > error: 'Can't connect to local MySQL server through socket
    > '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the
    > socket: '/var/lib/mysql/mysql.sock' exists!

    The error code (2) means the file does not exist. It is most likely in /tmp
    instead. I usually create a symbolic link from one to the other as
    something will always try to access the wrong socket file.

    Assuming /tmp/mysql.sock exists and has the correct permissions, try:

    ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

    The directory /var/lib/mysql must exist too.


    --
    Brian Wakem
    Email: [url]http://homepage.ntlworld.com/b.wakem/myemail.png[/url]
    Brian Wakem Guest

  3. #3

    Default Re: mysql error [newbie]

    On Sat, 26 Aug 2006 11:09:08 +0100, Brian Wakem wrote:
    > Frel wrote:
    >
    >> I just installed mysql and ran the upgrade for fedora 4 but i get this
    >> error
    >>
    >> [rootlocalhost etc]# mysql
    >> ERROR 2002 (HY000): Can't connect to local MySQL server
    >> through socket '/var/lib/mysql/mysql.sock' (2)
    >>
    >> similar prob when try to run
    >> $ mysqladmin ping
    >> mysqladmin: connect to server at 'localhost' failed
    >> error: 'Can't connect to local MySQL server through socket
    >> '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the
    >> socket: '/var/lib/mysql/mysql.sock' exists!
    >
    >
    > The error code (2) means the file does not exist. It is most likely in /tmp
    > instead. I usually create a symbolic link from one to the other as
    > something will always try to access the wrong socket file.
    >
    > Assuming /tmp/mysql.sock exists and has the correct permissions, try:
    >
    > ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
    >
    > The directory /var/lib/mysql must exist too.
    Hi, thanks for your help, I tried that and the ln command worked but alas
    still the same error.

    Frel Guest

  4. #4

    Default Re: mysql error [newbie]

    On Sat, 26 Aug 2006 11:09:08 +0100, Brian Wakem wrote:
    > Frel wrote:
    >
    >> I just installed mysql and ran the upgrade for fedora 4 but i get this
    >> error
    >>
    >> [rootlocalhost etc]# mysql
    >> ERROR 2002 (HY000): Can't connect to local MySQL server
    >> through socket '/var/lib/mysql/mysql.sock' (2)
    >>
    >> similar prob when try to run
    >> $ mysqladmin ping
    >> mysqladmin: connect to server at 'localhost' failed
    >> error: 'Can't connect to local MySQL server through socket
    >> '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the
    >> socket: '/var/lib/mysql/mysql.sock' exists!
    >
    >
    > The error code (2) means the file does not exist. It is most likely in /tmp
    > instead. I usually create a symbolic link from one to the other as
    > something will always try to access the wrong socket file.
    >
    > Assuming /tmp/mysql.sock exists and has the correct permissions, try:
    >
    > ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
    >
    > The directory /var/lib/mysql must exist too.
    Well, I got it to work to the point I get a "mysql> " prompt.
    After doing what you suggest I checked that the process was running.

    I had to use mysqld_safe &, and then set a password.
    mysql -p

    I went through the [url]http://forums.mysql.com/[/url]
    forum and though others have had a simlioar problem, the main gist of it
    is after locating the mysql.sock, there has to be a process for this.

    Although mysqld_safe & seems to work is this the best option for
    initiating a mysql process?





    Frel Guest

  5. #5

    Default Re: mysql error [newbie]


    "Frel" <Frel> wrote in message
    news:pan.2006.08.27.06.25.53.452450...
    > On Sat, 26 Aug 2006 11:09:08 +0100, Brian Wakem wrote:
    >
    >> Frel wrote:
    >>
    >>> I just installed mysql and ran the upgrade for fedora 4 but i get this
    >>> error
    >>>
    >>> [rootlocalhost etc]# mysql
    >>> ERROR 2002 (HY000): Can't connect to local MySQL server
    >>> through socket '/var/lib/mysql/mysql.sock' (2)
    >>>
    >>> similar prob when try to run
    >>> $ mysqladmin ping
    >>> mysqladmin: connect to server at 'localhost' failed
    >>> error: 'Can't connect to local MySQL server through socket
    >>> '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that
    >>> the
    >>> socket: '/var/lib/mysql/mysql.sock' exists!
    >>
    >>
    >> The error code (2) means the file does not exist. It is most likely in
    >> /tmp
    >> instead. I usually create a symbolic link from one to the other as
    >> something will always try to access the wrong socket file.
    >>
    >> Assuming /tmp/mysql.sock exists and has the correct permissions, try:
    >>
    >> ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
    >>
    >> The directory /var/lib/mysql must exist too.
    >
    > Well, I got it to work to the point I get a "mysql> " prompt.
    > After doing what you suggest I checked that the process was running.
    >
    > I had to use mysqld_safe &, and then set a password.
    > mysql -p
    >
    > I went through the [url]http://forums.mysql.com/[/url]
    > forum and though others have had a simlioar problem, the main gist of it
    > is after locating the mysql.sock, there has to be a process for this.
    >
    > Although mysqld_safe & seems to work is this the best option for
    > initiating a mysql process?
    >
    In answer to my own silly question, (doh!) it's amazing what I can do when I
    look <hides from thrown things.

    I found downloading the MySQL very Fine Manual of great assitance, untars
    to html for offline reference too. Very handy.
    >
    >
    >

    Frel Guest

Similar Threads

  1. newbie question with php and mysql
    By levels in forum Macromedia Dynamic HTML
    Replies: 4
    Last Post: August 25th, 12:18 PM
  2. Newbie tutorial for MySQL/OS X?
    By Tim McNamara in forum MySQL
    Replies: 2
    Last Post: January 30th, 01:37 AM
  3. Replies: 0
    Last Post: January 29th, 02:03 PM
  4. newbie Q: Using CSV instead of MySql
    By Citizen X in forum PHP Development
    Replies: 6
    Last Post: September 27th, 08:01 PM
  5. NEWBIE PHP MySQL Windowa XP
    By HMW in forum PHP Development
    Replies: 0
    Last Post: September 21st, 01:33 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139