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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Going MAD over mysql daemon problem

Status
Not open for further replies.

VideoDude

Vendor
Dec 18, 2003
3
US
Ok, so this is certainly a "short between the keyboard and the chair" issue... but I've been banging my head against a wall trying to figure this out and I now need HELP... please!!!!

The problem started when I thought I'd be smart and move my MySQL data to volume that had more available space on it. Quickly after moving the data to this new volume I realized that I jumped in over my head and I reverted the data back to its original location. This is when the problems started.

I frantically called a friend who guided me through the process of getting MySQL started again by issuing the command... safe_mysqld --skip-grant-tables

This seemed to work OK until the day that I got into phpMyAdmin and attempted to administrate users. I tried adding a user and got the following message...
Code:
  Error
  SQL-query :  
  GRANT USAGE ON * . * TO "test"@"%" IDENTIFIED BY "****";
  MySQL said: 
  Unknown command

This has led through myriad different attempts to get MySQL running again but keep running in to obstacles!!! Below is a listing of my attempts to make MySQL work again. Please, please, please... someone take a look at this and tell me what I'm doing wrong... PLEASE?

Logged in to the server as root...

Attempted to start the daemon by issuing...
Code:
/bin/safe_mysqld

Results in...
Code:
		Starting mysqld daemon with databases from /usr/local/mysql/var
(hangs, no response, ^C does nothing, ^Z results in "
Code:
[1]+ ... Stopped safe_mysqld
")

Listed processes running...
Code:
	ps -ef | grep my
	   mysql 18840 18827  0 23:14:36 pts/1    0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local
	    root 18827 18688  0 23:14:36 pts/1    0:00 /bin/sh ./safe_mysqld

Attempted to kill process started by issuing...
Code:
	mysqladmin -uroot -p shutdown
(hangs, no response, ^Z results in "
Code:
[2]+  Stopped ... mysqladmin -uroot -p shutdown")

Listed processes running...
Code:
	ps -ef | grep my
	   mysql 18840 18827  0 23:14:36 pts/1    0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local
	    root 18954 18688  0 23:23:19 pts/1    0:00 mysqladmin -uroot -p shutdown
	    root 18827 18688  0 23:14:36 pts/1    0:00 /bin/sh ./safe_mysqld

Any attempt to issue "kill" commands for these running processes results in no result. The processes continued to run.

Issued "
Code:
killall 9
" to kill unwanted processes

Moved into libexec directory

Issued "
Code:
mysqld
" command as root
Resulted in...
Code:
Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
		040216 23:40:35  Aborting
		040216 23:40:35  mysqld: Shutdown Complete

Issued
Code:
safe_mysqld --datadir=/usr/local/mysql/var
Resulted in...
Code:
		Starting mysqld daemon with databases from /usr/local/mysql/var
(hangs, no response, ^C does nothing, ^Z results in "
Code:
[1]+ ... Stopped safe_mysqld")

Killed open MySQL processess

Issued
Code:
safe_mysqld --skip-grant-tables
Resulted...
Code:
		Starting mysqld daemon with databases from /usr/local/mysql/var
(hangs, no response, ^C does nothing, ^Z results in "
Code:
[1]+ ... Stopped safe_mysqld
")

BUT!!!!

Websites that I have that depend on mysql work! Please... can someone give me a clue? Shed some light on this for me?
 
Attempted to start the daemon by issuing...
/bin/safe_mysqld

results in *apprearing to hang, press enter to return to as prompt.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I discovered the answer to my problem in the MySQL Manual under "Causes of Access Denied Errors". It seems that I was too liberal with the hostname wildcard '%' when I was setting up new users. I recovered from my problem by deleting all the users on which I had used the '%' hostname wildcard. Next I reintroduced the users following the instructions in the MySQL Manual for "Adding New Users to MySQL". Everything's running fat-and-happy again.

God-speed to everyone else who might encounter this problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top