Jump to content

Archived

This topic is now archived and is closed to further replies.

nyolles

MySQL was working until the server was rebooted

Recommended Posts

[note from effigy: nate - you did not need 3 separate topics for this issue - i have consolidated them here - my inputs are green ]

 

1:

 

MySQL was working until the server was rebooting, now I don\'t know what is going on.

 

I gathered this, so I typed it:

[admin /]$ mysqladmin ping

 

Which came back with

mysqld is alive

 

 

my webpage say this:

Can\'t connect to local MySQL server through socket \'/tmp/mysql.sock\' (2)

 

I haven\'t a clue as to what to do now.

 

2:

 

where is sql installed, I can\'t run mysqld or mysqld_safe

 

3:

 

The website error gives me:

Can\'t connect to local MySQL server through socket \'/tmp/mysql.sock\' (2)

 

and I found the mysql.sock file in:

var/lib/mysql/mysql.sock instead of /tmp/mysql.sock

 

so like the manual said I tried

[root /]# safe_mysqld

and

[root /]# safe_mysqld --socket=/var/lib/mysql/mysql.sock

 

I got:

A mysqld process already exists

 

I\'ve been searching the manual and trying things all day. I\'m lost any help would be greatly appreciated.

 

Nate

Share this post


Link to post
Share on other sites

what\'s the OS? were mysql/apache/etc prepackaged or did you configure them in?

Share this post


Link to post
Share on other sites

sorry about the three seperate posts.

 

The server is linux on a cobalt box

 

I don\'t remember configuring anything. Other\'s may have though.

We did install a package called OS Commerce is that installed a php program and mysql for me. I don\'t use the commerce program but mysql was working fine after that was installed.

Share this post


Link to post
Share on other sites

no problem... i\'m wondering if the box came with mysql preinstalled, then your program put another mysql on there. perhaps the rc scripts have ran the preinstalled mysql, which isn\'t setup with your permissions.

 

 

run a ./mysqladmin shutdown. do you know where the mysql you installed lives? if not run, as root, find / -name mysql see how many come back. if you get more than 1 and you are unsure which is which, check the rc.d init.d scripts for mysql and see which dir it\'s pointing to ( i cannot remember the default - don\'t use it ) ...then go to the correct directory and start mysql...

Share this post


Link to post
Share on other sites

What is that picture of yours? Depending on how I tilt my head I see different depictions.

 

anyways,

 

I ran shutdown. I no longer get the mysqld is alive message

 

I found safe_mysqld in /usr/sbin/ and ran it:

[admin sbin]$ safe_mysqld or

[admin sbin]$ safe_mysqld --user=root -p

 

came up with:

Starting mysqld-max daemon with databases from /var/lib/mysql

/usr/bin/safe_mysqld: /var/lib/mysql/www.weblord.com.err: Permission denied

/usr/bin/safe_mysqld: /var/lib/mysql/www.weblord.com.err: Permission denied

tee: /var/lib/mysql/www.weblord.com.err: Permission denied

030418 15:59:14 mysqld ended

tee: /var/lib/mysql/www.weblord.com.err: Permission denied

Share this post


Link to post
Share on other sites

actually how long should it take. if I long in as the su I can run safe_mysqld and it says:

 

Starting mysqld-max daemon with databases from /var/lib/mysql

 

and kind of goes blank forever...

Share this post


Link to post
Share on other sites

woohoo... you need to append the & to the end of the line to make the process run in the background ( when you do, just hit enter and your prompt will come back), you can hit CTRL-C if you need to get out of it and rerun it in the background... tried the web site?

Share this post


Link to post
Share on other sites

still not working

 

[root sbin]# mysqladmin ping gives:

 

mysqladmin: connect to server at \'localhost\' failed

error: \'Can\'t connect to local MySQL server through socket \'/var/lib/mysql/mysql

.sock\' (2)\'

Check that mysqld is running and that the socket: \'/var/lib/mysql/mysql.sock\' ex

ists!

 

[root sbin]# safe_mysqld & gives:

[3] 22418

[root sbin]# Starting mysqld-max daemon with databases from /var/lib/mysql

 

till I break it.

 

and I still get this at the website :

 

Can\'t connect to local MySQL server through socket \'/tmp/mysql.sock\' (2)

Share this post


Link to post
Share on other sites

no breaks needed with the & ... shutdown any running mysql and try this...

 

[root sbin]# safe_mysqld &

(hit enter)

[root sbin]# this prompt should come back.. then test the web...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.