Accessing ClearDB MySQL Database Remotely with MySQL Query Browser
To establish a remote connection to your ClearDB MySQL database on Heroku using MySQL Query Browser, follow these steps:
Obtaining Database Credentials:
- Access the Heroku website and select the app with the ClearDB addon installed.
- Click on "Addons" and then select "ClearDB MySQL Database."
- Choose your database and navigate to the 'Endpoint Information' tab.
- Retrieve the username and password from this tab.
Getting the URL:
- Open a command line prompt.
- Run the following command:
heroku config --app <YOUR-APP-NAME>
Copy after login
- Identify the line that starts with "mysql://" and copy the hostname portion (e.g., "us-cdbr-east.cleardb.com").
Connecting with MySQL Query Browser:
- Launch MySQL Query Browser.
- Click on "New Connection" and enter the following:
-
Host: Hostname obtained from the heroku config command
-
Port: Typically 3306 for MySQL
-
Username: Database username
-
Password: Database password
- Click "Connect" to establish a secure connection to your ClearDB database remotely.
The above is the detailed content of How to Connect to a ClearDB MySQL Database Remotely Using MySQL Query Browser?. For more information, please follow other related articles on the PHP Chinese website!