文档 数据库 MySQL MySQL命令行小贴士 MySQL命令行小贴士 创建用户和数据库 #/bin/bash mysql -u root -p -e "CREATE DATABASE $1 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; USE $1; CREATE USER '$1'@'%' IDENTIFIED BY '$2'; GRANT ALL PRIVILEGES ON $1.* TO '$1'@'%'; FLUSH PRIVILEGES;" MySQL课程笔记-2-数据表操作MySQL数据的备份和恢复