First enter mysql:
mysql -u root -p
#root为mysql账号,之后输入自己的root密码
New database:
create database newdatabase;
#注意“;”分号
View the database:
show databases;
After creating a new database, I want to import the .sql file into the database:
use newdatabase;
# newdatabase为自己需要使用的数据库名称
Then source /path/a.sql (path to sql file)