Professional Web Applications Themes

Error with MySql Query Browser - MySQL

Hi guys, I'm new to this ng and to mysql, too. I'm using mysql under ubuntu (a linux distribution) and I'm geting following error when I run mysql query browser: ================================================ Could not connect to host 'localhost'. MySQL Error Nr. 2002 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) ================================================ A little history. Mysql.sock wasn't on my system so I tried to create one with touch, chmod and chown to obtain 'mysql.sock 0 -rwxrwxrwx' but it didn't worked. I copied /var/run/mysqld/mysqld.sock to /var/lib/mysql/mysql.sock, but I always get the above error. What have I to do to have mysql ...

  1. #1

    Default Error with MySql Query Browser

    Hi guys,
    I'm new to this ng and to mysql, too.
    I'm using mysql under ubuntu (a linux distribution) and I'm geting
    following error when I run mysql query browser:
    ================================================
    Could not connect to host 'localhost'.
    MySQL Error Nr. 2002
    Can't connect to local MySQL server through socket
    '/var/lib/mysql/mysql.sock' (111)
    ================================================

    A little history. Mysql.sock wasn't on my system so I tried to create
    one with touch, chmod and chown to obtain 'mysql.sock 0 -rwxrwxrwx' but
    it didn't worked. I copied /var/run/mysqld/mysqld.sock to
    /var/lib/mysql/mysql.sock, but I always get the above error.

    What have I to do to have mysql browser working?

    Thank you in advance
    Alfred Guest

  2. #2

    Default Re: Error with MySql Query Browser

    "Alfred N." <us> wrote:
     

    No surprise. This is a socket, not a file. It is created by the MySQL
    server (the mysqld process). No need to create or delete it.
     

    No surprise as well. You cannot 'copy' a socket. But if it exists in
    /var/run/mysql (seems to be Ubuntu specific) then clearly the Query
    Browser won't find it in /var/lib/mysql. Seems your MySQL is Ubuntu-
    ized, but your Query Browser isn't.
     

    Does your mysql package come with a my.cnf? (dpkg -L mysql-server)

    A standard MySQL client program reads /etc/my.cnf (and ~/.my.cnf) and
    evaluates the [client] section. So you could start by creating a file
    ~/.my.cnf and put the following into it:

    [client]
    socket = /var/run/mysqld/mysqld.sock

    A better solution would be to have a complete my.cnf in /etc. Possibly
    Ubuntu has /etc/mysql/my.cnf. Then you could symlink that into /etc.


    XL
    --
    Axel Schwenke, Senior Software Developer, MySQL AB

    Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
    MySQL User Forums: http://forums.mysql.com/
    Axel Guest

  3. #3

    Default Re: Error with MySql Query Browser

    Axel Schwenke ha scritto il 10/01/2006 02:32 PM:
     
    Ahem...another piece of history :-)
    I have mysql-query-browser in /opt/mysql-gui-tools-5.0 together with
    mysql-administrator and mysql-workbench.
    Since administrator and workbench are ok, I ran browser from that
    directory and it never worked.
    I made modifications you suggested but browser again didn't work!
    I gave another glance at my.cnf to discover basedir=/usr. I take a trip
    inside that dir to discover a terrible truth :-) In /usr/bin there are
    all mysql files and one of them is mysql-query-browser. I run it
    and magically everything was ok. Then I've discovered another
    interesting tool: mysql-navigator and it works too! :-)


    Thank you for your patience and your suggestions!


    Alfred Guest

Similar Threads

  1. Replies: 5
    Last Post: September 12th, 10:46 PM
  2. Replies: 0
    Last Post: December 5th, 06:06 PM
  3. Replies: 15
    Last Post: February 26th, 11:50 PM
  4. Replies: 4
    Last Post: February 4th, 10:54 AM
  5. mysql query error
    By rohan rehman in forum Coldfusion - Getting Started
    Replies: 5
    Last Post: September 4th, 04:06 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