0

Good day!

I have a simple php code that will export a database

exec("E:\wamp\bin\mysql\mysql5.6.12\bin\mysqldump --user=root --password= --host=localhost accounts > E:\database_backup\backup.sql");

This code works but I'm accessing the application on another computer locally via ip like (192.168.1.32/filename/backup.php) so it's not saving.

How can I make it work locally? Thank you in advance.

wobsoriano
  • 12,348
  • 24
  • 92
  • 162
  • Possible duplicate of [grant remote access of MySQL database from any IP address](http://stackoverflow.com/questions/8348506/grant-remote-access-of-mysql-database-from-any-ip-address) –  Mar 13 '16 at 02:51

1 Answers1

0

You need to specify database IP in your mysqldump command and you also need to define required grant privileges in DB ( root@anothercomputerIP)