skip to Main Content

I want periodic mysql database backup. But I don’t have permission to access ssh. When I try to run mysqldump via command line in Plesk Scheduled Tasks, it only creates a blank file 0 kb sized. I’m not sure if the system finds mysqldump when I write it in command line. How can I be sure mysqldump file exists in my server? How can I find its path? It doesn’t exist in bin or usr folders. Is there a way to access this file? I can backup database via PhpMyAdmin manually. But I want periodic backups. Thanks.

2

Answers


  1. Osman.

    You can try to create a php script with the following code block:

    <?php echo `which mysqldump`; ?>
    

    Please note, those are backticks.

    This may or may not work depending on whether or not open_basedir is setup on the server. This can give you the absolute path to the mysqldump binary, which you can then reference in the plesk sched. task.

    Since you don’t have control over the server, if the above doesn’t work, you’ll need to ask the server owner to either grant you access to mysqldump or use phpMyAdmin (assuming your dataset isn’t too large).

    Login or Signup to reply.
  2. This worked for me…

    exec('completepathtomysqldump.exe -uUSERNAME -pPASSWORD DATABASE_NAME > output_folder_path/filename.sql');
    

    if u want the path goto your wamp folder & search for mysqldump.exe

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search