Home >Database >Mysql Tutorial >启动alfresco服务的时候日志报错“is not allowed to connect to

启动alfresco服务的时候日志报错“is not allowed to connect to

WBOY
WBOYOriginal
2016-06-07 15:47:081342browse

背景: 在Linux环境下安装Alfresco,配置数据库连接其它节点的MySQL,当启动alfresco服务的时候日志报错“HOST **** is not allowed to connect to this MySQL server”,这是因为你的MySQL数据库不允许帐号从远程登陆,只能在localhost。 解决方法: 1。 修

背景:

在Linux环境下安装Alfresco,配置数据库连接其它节点的MySQL,当启动alfresco服务的时候日志报错“HOST **** is not allowed to connect to this MySQL server”,这是因为你的MySQL数据库不允许帐号从远程登陆,只能在localhost。


解决方法:

1。 修改user表字段值。只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 字段,把值从"localhost"改称"%",如下图所示:

启动alfresco服务的时候日志报错“is not allowed to connect to

也可以执行下面命令修改user表中的host字段值:
1)登录

mysql -u root -p

2)进入mysql数据库

mysql>use mysql;

3)更新字段值

mysql>update user set host = '%' where user = 'root';

mysql>select host, user from user;

注意:改完表要重启MYSQL服务


2.  可以直接授权,让用户Alfresco可以从任何主机连接到mysql服务器

GRANT ALL PRIVILEGES ON *.* TO 'Alfresco'@'%' IDENTIFIED BY 'Alfresco' WITH GRANT OPTION;
如果想允许用户Alfresco从ip为192.168.67.129的主机连接到mysql服务器,并使用Alfresco作为密码
GRANT ALL PRIVILEGES ON *.* TO 'Alfresco'@'192.168.0.105' IDENTIFIED BY 'Alfresco' WITH GRANT OPTION;

其实上述解决方法就是在MySQL数据库的设置,熟悉MySQL,这些问题很容易处理。



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn