>CREATE USER 'bob'@'%' IDENTIFIED BY '123456'; //创建用户bob. >GRANT ALL PRIVILEGES ON *.* TO 'bob'@'localhost' IDENTIFIED BY '123456'; //设置bob可以本地登录并赋所有权限给bob,因为bob是管理员哦! >GRANT ALL PRIVILEGES ON *.* TO 'bob'@'%' IDENTIFIED BY '123456'; //用户地址可以是localhost,也可以是ip地址、机器名字、域名。也可以用'%'表示从任何地址连接. >FLUSH PRIVILEGES; //刷新授权 >CREATE DATABASE travel CHARACTER SET utf8 COLLATE utf8_general_ci; //创建数据库travel并设置成utf8格式. >quit