简体   繁体   English

设置MySQL / MariaDB galera集群时出现问题

[英]Problems setting up MySQL/MariaDB galera cluster

I'm a beginner at this so I apologize if this is a fairly simple problem. 我是一个初学者,因此如果这是一个非常简单的问题,我深表歉意。 I am setting up a Galera cluster using two RHEL6 vms. 我正在使用两个RHEL6虚拟机设置Galera集群。 The first node set up on vm no.1 went fine, but as I went to set up the permissions on vm no.2 with the following command: 在1号虚拟机上设置的第一个节点运行良好,但是当我使用以下命令在2号虚拟机上设置权限时:

mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT     OPTION;"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;"

I get the following error: 我收到以下错误:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Can anyone tell me how I might go about fixing/troubleshooting this problem? 谁能告诉我如何解决这个问题? I am using the root account for the set up. 我正在使用root帐户进行设置。

Thanks in advance! 提前致谢!

You have changed the password for root user and therefore you need to use new password during next logins. 您已经更改了root用户的密码,因此在下次登录时需要使用新密码。 To enter password, use parameter -p eg mysql -u root -p -e "your command" 要输入密码,请使用参数-p,例如mysql -u root -p -e“您的命令”

试试这个:mysql> FLUSH PRIVILEGES;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM