MySQL
Connect Semaphor to your MySQL database
Connecting to MySQL
To connect Semaphor to your MySQL database, you need to use a connection string in the following format:
Connection String Format
username– Your database username.password– The password for the specified user.server– The hostname or IP address of your MySQL server.port– The port on which MySQL is running (default: 3306).db– The name of the database you want to connect to.
Example Connection String
If your database username is admin, password is mypassword, hosted on db.example.com using the default MySQL port (3306), and the database name is analytics_db, your connection string would be:
Prerequisites
To successfully connect Semaphor to your MySQL database, ensure the following requirements are met:
Database Permissions
- The user account must have read-only access to the required database.
- The user must have the ability to create session-specific temp tables.
Network Access
- If your database is private, whitelist the Semaphor IP:
44.199.53.142to allow connections. - Ensure that firewall rules and security group settings permit network access for Semaphor.
Troubleshooting
If you encounter issues connecting to MySQL, consider the following:
- Invalid Credentials: Verify your username and password.
- Network Restrictions: Ensure your firewall or security group allows connections to the MySQL server.
- Incorrect Connection String: Double-check the format of your connection string.
- Database Permissions: Ensure your user has the required privileges to access the database.