-1

How do I export all tables in a MySQL database to a .sql file and save the file to the path I specified using PHP? I want to write a program with the functions above and execute it regularly.

4

1 Answer 1

0

execute the MySQL query with PHP

mysql -e "select * from myTable" -u myuser -pxxxxxxxx mydatabase > mydumpfile.txt
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.