PHP Export MySQL database file

Source: Internet
Author: User
There is a MySQL database, about 1G, is virtual space, no way to log on to the MySQL command line, I just can connect through the Web, how to export data into my FTP directory.
I just can write SQL statements like this, like

$sql = ' SELECT * FROM TableName ';
mysql_query ($sql);

Just so you can query, I know how to export in the command line, such as open cmd in Windows
Then enter Mysqldump-u tab-p tablename >d:/backup.sql The input will prompt for the password
Then you can export it normally.

But I don't know how to export it on the web, how to write this SQL.

There is also if the database is relatively large, so that the timing of script execution has a time-sensitive, such as 100MB database that must be quickly backed up.

1G,10GB like this, if I close the browser after the page is executed, is the SQL statement still executing in the background?


Reply to discussion (solution)

Mei, no one replied to me, and I couldn't find the relevant information.

Close the browser, this SQL statement must have stopped
Not affected use the Ignore_user_abort function

Close the browser, this SQL statement must have stopped
Not affected use the Ignore_user_abort function

This CSV file 1103 lines, but after inserting the database I see only 1075, so I do not know which of the few have not inserted successfully into, is to insert the failure to find out

This CSV file 1103 lines, but after inserting the database I see only 1075, so I do not know which of the few have not inserted successfully into, is to insert the failure to find out
Delete the insert once inserted to make a judgment failure write a log to see the log file in a log file which failed

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.