1.首先登录mysql
mysql -hlocalhost -uroot -p
输入密码
2.执行:
source [绝对路径+文件名]
例如:source E:/create_db.sql
若脚本中只含建表语句,则需要在use db_xxx后再执行脚本
1.首先登录mysql
mysql -hlocalhost -uroot -p
输入密码
2.执行:
source [绝对路径+文件名]
例如:source E:/create_db.sql
若脚本中只含建表语句,则需要在use db_xxx后再执行脚本