Home > Database > Mysql Tutorial > How to Establish Remote Access to a ClearDB MySQL Database on Heroku?

How to Establish Remote Access to a ClearDB MySQL Database on Heroku?

Linda Hamilton
Release: 2024-10-26 20:20:03
Original
414 people have browsed it

How to Establish Remote Access to a ClearDB MySQL Database on Heroku?

Remote Access to ClearDB MySQL Database on Heroku

Querying a ClearDB MySQL database remotely can be achieved through tools like MySQL Query Browser. To establish the connection, you'll need the following information:

Acquiring Database Credentials and Connection Details:

  1. Navigate to the Heroku website and select "My Apps."
  2. Choose the app associated with the ClearDB database.
  3. Click on "Addons" and select "ClearDB MySQL Database."
  4. Select the desired database and navigate to the "Endpoint Information" tab.
  5. You will find the username and password needed to connect to the database.

Determining the Database URL:

  1. Open your command line and enter the following:

    heroku config --app <YOUR-APP-NAME>
    Copy after login
  2. Replace with the actual name of your Heroku app.
  3. The output will include a line similar to:

    CLEARDB_DATABASE_URL: mysql://user:pass@us-cdbr-east.cleardb.com/DATABASE?reconnect=true
    Copy after login
  4. The database URL is the part that begins with "us-cdbr-east.cleardb.com".

Establishing the Remote Connection:

  1. Launch MySQL Query Browser.
  2. Enter the database URL, username, and password obtained in the previous steps.
  3. Click on the "Connect" button to establish a remote connection to your ClearDB database.

The above is the detailed content of How to Establish Remote Access to a ClearDB MySQL Database on Heroku?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template