Connectivity

0
Can anyone explain me how to connect the db im facing some issues on hostname , what are the fields i need to enter and how to connect 
asked
6 answers
0

Hi Udhaya

 

If I understand the issue, I present some insights, and potential solutions:

 

  1. Database Type:

    • Choose the type of database you are connecting to (e.g., MySQL, PostgreSQL, Microsoft SQL Server, Oracle, etc.).
  2. Hostname or IP Address:

    • Enter the address where your database server is located. This could be an IP address or a hostname.
  3. Port:

    • Specify the port number on which the database server is listening. The default port for many databases is often provided, but it can be different based on your database type.
  4. Database Name:

    • Input the name of the specific database you want to connect to.
  5. Username and Password:

    • Provide the database username and password with the necessary permissions to access the specified database.
  6. Additional Connection Options:

    • Depending on your database type, there might be additional connection options or parameters. These could include SSL settings, connection pooling configurations, and more.

Here's a step-by-step guide on how you can generally set up a database connection in Mendix:

  1. Open your Mendix project:

    • Open the Mendix Studio or Mendix Studio Pro where you are developing your application.
  2. Go to the "Database" tab:

    • In Mendix Studio Pro, this is usually found in the navigation menu on the left.
  3. Click "New Database" or a similar option:

    • Choose the option to add a new database connection.
  4. Select Database Type:

    • Choose the type of database you are connecting to (e.g., MySQL, PostgreSQL, etc.).
  5. Enter Connection Details:

    • Fill in the required fields, including Hostname or IP address, Port, Database Name, Username, and Password.
  6. Test Connection:

    • Many Mendix tools allow you to test the connection before saving. Use this feature to ensure that your database connection details are correct.
  7. Save the Connection:

    • Once the connection test is successful, save your database connection settings.
  8. Use the Connection in Your App:

    • Now that the database connection is set up, you can use it in your Mendix app to interact with the database.

 

 

** Kindly  accept my answer if it assist you to solve your problem.

answered
1

As explained in the documentation, these are the credentials you need to connect. The hostname specifically is the host (server) where your external database can be found. If you are running locally and testing a local database, you might be able to use localhost. The port, database, username  and password are settings you can configure when setting up your database. You could check with your DBA to see how to connect to the required database.

answered
0

For example let's say you are connecting PostgreSQL. So for that,

1.  Database Name: Add name of the database in the PgAdmin and put that here in the above screenshot.

2. Host : Usually, let's say you are working on localhost so Host will be localhost:{PortNumber of PgAdmin which is default 5432).

3. Username : Default username for PostgreSQL is 'postgres'.

4. Password: It is the same password that you have put while installing the PostgreSQL.

Done and you are good to go.

Just close the serve and run your application. Check console where you will find all the DB connection related logs.

This https://docs.mendix.com/developerportal/operate/restore-backup-locally/ link will help you further as a documentation.

Thanks!

answered
0

Screenshot 2024-03-07 172949.pngNow im getting like this please help me resolve 

answered
0

image.pngIm getting this error please someone help to solve my issue , i have checked my db connection it was connecting in other sources , but in mendix i cant able to connec the db please help me 

answered
-1
  1. Check Oracle Connection Details:

    • Ensure that the connection details such as the host name, port, service name, username, and password are correct.
    • Double-check the connection string or TNS entry for any typos or errors.
  2. Network Connection:

    • Verify that the machine running Mendix Studio Pro can reach the Oracle database server. Check for network issues, firewalls, or any restrictions that might be preventing the connection.
  3. Oracle Client Installation:

    • Ensure that the correct Oracle client version is installed on the machine running Mendix Studio Pro. The Oracle client provides the necessary libraries for connecting to an Oracle database.
    • Make sure that the Oracle client's tnsnames.ora file or the Oracle Wallet is correctly configured with the required connection details.
  4. Driver Configuration:

    • Check if you have the correct JDBC driver for Oracle configured in Mendix Studio Pro. The driver should match the Oracle database version.
    • Update or reinstall the JDBC driver if necessary.
  5. Testing Outside Mendix:

    • Try connecting to the Oracle database using external tools or utilities (e.g., SQL*Plus, SQL Developer) to ensure that the database server is accessible and the connection details are correct. This helps rule out issues specific to Mendix.
  6. Mendix Version Compatibility:

    • Ensure that the version of Mendix Studio Pro you are using is compatible with the Oracle database version you are trying to connect to. Check Mendix documentation or release notes for compatibility information.
  7. Error Logs:

    • Examine the Mendix logs for more detailed error messages. The logs may provide additional information about what is causing the connection failure.
  8. Database Server Status:

    • Ensure that the Oracle database server is running and is accessible from the network.
answered