Linux import sql file into mysql database

Linux import sql file into mysql database

1. Upload the sql file to the server

Insert picture description here

2. Log in to the mysql installed by linux

mysql -u root -p
Enter password:******(password)

Insert picture description here

3. Execute the import command

source /home/bak0902.sql

Insert picture description here

4. View the database

show databases;

Insert picture description here

5. Use the data sheet

use aaa;

6. View the table of the library

show tables;

After that is the normal sql query!

Welcome to the guidance of the great god, you can leave a message to communicate!

======================
My original article, reprinted to indicate the discrepancy!

=================

Guess you like

Origin blog.csdn.net/dayonglove2018/article/details/108364153