Mysql添加用户和数据库 发表于 2019-07-30 | 分类于 Linux | Mysql添加用户和数据库 先创建数据库 创建用户并赋予一个数据库的所有权限 123use mysql;create database databaseName character set utf8;grant all privileges on databaseName.* to username@'ip' identified by 'password'; 举例: 123use mysql;create database test_db character set utf8;grant all privileges on test_db.* to testuser@'localhost' identified by '123456';