Summarize the method of using the DOS command to operate the MySQL database. Didn't pay much attention to it before. It's quick to find this way. Especially when there is no graphical management tool for MySQL on the server.
(1) First of all to ensure that the command line access to the database, is to configure the environment variable path. Write the path of the bin of the MySQL folder into path;
(2) Then
Mysql-uroot-proot
Note that you cannot add semicolons!!! ;
Enter MySQL database in this way;
(3) then enter the database to be modified, for example, to modify the shop,
Use shop;
Use means that the database can be used.
(4) The SQL file can then be imported into the database named shop in the use environment. To run the command:
SOURCE D:/shop.sql;
Source, as the name implies, is the import resource, followed by the path to the resource. It is best not to have a Chinese path.
Import SQL files to MySQL using DOS command