Click to See Complete Forum and Search --> : I wanna learn MySQL!
Elijah
08-15-2002, 02:12 AM
i've recently reinstalled my redhat 7.3 with mysql in it. I've tried typing in the terminal: #mysql and it gave a missing socket error or something. I can't display the exact error message right now cause' I'm in my school , In the meantime, can anyone point me to a good tutorial for using mysql or phptriad?
X_console
08-15-2002, 04:48 AM
Here are results reported by Google.com/linux:
http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=mysql+tutorial
http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=phptriad+tutorial
tankinan
08-15-2002, 05:15 AM
www.codenewbie.com
Elijah
08-15-2002, 10:09 AM
ah, I've found the error, here's what I typed:
[elijah@localhost elijah]$ mysql -u elijah -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
I've looked through /var/lib/mysql/ and I can't see any mysql.sock, anyone had the same prob?
BMK1st
08-15-2002, 10:16 AM
Great site with resources and tutorials
http://www.linuxguruz.org/
Stuka
08-15-2002, 02:37 PM
Sounds like the mysql server isn't running. You'll need to start mysqld (IIRC, /usr/bin/safe_mysqld is the supplied script for starting it up correctly). Once that's running, then you can use the mysql client.
goon12
08-15-2002, 02:46 PM
http://www.mysql.com/documentation/mysql/bychapter/
I *think* the command to start it would be:
/usr/bin/safe_mysqld --user=root &
then you could use
mysql -p
-goon12
Elijah
08-15-2002, 07:41 PM
I've tried the commands:
[root@localhost /]# Starting mysqld daemon with databases from /var/lib/mysql
020816 07:39:53 mysqld ended
[1]+ Done /usr/bin/safe_mysqld --user=root
[root@localhost /]# mysql -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
It's still not working, I've tried chmod and use all permissions on the /mysql directory. I've also read the link goon12 gave me, but some of those commands and directories does not exists in my system :(
I use redhat 7.3
here is the mysql version: Ver 11.16 Distrib 3.23.49, for redhat-linux-gnu (i386)
Sometimes the mysql daemon creates the socket in /tmp, while the client progs try to connect to it in /var/lib/mysql. Check your /tmp, if you see the socket, create a symlink to it in /var/lib/mysql.
And in case your mysqld really isn't running (checking with ps axu would be a good idea btw), check your mysql logs for error msgs. You may need to setup the initial data dirs.
mychl
08-16-2002, 10:30 AM
with redhat, you could also try /etc/init.d/mysqld start
That should get it running.
Elijah
08-16-2002, 08:57 PM
Excellent, I got it to work! Thanks everyone :) nothing will stop me now :D
I followed your suggestions:
$ ./etc/init.d/mysqld start