切換到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 遠程登錄到某臺機器