Page 1 of 1

Cannot connect to database - mysql

Posted: Sun Jun 24, 2018 3:29 pm
by bhyatm01
Hi,

We have migrated a logicaldoc server over to a new machine

and now on the new server the connection to the database connection cannot be established

1. I have given permissions to the user for the logicaldoc database

2. the context.properties has been updated to include the ip address and the database name


jdbc.dbms=mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/logicaldoc (I even tried with the ip)

3. I have confirmed mysql is up and running and has access to the database


When I look at the dms.log all I see is the following:

Any ideas ?

Mac

24.06.2018 16:11:41,594 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,597 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,599 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,602 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,605 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,607 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,610 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,612 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,614 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,616 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,619 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,621 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,624 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,627 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,629 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder: 77) -- Could not create connection to database server.
24.06.2018 16:11:41,633 ERROR (com.logicaldoc.util.spring.PropertiesPlaceHolder:

Re: Cannot connect to database - mysql

Posted: Mon Jun 25, 2018 8:57 am
by shatzing
It seems that LD still is not able to connect to the DB.
Try to restart LogicalDOC.
Be sure to modify the context.properties file only when LogicalDOC is down (not running).
Check the permissions on the database, the user must have permission to connect locally (if the DB is on the same server of LogicalDOC)

Code: Select all

GRANT ALL PRIVILEGES ON logicaldoc.* TO 'myusername'@'localhost';
FLUSH PRIVILEGES;
https://chartio.com/resources/tutorials ... -in-mysql/

Test the connection to the database from the command line

Code: Select all

mysql -u myusername -p logicaldoc