MariaDB和SqlYog - 无法创建数据库

时间:2016-11-26 12:36:31

标签: mysql mariadb centos6 sqlyog

我已经在我的vps centOS 6 32bit中安装了mariadb - 之后,我创建了所有线路的用户,但是当我使用帐户创建登录时(在SQLyog中,我无法创建数据库

yum install wget && wget -O /etc/yum.repos.d/MariaDB.repo http://mariadb.if-not-true-then-false.com/rhel/$(rpm -E %rhel)/$(uname -i)/10
yum clean all
yum update
yum install MariaDB-server MariaDB-client
service mysql start
chkconfig --levels 150 mysql on
mysql_secure_installation

mysql -u root -p (http://stackoverflow.com/posts/18821224/revisions)

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;

CREATE USER 'username'@'%' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;

它报告:我在SQLYog中创建数据库 - 我很抱歉,而不是命令行

  

拒绝访问用户'用户名' @'%'到数据库'测试'

1 个答案:

答案 0 :(得分:0)

特权是变化无常的。

建议您为test添加明确的授权:

GRANT ALL PRIVILEGES ON test.* TO 'username'@'%';