phpMyAdmin failed to import SQL files

Source: Internet
Author: User
Tags mysql in mysql tutorial php tutorial cpanel phpmyadmin myadmin

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

 

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.