MySQL PID Not Found

tygersclaw

Verified User
Joined
Nov 6, 2006
Messages
23
First off...I am a total noob when it comes to servers and the ones I have are for hosting sites of my own and that of friends

I was making a post on a forum on the server when I got a error message so I thought I would reboot it.

I issued a remote reboot, but the MySQL did not comeback....so login to SSH and try a reboot from there...and I got this gem

The system is going down for reboot NOW!
[===== SucKIT version 1.3a, Oct 24 2004 <http://sd.g-art.nl/sk> =====]
[====== (c)oded by sd <[email protected]> & devik <[email protected]>, 2002 ======]
RK_Init: idt=0xc03b3000, sct[]=0xc033e7f4, F-CK: Can't find kmalloc()!

Well...had a full disc on a server and was hoping to get the databases off it so they can be moved to a new server. (I planned on moving this month anyway) But I am getting MySQL PID errors (MySQL PID Not Found)

[root@**** root]# service mysql restart
No mysqld pid file found. Looked for /var/lib/mysql/***.dns******.com.pid.
[root@**** root]#

I deleted a big chunk of the logs hoping that I could free up some space on the HD and possibly recreate a MySQL PID (if this is even possible).

I also tried to use SSH to download a copy of the database to the user/public_html/ directory but the one test was empty.

Any suggestions or is this just simply pooched??
 
There are a few things you can do in this case.

Try:

touch /var/lib/mysql/***.dns******.com.pid

chown mysql:mysql ***.dns******.com.pid

service mysql restart

If that doesn't work your last resort should be to tar all of your data within the /var/lib/mysql folder by running "tar czvf mysql_backup.tar.gz /var/lib/mysql" without the quotes to gzip everything into one file.

Then move that file with mv to a location where your file can be downloaded by another server. Run "wget http://yourdomain.com/path/to/file/mysql_backup.tar.gz"
and then "cd /var/lib" extract with "tar zxvf mysql_backup.tar.gz"

This should copy your database over from one server to another, make sure you run tests such as opening up the database through phpMyAdmin browsing through the data to confirm that the transaction went smoothly.
 
eymbo said:
There are a few things you can do in this case.

Try:

touch /var/lib/mysql/***.dns******.com.pid

chown mysql:mysql ***.dns******.com.pid

service mysql restart
NO NO NO NO NO
The pid not found error is because MySQL isn't running.

Eymbo's idea will simply create a different error.

Just try
Code:
# service mysql start
instead of
Code:
# service mysql restart
and you won't get that error.

If MySQLd doesn't restart, then the problem has nothing to do with the PID file.

Jeff
 
NO NO NO NO NO
The pid not found error is because MySQL isn't running.

Eymbo's idea will simply create a different error.

Just try
Code:
# service mysql start
instead of
Code:
# service mysql restart
and you won't get that error.

If MySQLd doesn't restart, then the problem has nothing to do with the PID file.

Jeff

I have the same PID problem here and I got this:

[root@wingerhost ~]# service mysql start
mysql: unrecognized service
 
hi,

I've found this:

Manual shutdown
Code:

killall mysqld
killall mysqld_safe

wait about 5 seconds, then do a forced shutodwn to make sure it's dead:
Code:

killall -9 mysqld
killall -9 mysqld_safe

and then start up mysqld normally.
that makes mysql starts, now I am back in the password problem:

Repair guide: http://help.directadmin.com/item.php?id=45

when I type: mysqld_safe --skip-grant-tables &

my system hangs in: Starting mysqld daemon with databases from /var/lib/mysql
 
You must be missing the mysql startup files from /etc/init.d

You can reinstall mysql like this:

cd /usr/local/directadmin/custombuild
./build update
./build mysql d
 
You must be missing the mysql startup files from /etc/init.d

You can reinstall mysql like this:

cd /usr/local/directadmin/custombuild
./build update
./build mysql d

another error:

[root@wingerhost custombuild]# ./build mysql d
You can not install MySQL, because you do not have it set in options.conf file.
 
I've fixed the options.conf:

#PHP settings. default_php possible values - 4 or 5
default_php=5
php4_cli=no
php4_cgi=no
php5_cli=yes
php5_cgi=no --->yes
zend=no

#Possible values - 4.1, 5.0 or 5.1
mysql=5.0
mysql_inst=no

#Possible values - 1.3, 2.0 or 2.2
apache_ver=2.2
 
Edit /usr/local/directadmin/custombuild/options.conf

Change it to

mysql_inst=yes
mysql=5.0

Then run

cd /usr/local/directadmin/custombuild
./build update
./build mysql d
 
Edit /usr/local/directadmin/custombuild/options.conf

Change it to

mysql_inst=yes
mysql=5.0

Then run

cd /usr/local/directadmin/custombuild
./build update
./build mysql d

works, mysql was reinstaled, but still hanging at:

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

in:http://help.directadmin.com/item.php?id=45


in time: I've just see this error in the re install:

/usr/bin/mysqlcheck: Got error: 1045: Access denied for user 'da_admin'@'localhost' (using password: YES) when trying to connect
FATAL ERROR: Upgrade failed
 
Last edited:
You may have to reset the password

cd /usr/local/directadmin/scripts
./mysql.sh passwd username passwd
service mysql restart

You can set your own username and password. Most people match them to their admin account. It will ask you if you wish to dump the mysql database you can choose no if you have current databases. Dont select yes if you do have databases though or else they will be toast :D
 
@chatwizrd,

thank you help!

the problem was the mysql root pass and the step one here:

http://help.directadmin.com/item.php?id=45

was not working for me. It was reseted by the host support and I can go to step 2 and reset the da mysql user.

now, mysql is working, I can manage the db's, only phpmyadmin that is still not working (keep asking user/pass)

regards,
winger
 
Back
Top