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

MySQL has deleted itself!

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
I'm not quite sure if it has deleted itself, or what....but when running;

/etc/rc.d/init.d/mysqld

I get a "No such file or directory" error message! ARGH! Does this mean something major is going on with MySQL, or is it a litle something I need to do? It was working fine for the last 2 months, and now, when I need it most it screws up

Any ideas are much appreciated.

Andy
webmaster@ace-installer.com
 
Does the file /etc/rc.d/init.d/mysqld exist? cd to /etc/rc.d/init.d/ and see first if "mysqld" there.

If there, then panic...if not, then probably someone/something has deleted it. IBM Certified Specialist - MQSeries
IBM Certified Specialist - AIX 5 pSeries System Administration
 
If it has been deleted, then will all my databases have gone too, or are they stored in another folder? :| I have a lot of data in them, of which most is not backuped up :(

Andy
 
Update..../etc/rc.d/init.d/ exists, and within it there is a file called "mysql". I'm assuming this doesn't mean it has been deleted, but there is obviously still something wrong...anyone?

Thanks

Andy
webmaster@ace-installer.com
 
What are the permissions on mysql? Do an ls -la mysql from within the /etc/rc.d/init.d directory and see what output you get. Can you start it just by typing mysql in the /etc/rc.d/init.d directory itself?
 
Well, running ls -la mysql gives me;

-rwx------ 1 root root 2844 Mar 25 12:21 mysql

I think the problem is not with 'mysql' existing, but more 'mysqld' existing... I found a mysqld in /root/mysql-3.23.49/sql/, would it possibly solve the problem if I copied this file from here to /etc/rc.d/init.d/ ???

Thanks

Andy
 
well i'm not a linux expert, but as far as i know mysqld is a binary and that /etc/rc.d/init.d/mysql is it's startup script
so check the script if the paths are correct
 
Piti is right on the money. the /root/mysql-3.23.49/sql/mysqld would be the binary that needs to be run. The /rc.d/inet.d/ directory only contains startup scripts.

Also, your databases are stored elsewhere on disk. It's been a while since I used mysql, so I am sorry I can't give exact locations or scripts.

For now, until you should be able to manually start the script with
>cd /root/mysql-3.23.49/sql/
>./mysqld &

the & will cause the server to start in the background. I'm not sure, it might need to be started from another directory though. I would say the best thing to do would be to use the exact same install file (if you installed it, then just do the same procedure again, using the same paths, if you installed it while installing your OS, then find the mysql server RPM file on the distro CD and do an
>RPM -Uvh <rpm filename>
and I believe that would replace the missing script.

Best of luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top