I am trying to build a sample app using external DB (either of SQL Server or My SQL) instead of inbuilt DB, but with both, I am getting a similar type of issue.
Following are my settings for SQL Server –
Type – Microsoft SQL Server
URL – localhost\SQLEXPRESS01
Database name – learnnext
Use integrated security – Yes
With above setting I keep on getting following error –
Opening JDBC connection to Some(localhost\SQLEXPRESS01) failed with SQLState: 08S01 Error code: 0 Message: The connection to the host localhost, named instance SQLEXPRESS01 failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host. Retrying...(1/4)
I can connect to SQL Server on my localhost using SSMS and Command Line, using Windows Integrated Security.
Can someone please help on this?
Constants and Customs tab contains no settings.
‘admin’ user’s privileges.
I also had some issues running Mendix on an external database. I got mine to work with MySQL (this was our preferred database of choice). I have a mysql database running locally (important to note Mendix 7.23.7 and down only supports MySQL 5.7 and 7.23.7 and up (8.0.0) support MySQL 5.7 and 8.
Create an empty schema.
In mendix studio pro, open your project settings and go to the ‘Configuration’ tab and click on new. Add one like below:
Name: <unique name> // any config name you want
Type: MySQL/Maria DB // database type
URL: localhost:3306 // if you have a local instance of mysql running, you can use localhost or 127.0.0.1
Database name: <database name> // database name
Username: <user> // create this user with their privileges beforehand
Password: <user password> // password for above user
Step 3 <optional>:
If you want your data from your build-in database carried over to the external one you need to add the following options in the ‘Custom’ tab in the ‘Configuration’ window:
SourceDatabaseName: default // database you want to copy the data from
SourceDatabasePassword: // password for the database, the built-in one does not use a password
SourceDatabaseType: HSQLDB // build-in database uses HSQLDB
SourceDatabaseUserName: SA // don’t know if all build-in databases uses the same one, but you can open your build-in one in mendix and check
Make sure that your MySQL instance is always running before you run your app and make sure to set the new database as the ‘Active’ configuration. Now, run your project locally. Your data will be copied over to your external database (might take some time). After your first startup, it is best practice to remove all the settings under the ‘Custom’ tab.
Hope this helps! You can message me if you need help.
Privileges looks like this: