PDA

View Full Version : Starting MySQL in Debian Sarge



jcr1
06-07-2006, 09:04 PM
Every time I try to start mysql on my Debian computer; I get this message;
"ERROR 2002: cant connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I have looked high & low on google, but nothing there I can find that helps.
Checked the file /var/run/mysqld/mysqld.sock and there is nothing there; which puzzles me as the /etc/mysql/my.cnf file states quite categorically that it is the socket.

Can someone help with this please?

vinref
06-07-2006, 10:04 PM
Every time I try to start mysql on my Debian computer; I get this message;
"ERROR 2002: cant connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I have looked high & low on google, but nothing there I can find that helps.
Checked the file /var/run/mysqld/mysqld.sock and there is nothing there; which puzzles me as the /etc/mysql/my.cnf file states quite categorically that it is the socket.

Can someone help with this please?

The real mysqld.sock may be installed somewhere else, so find it. Try locate mysqld.sock. You may have to update your locate database first: /usr/libexec/locate.updatedb (or whatever it is for Debian). Or find / -name mysqld.sock (may take a very long time). If you find another one, softlink /var/run/mysqld.sock to it.

You could also change /etc/my.cnf to reflect the other mysqld.sock file if it exists. Remember to back it up first: cp /etc/my.cnf /etc/my.cnf_bak.

jcr1
06-07-2006, 10:54 PM
Thanks vinref. I got it. I did another "apt-get install mysql 4.1 php-mysql 4.0"
(or something like that); it gave me the message that mysql was already installed, but gave me the option to continue with the rest, which I did.
Now it all works fine :thumbs: . I opened and closed it a couple of times, just to make sure and did a couple of simple example type data bases and it all works.

gibler
06-07-2006, 11:36 PM
the command netstat -a is also a good way of finding those pesky active sockets. With Debian everything should start like this: /etc/init.d/mysql start

Always a good idea to read up on any Debian specific installation settings in the folder /usr/share/doc/the package name/README.Debian

jcr1
08-07-2006, 10:08 AM
Just a step further with this project.
I have been playing around with HTML, PHP and CSS; entering the code at a console on my Debian machine (it has no GUI - just command line stuff) and viewing the result on a browser on my WinXP machine. It works.
I use Filezilla to transfer files from windows to debian i.e. I have a directory called images in /var/www/WEB where I store photos to be used in this project.
To get a command line to do the job I use PuTTY. All this works pretty good but I would like to do the coding from the windows side (but actually having all the code placed in the appropriate place on debian), using one of those nifty GUI's that are available i.e. Eclipse.
Any ideas about how this could be set up?

jcr1
14-07-2006, 10:18 PM
I've finally worked it out.
I tried ESftp with Eclipse; couldn't get it to work.
Then I got onto a program called sftpDrive, which works very well, kind of like samba, it allocates a drive e.g. e:, f:, etc. to linux and you have the choice which directories you want. I can then pick up which PHP file I want and open it in Eclipse to work with. Very slick :thumbs:
Downside is, its only a 6 week trial and at the end of it, it will cost $39 if I wish to keep using it.
Now all I have to do is find out how to do a similar thing with MySQL :confused:

gibler
14-07-2006, 10:30 PM
phpmyadmin (http://www.phpmyadmin.net/) ?