Skip to main content
MySQL
Updated over a year ago

Obtaining your MySQL credentials

Your MySQL credentials are needed for Avenue to connect to your MySQL database.

Definitions

  • Database Name: The name of the specific database within the MySQL server that you are trying to access.

  • Host: The IP address or hostname of the server where your MySQL is running.

  • Username: The username you (or your database admin) set up when MySQL was installed.

  • Password: The password for the above user.

  • Port: The port where PostgreSQL is running. The default is 3306.

  • Connection String: A single string that combines the above information for easy access.

How to Procure Credentials

  1. Identifying an Existing Database Name: If the database already exists and you're attempting to find the name, you can retrieve the list of databases in PostgreSQL by using the following command in the PostgreSQL interactive terminal (psql):

    1. Switch to the root user (or another user with similar superuser privileges):

      sudo -u root mysql
    2. List all databases:

      show databases;

  2. Identify the Host: This is usually the IP address or hostname of the server where your MySQL is running.

  3. Determine the Username: This is the username that was set up when MySQL was installed. The default superuser for MySQL is usually root.

  4. Determine the Password: This is the password for the above user. If you've forgotten the password, it will need to be reset by a user with superuser privileges.

  5. Identify the Port: The default port for PostgreSQL is 3306. However, this may have been changed during setup or if running multiple instances of PostgreSQL.

Using a Connection String

The connection string combines all the previous information into a single string. The structure for a PostgreSQL connection string is:

mysql://username:password@localhost:3306/mydatabase

Replace username, password, localhost, 3306, and mydatabase with your actual credentials and database name.


Adding MySQL as Datasource

💡Please allow Avenue to connect to your database by allow-listing our IP addresses: 3.217.246.91, 52.55.137.145

  1. Select Data Sources and click + Add New Connection.

  2. There are two options to add MySQL as a datasource: Manual Input or by using a Connection String.

    1. When adding them manually you will input the credentials previously collected into their related fields

    2. If using a Connection String is preferred simply enter the string into the

  3. Once your credentials are added select Connect Database


Connecting a monitor to your MySQL data

Once you have connected your MySQL instance you can use it in your monitors by heading to the Select the Data section of the monitor create or edit form and select it from the database dropdown.

Did this answer your question?