Jump to content

Stop MySQL service


AP81

Recommended Posts

Hi guys,

I am trying to do the following (with no luck):

1.stop the MySQL service
2.copy database tables into the mysql dir
3.start MySQL again

PHP fails with the following:
passthru/exec/system('service mysqld stop', $retval);
passthru/exec/system('/etc/init.d/mysqld stop', $retval);
passthru/exec/system('/media/datadrive/stopmysql.sh', $retval);

MySQL hotcopy or MySQL dump is not an option.  I have been told my backups and restores must be done manually (i.e.
Stop MySQL, copy tables to MySQL dir -OR- backup tables, start MySQL.  I have the backups working fine, which is a cron task done every day, it is just automating a restore via PHP which is causing me headaches.

Any help is appreciated.

Thanks,
Adam
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.