MySql database connection troubleshooting

0
Reading through the other questions on the forum I note a few people struggling with their database connection setup. I am no longer getting a error on the connection string, having used:  jdbc:mysql://localhost:3306/allowPublicKeyRetrieval=true but now, I get an initializing the Runtime: None.get com.mendix.m2ee.api.AdminException: An error occurred while initializing the Runtime: None.get at com.mendix.basis.impl.MxRuntimeImplBase.start(MxRuntimeImplBase.java:267) which I don’t undestand at all. Would really like some pointers or advice as I cannot imagine using the default database for anything other than completing the academy courses.
asked
4 answers
0

There should be some more details of the exception. Can you see if there is a stack trace, and if there is can you share it? It should provide more details of what is happening.

Is the database using InnoDB with row logging enabled? Does your MySQL user have enough access rights, such as permission to create a new database? 
https://docs.mendix.com/refguide/mysql

The default database is great for local development, and when you deploy up to the Mendix Cloud that uses Postgres which is really good. You can also backsync this to your local environment and run a local copy of Postgres if you want.
 

answered
0

can only be done when deploying on your own private cloud https://docs.mendix.com/developerportal/deploy/private-cloud-cluster

answered
0

I think the runtime is failing to parse the URI components. Try supplying the credentials and database name like:

jdbc:mysql://localhost:3306/organizer?user=root&password=root

https://stackoverflow.com/questions/33854118/how-do-i-specify-the-password-in-the-mysql-connection-url

 

Alternatively set each argument separately as descibed at https://docs.mendix.com/refguide/custom-settings#4-database-settings

 

answered
0

In some of the ways, spacing and the order of parameters in the MySql connection string does matters. So, stick to the standard format:

 

MysqlConn.ConnectionString = "Server=localhost;Port=1234;Database=My_Mysql_Database;Uid=root;Pwd=root;"

 

If the above connection string fails,  try update your c# mysql connection string as shown below (without port variable as well):

 

MysqlConn.ConnectionString = "Server=localhost;Database=My_Mysql_Database;Uid=root;Pwd=root;"

 

Or, sometime the problem could be on your windows firewall, make sure your server allow access to all port associated with your mysql database.

 

answered