切换到sql语句所在的目录
>mysql -uroot -p -e "drop database if exists testdb";
Input your password:>
>mysql -utest -p -e "create database testdb";
Input your password:>
>mysql -uroot -p -e "grant all on testdb.* to 'test@localhost' identified by 'test' "
>mysql -utest -ptest testdb < testdb.sql
Linux常用到的几个命令:
1. rm -rf test //删除test文件夹及文件夹下的所有文件
2. wget(远程下载文件到服务器上)
3. cp -rpf .test1/* test2 将test1文件夹中的所有文件拷贝到其上级目录test2中
4. ssh 10.0.0.1 远程登录到某台机器