导入sql文件到mysql

使用终端

登陆mysql

-u和-p不要动,root是你的用户名,password是你的密码。

mysql -uroot -ppassword

导入数据

如果sql文件中没有‘use xxx’(使用某个数据库),但是你想sql文件中的表导入到数据库A,先执行‘use A’,再导入sql数据。

 source /Users/xxx/spark_project.sql

在这里插入图片描述

使用navicate

在这里插入图片描述
在这里插入图片描述
如果报错,请及时联系我或者在下方评论,大家一起进步。

猜你喜欢

转载自blog.csdn.net/Mr_Qian_Ives/article/details/113103433