Jump to content


Photo

MySQL was working until the server was rebooted


  • Please log in to reply
9 replies to this topic

#1 nyolles

nyolles
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 18 April 2003 - 07:19 PM

[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

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 18 April 2003 - 11:12 PM

what\'s the OS? were mysql/apache/etc prepackaged or did you configure them in?
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 nyolles

nyolles
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 18 April 2003 - 11:25 PM

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.

#4 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 18 April 2003 - 11:32 PM

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...
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#5 nyolles

nyolles
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 19 April 2003 - 12:08 AM

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

#6 nyolles

nyolles
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 19 April 2003 - 12:17 AM

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...

#7 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 19 April 2003 - 12:17 AM

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?
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#8 nyolles

nyolles
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 19 April 2003 - 12:36 AM

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)

#9 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 19 April 2003 - 12:41 AM

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...
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#10 nyolles

nyolles
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 19 April 2003 - 12:50 AM

nopes....

man this is driving me absolutely nuts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users