79 Star 237 Fork 100

七觞酒 / yiicms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
importsql 753 Bytes
一键复制 编辑 原始数据 按行查看 历史
七觞酒 提交于 2017-12-02 16:35 . 添加sql 导入脚本
#!/bin/bash
if [ ! -f "yiicms.sql" ]; then
echo '当前目录下没有找到yiicms.sql文件'
exit 1
fi
read -p "dbName(默认yiicms):" dbName
read -p "user(默认root):" user
read -p "password(默认123456):" password
read -p "host(默认127.0.0.1):" host
if [ ! -n "$dbName" ]; then
dbName='yiicms'
fi
if [ ! -n "$user" ]; then
user='root'
fi
if [ ! -n "$password" ]; then
password='123456'
fi
if [ ! -n "$host" ]; then
host='127.0.0.1'
fi
echo "dbName:"$dbName,"user:"$user, "password:"$password, "host:"$host
MYSQL=`which mysql`
$MYSQL --user="$user" --password="$password" --host="$host" <<EOF
CREATE DATABASE /*!32312 IF NOT EXISTS*/ $dbName /*!40100 DEFAULT CHARACTER SET utf8 */;
use $dbName;
source yiicms.sql;
EOF
PHP
1
https://gitee.com/templi/yiicms.git
git@gitee.com:templi/yiicms.git
templi
yiicms
yiicms
master

搜索帮助