Unix Technical Forum

Error with MySql Query Browser

This is a discussion on Error with MySql Query Browser within the MySQL forums, part of the Database Server Software category; --> Hi guys, I'm new to this ng and to mysql, too. I'm using mysql under ubuntu (a linux distribution) ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 09:17 AM
Alfred N.
 
Posts: n/a
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 09:17 AM
Axel Schwenke
 
Posts: n/a
Default Re: Error with MySql Query Browser

"Alfred N." <human.being@pillow.us> wrote:

> 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.


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.

> I copied /var/run/mysqld/mysqld.sock to
> /var/lib/mysql/mysql.sock, but I always get the above error.


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.

> What have I to do to have mysql browser working?


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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 09:17 AM
Alfred N.
 
Posts: n/a
Default Re: Error with MySql Query Browser

Axel Schwenke ha scritto il 10/01/2006 02:32 PM:

> 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.
>

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 mysqlxxxxxx 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!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:56 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com