MySQL Tutorial 3.3

This experiment is to load data into the table, the following steps:

 

First create a database menagerie, and then enable the database, then create a table in the library pet.

Run the following code, the text file pet.txt loaded into the pet table, but appeared ERROR 1148. After the query is the reason that local_infile variable state is not turned on.

Set it to the open (ON) also need to quit mysql, log in again.

Use --local-infile = 1 -u user -p statement log back into mysql.

Enable database menagerie again, and then perform the import statement you can successfully import the data.

 

Note: pet.txt this text file must be saved in the corresponding path can be imported correctly. Specific view my.ini file. As shown below:

The first explanation pet.txt in C: / ProgramData / MySQL / MySQL Server 8.0 under Uploads path, to import / right.

Guess you like

Origin www.cnblogs.com/hamac/p/10994666.html