1. First open the MySQL tutorial 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.
Enter the subdirectory bin of the directory where the MySQL installation resides. Enter the command to execute the import SQL.
For example: Your MySQL is installed in D:mysql
The steps are as follows:
Start-> run-> input cmd
D:
CD Mysqlbin
Mysql-u root-p123456 Test <d:a.sql
Where root is your MySQL administrator username, 123456 for password test d:a.sql the database name to the location of the backed-up data file.
If it is windows, execute the command from the command prompt to the bin folder in the MySQL file directory
Mysql-u root-p DatabaseName < Db.sql
Where root is your MySQL username, DatabaseName is the name of your database, and db.sql you are the file. Note that you must put Db.sql in the Bin folder before you can. The location of the file can be changed.
If it's Linux, enter it directly.
MySQL DatabaseName < Db.sql