Andreas wrote:

Bill Hernandez wrote:

I followed the install instructions at http://entropy.ch , and was able to
get mySql & php installed on my G4 -> (OSX 10.2.6) last night. I downloaded
Navicat and setup a password for the mysql user. I created a connection
called myDatabase_connection to a database called myDatabase. I was able to
get everything running OK.


Did the server start and could you connect ?


Today when I restarted the machine, I tried to launch the php program that I
was running last night, and kept getting an error 2002 below.


1) Have the mysql daemon running
2) connect with a client


[Home:/usr/local/mysql] justMe# ./bin/mysqld_safe &
[1] 479
[Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from
/usr/local/mysql/data
030809 20:04:58 mysqld ended


there is an error.log in the data directory.
Look there for mysql's complaints.


HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of
the database here, then hit return?)


no
You are mixing up the server and client process.
mysqld is the server. It runs in the background and stores databases in it's data directory. There can be many separate databases.
You'll select one of them later when you connect with the client.


mysql <-- no d (=daemon) is the textmode client that comes with the mysql package.


[1]    Done                          ./bin/mysqld_safe
[Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)


Without running server-process there is no socket to connect to.


start by looking at the err-file in the data-dir.


You can run mysqld_save without the & to see more output. Sometimes the server comes up that way. Then you wont regain access to the shell where you ran mysqld_save.

I think it is mysqld_safe!



I had a hard time getting this kind of error.
One day I figured out, that mc caused the hick-up. mc is a textmode filemanager I really use often.
mysqld started and died at once again.


If mc produces this effect then perhaps other filemanaging tools do, too.
Use pure bash or xterm.

Better yet, install mysql as a service to have it started at boot time.




--


Peter K. Aganyo
Eternal Designs Inc.,
+1(617)344-8023 (fax & voicemail)



Reply via email to