mysql 执行sql 文件

方法一:source命令,登录mysql client执行

use  【库名】;
source 【sql脚本文件路径全名】 例如:source
/tmp/test.sql

 

 

方法二:使用 MySQL 命令行工具

mysql -u username -p < file_name;

 

posted @ 2023-09-06 11:19  买定灬离手  阅读(484)  评论(0编辑  收藏  举报