1 #!/bin/bash #开头必写 2 3 #导入数据库 4 mysql -uroot -p${pwd} <<EOF 5 set names utf8; 6 drop database if exists api; 7 create database if not exists api; 8 use api; 9 source ${path}/db/api.sql; 10 exit 11 EOF