Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent ! Problem of starting mysql 2

Status
Not open for further replies.

samuelee

Programmer
Apr 12, 2003
10
HK
Dear all,
When I started my machine, I found that the service of mysqld is started [OK]. However, when I tried to login the mysql server, there was an error message prompted:
ERROR 2002: Can't connect to local MySql through socket '/var/lib/mysql/mysql.sock'

When I tried to check the status of mysql, the response was "running". As I restarted the service several times, the stopping action was [failed] but the starting action reported [OK]. I still could not access the database. Then I've rebooted the system but in vain.

Would you mind telling me how can I recover this service ?Please help !!

My enviornment is as follows:
Linux 7.2
Apache-1.3.20-16
MySql-3.23.41-1
 
Sidenote: Have you thought about upgrading?

Do you get any errors in your log files (usually located in [tt]/var/lib/mysql/<hostname>.err[/tt])?

//Daniel
 
looks like your client app is looking for the socket file in another location than the server stores it
locate your mysql.sock (maybe /tmp/mysql.sock ?)
if this is the case edit your /etc/my.cnf and add there
a)
[client]
socket = /path/to/the/mysql.sock

b)
[mysqld]
socket = /path/where/clients/look/for/mysql.sock

and restart mysql
 
I've tried installing MySQL 4.0.12, then removed it and tried version 3.23.56 when the newer release wouldn't work. Neither version will do the 'make' or 'make install' commands. I'm running it on RedHat Linux 7.1. The message I get is

make: *** No targets specified and no makefile found. Stop.


When I try the 'safe_mysqld &' command to start MySQL, it at first gives me a PID, like it's starting correctly, says &quot;Starting mysqld daemon with databases from /var/lib/mysql&quot;, then says mysqld ended a second or two later. I also can't do any 'mysqladmin' commands, can't set the password, create any databases, etc.

Any help or tips would be greatly appeciated. Thanks,

Mark
 
My database has been started normally, thanks !
 
What did you do to fix it? Maybe you could help me out with my similar problem...

Mark
 
@MarksSE

as in the error message - your makefile is not present or corrupted - are you sure you run the make command in the directory wher you uncompressed the mysql source?

and to your mysql not starting prob - look in the error log, there's your answer - sorry without any further info there's no better suggestion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top