PHP Tutorial MyAdmin solution for importing SQL files
I use the phpMyAdmin import directly with the following prompts error
Warning:cannot Modify header Information-headers already sent by (output started at/usr/local/cpanel/base/3rdparty/php myadmin/export.php:190) in/usr/local/cpanel/base/3rdparty/phpmyadmin/libraries/ob.lib.php on line 83
In the command window:
MySQL tutorial >source d:/datafilename.sql
. First open MySQL in the command line console
Perhaps the order is as follows:
Mysql-u root-p database_name
Then you may be prompted to enter the corresponding password
2. The following command may be useful to you when you want to change a database tutorial
mysql>use database_name
Then use the following command
Mysql>source D:datafilename.sql
Of course you need to figure out the path to the file and use it correctly.
The easiest way to do this is to put the SQL file under the Mysql.exe directory, just a filename, and save a lot of trouble.
Take a look at the import instance below
C:>mysqldump-uroot-p--add-drop-table--tables Test Testtable>c:testtable.sql
Enter Password: Hu Jintao
C:>mysql-uroot-p
Enter Password: Hu Jintao
Welcome to the MySQL Monitor. Commands end with; or G.
Your MySQL connection ID is 1311
Server version:5.0.45-community-nt MySQL Community Edition (GPL)
Type ' help, ' or ' h ' for help. Type ' C ' to clear the buffer.
mysql> Use test
Database changed
mysql> truncate TABLE testtable;
Query OK, 4 rows affected (0.02 sec)
Mysql> select * from TestTable;
Empty Set (0.00 sec)
Mysql> Source C:testtable.sql
Note:
The phpMyAdmin file import size is limited, as if it were 2m. Therefore, the import recommendation is in the command mode.
The use of the following methods:
1 into the MySQL database console,
such as Mysql-u root-p
2) Mysql>use Database
3) then use the source command, followed by the script file (such as the. SQL used here)
Mysql>source D:wcnc_db.sql