当前位置:网站首页>linux下新建Mysql数据库并导入sql文件
linux下新建Mysql数据库并导入sql文件
2022-06-30 15:33:00 【多汁多味】
0. 登录mysql
mysql -u root -p
1. 查看当前数据库
show databases; 
2. 新建mission数据库
create database mission; 
3. 查看是否新建成功
show databases; 
4. 切换到mission数据库
use mission;
5. 然后执行:其中/home/sql_file/mission.sql是我们要导入的对应的sql文件
source /home/sql_file/mission.sql 
6. 查看导入成功的表
show tables;

7. 查看表结构
desc mission;
边栏推荐
- Preliminary study on AI noise reduction evaluation system of sound network
- 001 data type [basic]
- Text matching - [naacl 2022] GPL
- 1082 read number in Chinese (25 points)
- 1018 public bike Management (30 points)
- Text matching - [naacl 2021] augsbert
- O - ACM contest and blackout (minimum spanning tree, Kruskal)
- Voice codec based on machine learning Agora silver: support high quality voice interaction at ultra-low bit rate
- Examples of bubble sorting and matrix element screening in MATLAB
- Jupyter notebook basic knowledge learning
猜你喜欢

C language foundation - pointer array - initialization method & constant pointer array, pointer constant array

Determine the number of digits of an integer in MATLAB (one line of code)

4.12 input() input function and comments

J - Borg maze (minimum spanning tree +bfs)

Matlab construction operation example

FoxPro and I

About pickle module - 6 points that beginners must know

Tetris source code (color version)

Super comprehensive redis distributed high availability solution: sentry mechanism

Infrastructure is code. What are you talking about?
随机推荐
1151 LCA in a binary tree (30 points)
Matlab two-dimensional array example (extract data)
1148 werewolf - Simple Version (20 points)
Some reference routines for cache update
机械工程师面试的几个问题,你能答上来几个?
数控加工中心打刀缸工作原理及故障处理
Is pioneer futures safe? What are the procedures for opening futures accounts? How to reduce the futures commission?
The sound network has fully opened the real-time transmission network sd-rtn, which has been free of network wide accidents for seven years - this is FPA!
HD mechanical principle · classic dynamic drawing of mechanical design
Rte2021 review of the practice and the way of AI OPS landing
C language \t usage
E - highways (minimum spanning tree)
左旋梯形螺纹的编程
Shift operator (detailed)
立式加工中心调试的步骤
Flask Sqlalchemy - automatically export the table model (flask sqlacodegen) & no single primary key problem ---orm (8)
C. Registration system(map)
Using member variables and member functions of a class
Chapter 2 installation and use of vscode editor
Super comprehensive redis distributed high availability solution: sentry mechanism