Create a MySQL tabular Data Source
- From the navigation pane, click Data > Data Sources.
- Click Create a Data Source.
- In the New Data Source window, from Select Data Store, select MySQL.
-
Enter the Host. Valid values are
<host string>:<port>or<host string>. If no port is specified, the default is 3306. - Enter the name of the Database.
- Enter the Data Source Name.
- Optional: Enter a Description to explain the purpose of the Data Source to others.
- Click Next.
-
Specify the credentials for authenticating to MySQL.
Basic authentication is supported by default. IAM credential propagation might also be available if your administrator has enabled it.
IAM-authenticated connections can be used only for executing jobs and workspaces. Other execution types, such as scheduled jobs and Domino endpoints, require basic authentication.
- If you are using basic authentication, click Test Credentials to validate your username and password.
- Click Next (or Skip for Now to configure authentication later).
- Select whether Everyone can access this Data Source or just Specific users or organizations.
- Select who can view and use the Data Source in projects.
- Click Finish Setup.
Alternate way to connect to a MySQL Data Source
- Domino recommends the mysql-connector-python library to interact with MySQL databases from Python.
-
Use the following Dockerfile instruction to install mysql-connector-python in your environment. You must have pip installed.
-
You must set up the Domino environment variables to store secure information about your MySQL connection.
-
MYSQL_HOSTHostname where your MySQL service is running. Make sure your MySQL service and network firewall are configured to accept connections from Domino. -
MYSQL_USERThe MySQL user you want to authenticate as. -
MYSQL_PASSWORDThe password for the user chosen previously. See Store Project credentials to learn more about Domino environment variables.
-
-
See the mysql-connector-python documentation for information about how to use the package. The following is an example to connect to MySQL with
mysql-connector-pythonwhere:- You have set up environment variables with the host, user, and password.
-
Your user has access to a database named
db1in the target MySQL instance. -
The
db1database contains a table calledemployees.
R and RMySQL
- To interact with MySQL services from R, Domino recommends the RMySQL library.
-
Use the following Dockerfile instructions to add RMySQL to your environment.
-
Set the following Domino environment variables to store secure information about your MySQL connection.
-
MYSQL_HOSTHostname where your MySQL service is running. Make sure your MySQL service and network firewall are configured to accept connections from Domino. -
MYSQL_USERThe MySQL user you want to authenticate as. -
MYSQL_PASSWORDThe password for the user chosen previously. See Store Project credentials to learn more about Domino environment variables.
-
-
See the RMySQL documentation for information about how to use the package. The following is an example for connecting to MySQL with RMySQL where:
- You have set up environment variables with the host, user, and password.
-
Your user has access to a database named
db1in the target MySQL instance. -
The database contains a table named
employees.
Next steps
- After connecting to your Data Source, learn how to Use Data Sources.
- Share this Data Source with your collaborators.