Home >Backend Development >PHP Tutorial >How to import large amounts of data in sql statement format in phpmyadmin_PHP tutorial

How to import large amounts of data in sql statement format in phpmyadmin_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:37:17682browse

The content of the sql.php file is as follows:

Copy code The code is as follows:

system("mysql -uroot -pmypassword database < a.sql");
print "sql ok";
?>

where root represents the database user name and mypassword represents the root password, database represents the name of the database to be imported, and a.sql represents the file name of the database file.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321994.htmlTechArticleThe contents of the sql.php file are as follows: Copy the code as follows: ? system("mysql -uroot -pmypassword database a .sql"); print "sql ok"; ? Where root represents the database user name, mypassword represents...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn