mysql从命令行执行sql语句

mysql -u root -p -e "create database mydb;"

原文地址:https://www.cnblogs.com/silvestris/p/5162820.html