MySQL Basic Learning_Lesson 009_Importing Initialized Data

MySQL import initialization data

Step 1: Log in to the MySQL database management system

Enter in the dos command window:

mysql -uroot -p123456

The 123456 behind -p is your own mysql login password

Step 2: Check which databases are there

show databases;

Note: The above statement is not a SQL statement, but a MySQL command

Step 3: Create our own database

Description: Create database statement syntax format, which will be introduced in detail in the following chapters, so I won’t elaborate on it

create database testsql;

Note: The above statement is not a SQL statement, but a MySQL command

Step 4: Use testsql database

use testsql;

Note: The above statement is not a SQL statement, but a MySQL command

Step 5: Check which tables are in the currently used database

show tables;

Note: The above statement is not a SQL statement, but a MySQL command

Step 6: Initialize the data

source + sql文件的绝对路径,再按回车键

 

Step 7: Execute show tables again; you can import the required tables into the database

show tables;

Guess you like

Origin blog.csdn.net/weixin_43184774/article/details/115081671