我正在尝试使用MySQL 5.5.43在Ubuntu 14.04服务器上安装opentaps。我正在使用putty从RD到Windows的ubuntu服务器并执行所有必需的更改。
我已经成功安装了MySQL,创建了数据库“opentaps”,用密码“opentaps”创建了用户“opentaps”,为用户授予了权限。
我按照以下说明更改了文件框架/ entity / config / entityengine.xml: http://www.opentaps.org/docs/index.php/Using_opentaps_ERP_%2B_CRM_with_MySQL
运行“ant run-install”后,我收到了这个错误:
[java] ---- exception report ---------------------------------------------------------- [java] Failure in findListIteratorByCondition operation for entity [DynamicView]: org.ofbiz.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool). Rolling back transaction. [java] Exception: org.ofbiz.entity.GenericDataSourceException [java] Message: Unable to esablish a connection with the database. (Unable to acquire a new connection from the pool) [java] ---- cause --------------------------------------------------------------------- [java] Exception: java.sql.SQLException [java] Message: Unable to acquire a new connection from the pool [java] ---- cause --------------------------------------------------------------------- [java] Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException [java] Message: Could not create connection to database server. Attempted reconnect 3 times. Giving up. [java] ---- cause --------------------------------------------------------------------- [java] Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException [java] Message: Communications link failure [java] [java] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. [java] ---- cause --------------------------------------------------------------------- [java] Exception: java.net.ConnectException [java] Message: Connection refused
请帮帮我。 感谢
答案 0 :(得分:2)
我得到了我面临的问题的解决方案。
之所以发生这种情况,是因为我在Ubuntu服务器上安装了opentaps,而我在“ entityengine.xml ”配置文件中使用了“ 127.0.0.1 ”IP地址。而它需要使用正在进行安装的服务器的IP地址。如:
jdbc-uri =“jdbc:mysql:// 服务器IP / opentaps?autoReconnect = true& useOldAliasMetadataBehavior = true”
还需要为MySQL用户授予服务器IP地址的授权权限。如:
将opentaps。*的所有权限授予'opentaps'@'服务器IP ',由'opentaps-password'用grant选项标识;
谢谢。