vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I installed mysql 5.0 on redhat 9.0 from source (tar). The whole procedure occured properly, i could do ./mysqld_safe. But when i want to start the client: mysql, i get :error 2002: cannot connect to mysql server through 'tmp/mysql.sock'. I set /tmp with the sticky bit, because otherwise file 'mysql.sock' woukd be deleted !?. I also created 'my.cnp into /etc, but my problem is that there is no file 'mysql.sock'. I recompiled it again (make, make install) but still no file 'mysql.sock' anywhere. How can i create or get such a file? Thanks ben |
| |||
| "Ben" <qsvqs@qsdcsqd> wrote in message news > I installed mysql 5.0 on redhat 9.0 from source (tar). > The whole procedure occured properly, i could do ./mysqld_safe. > But when i want to start the client: mysql, i get :error 2002: cannot > connect to mysql server through 'tmp/mysql.sock'. Do you mean '/tmp/mysql.sock'? It probably won't work if it's a relative path. > I also created 'my.cnp into /etc Do you mean 'my.cnf'? > I recompiled it again (make, make install) but still no file 'mysql.sock' > anywhere. Can you confirm that mysqld is running? That is, can you observe the mysqld process in a 'ps' listing? I have frequently found it troublesome to get mysqld to start up on Linux. Sometimes when I run mysqld_safe on Linux it returns to a prompt silently, but fails to start the daemon and logs an error message. Be sure to check the error file <hostname>.err, which is typically created under the MySQL data directory. See http://dev.mysql.com/doc/refman/5.0/...to-server.html for more troubleshooting tips. Another possibility is that the mysql client you are running from the shell is left over from a previous version of MySQL installed on your system, and it thinks the socket file is in /tmp/mysql.sock, while the MySQL 5.0 daemon you just compiled and started (assuming it did start) thinks the socket file is somewhere different. Sometimes it's configured to be created under MySQL's data directory. Sometimes under /var somewhere. This should have been set at configure time before you compiled. See http://dev.mysql.com/doc/refman/5.0/...e-options.html. Also read http://dev.mysql.com/doc/refman/5.0/...ysql-sock.html Regards, Bill K. |
| |||
| Thanks. You're right: the deamon is not running. I'll read the stuff and try again. My conclusion is: why is it so difficult to install Mysql on a linux box when it's so easy on a ... windows box? "Bill Karwin" <bill@karwin.com> schreef in bericht news:dopftp1rqc@enews3.newsguy.com... > "Ben" <qsvqs@qsdcsqd> wrote in message > news >> I installed mysql 5.0 on redhat 9.0 from source (tar). >> The whole procedure occured properly, i could do ./mysqld_safe. >> But when i want to start the client: mysql, i get :error 2002: cannot >> connect to mysql server through 'tmp/mysql.sock'. > > Do you mean '/tmp/mysql.sock'? It probably won't work if it's a relative > path. > >> I also created 'my.cnp into /etc > > Do you mean 'my.cnf'? > >> I recompiled it again (make, make install) but still no file 'mysql.sock' >> anywhere. > > Can you confirm that mysqld is running? That is, can you observe the > mysqld > process in a 'ps' listing? I have frequently found it troublesome to get > mysqld to start up on Linux. Sometimes when I run mysqld_safe on Linux it > returns to a prompt silently, but fails to start the daemon and logs an > error message. Be sure to check the error file <hostname>.err, which is > typically created under the MySQL data directory. > > See http://dev.mysql.com/doc/refman/5.0/...to-server.html > for more troubleshooting tips. > > Another possibility is that the mysql client you are running from the > shell > is left over from a previous version of MySQL installed on your system, > and > it thinks the socket file is in /tmp/mysql.sock, while the MySQL 5.0 > daemon > you just compiled and started (assuming it did start) thinks the socket > file > is somewhere different. Sometimes it's configured to be created under > MySQL's data directory. Sometimes under /var somewhere. This should have > been set at configure time before you compiled. See > http://dev.mysql.com/doc/refman/5.0/...e-options.html. > > Also read > http://dev.mysql.com/doc/refman/5.0/...ysql-sock.html > > Regards, > Bill K. > > > |
| |||
| Ben wrote: > Hi, > > I installed mysql 5.0 on redhat 9.0 from source (tar). > The whole procedure occured properly, i could do ./mysqld_safe. > But when i want to start the client: mysql, i get :error 2002: cannot > connect to mysql server through 'tmp/mysql.sock'. > > I set /tmp with the sticky bit, because otherwise file 'mysql.sock' woukd be > deleted !?. > I also created 'my.cnp into /etc, but my problem is that there is no file > 'mysql.sock'. > > I recompiled it again (make, make install) but still no file 'mysql.sock' > anywhere. > > How can i create or get such a file? > Thanks > ben > > > I am not sure, but would setting the sticky bit not prevent mysqld from creating a new socket every time it is started ? I don't see the reason for the stick bit here. And I noticed you talk about /tmp and the error speaks of tmp. Could that be tmp relative to the mysql path perhaps ??? Rgds Sh |
| ||||
| On Tue, 27 Dec 2005 11:46:33 +0100, Schraalhans Keukenmeester wrote: > Ben wrote: >> I installed mysql 5.0 on redhat 9.0 from source (tar). >> The whole procedure occured properly, i could do ./mysqld_safe. >> But when i want to start the client: mysql, i get :error 2002: cannot >> connect to mysql server through 'tmp/mysql.sock'. >> >> I set /tmp with the sticky bit, because otherwise file 'mysql.sock' woukd be >> deleted !?. >> I also created 'my.cnp into /etc, but my problem is that there is no file >> 'mysql.sock'. [..] >> > I am not sure, but would setting the sticky bit not prevent mysqld from > creating a new socket every time it is started ? I don't see the reason > for the stick bit here. And I noticed you talk about /tmp and the error > speaks of tmp. Could that be tmp relative to the mysql path perhaps ??? The bit prevents *other* user IDs from deleting the socket. If user 'mysql' creates and owns /tmp/mysql.sock, then only mysql and superuser (e.g. root) can delete the file, regardless of write permissions on the mysql.sock file. But, as has been pointed out elsewhere in the thread, that's not the problem. The problem is that the daemon isn't starting. -- _ o |/) |