Urgent MySQL Problem

kevin01

Verified User
Joined
Jun 12, 2005
Messages
27
mysql went down for unknown reason and it doesnt seem to start.

/usr/local/etc/rc.d/mysqld start

[ ok ]


but it doesnt start. I havent installed or changed anything.
 
server# /usr/local/etc/rc.d/mysqld start
Starting mysqld: [ OK ]

(but the mysql does not start)

server# /usr/local/etc/rc.d/mysqld-safe start
/usr/local/etc/rc.d/mysqld-safe: Command not found.
 
Sorry but a little more linux-admin minded would be off more use.

Start the executable directly!

# locate mysqld-safe (and you probably find it somewhere in /usr/local/

check the logs after starting:

tail /var/log/messages
 
server# updatedb
updatedb: Command not found.
server# locate updatedb
/usr/libexec/locate.updatedb
/usr/ports/databases/dbtool/files/patch-samples_locate_updatedb
/usr/share/man/cat8/locate.updatedb.8.gz
/usr/share/man/cat8/updatedb.8.gz
/usr/share/man/man8/locate.updatedb.8.gz
/usr/share/man/man8/updatedb.8.gz
server#

i think im missing something :confused:
 
Ok i've checked my paths and they are probably the same for you:


# /usr/bin/mysqld_safe

and/or

# /usr/sbin/mysqld
 
hmm i get :

server# pwd
/usr/sbin
server# mysqld
mysqld: Command not found.
server# mysqld_safe
mysqld_safe: Command not found.
server# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
server#
 
Use complete paths as most root accessed servers have not all Enviroment paths so use:

# /usr/sbin/mysqld

or when in the directory as you did above use:

# ./mysqld

server# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

mysql is the client executable so it will give that error when it can't connect to the server :)
 
there's defenitely something wrong with this server :

server# cd /var/lib
server# ls
awstats
server#
 
FreeBSD 5.3

but thats the problem , i dont get any errors , i just get a message that mysql has starter [ ok ] and and it actually doesnt start and thus it does not stop.

server# /usr/local/etc/rc.d/mysqld start
Starting mysqld: [ OK ]
server# /usr/local/etc/rc.d/mysqld stop
Stopping mysqld: [ FAILED ]
server#
 
I didn't ask to run the rc batch script. That won't dump any errors.

Type the following exactly (as root):

/usr/sbin/mysqld

OR

/usr/bin/mysqld_safe
 
server# pwd
/
server# whoami
root
server# /usr/sbin/mysqld
/usr/sbin/mysqld: Command not found.
server# /usr/bin/mysqld_safe
/usr/bin/mysqld_safe: Command not found.
server#
 
btw i dont think this has anything to do with the mysql but this morning i have added a new user
 
You're probably hacked somehow. Did you gave some your root password as you binary's and databases are deleted ?

I guess you'll have to reinstall mysql
 
i've stopped all mysql processes and it works now. No i wasnt hacked.

Thanks for your help
 
You stopped all mysql processes ? and you don't have any files in your /var/lib/mysql ? strange but that's where all info is stored
 
Back
Top