在Centos中导入sql文件的方法

记一下笔记:

mysql> create database Student;


然后输入指令:

mysql> use Student;

如果没有错误的话,说明进入了你新建的数据库中。


然后把先设置编码:

mysql> set names utf8;


接着输入你所导入到Centos下的数据库文Student.sql文件的位置

例如:

mysql>source /usr/database.sql;

接着你会看到屏幕上很多查询语句的成功,然后就OK了。

引用出处:https://blog.csdn.net/u012965373/article/details/44347079

猜你喜欢

转载自www.cnblogs.com/lvchengda/p/9077378.html