Connecting your application to a MySQL database requires specific credentials — hostname, port, database name, and username. The Nobregas MySQL Panel provides all of this in a convenient connection details modal, ready to copy and paste into your application config.
Opening the Connection Details Modal
- Log in at mysql.nobregas.org.
- Click Databases in the top navigation bar.
- Find the database you want to connect to.
- Click the Connect button on that database's row.
- A modal window opens showing all your connection details.
What the Modal Shows
The connection details modal displays the following fields:
- Hostname — The address of the MySQL server (e.g.,
node1.nobregas.org). This is what you enter as the database host in your application. - Port — The MySQL port number, typically
3306. - Database Name — The full name of your database, including the prefix (e.g.,
u24a5d4_mysite). - Authorized Users — A list of MySQL users that currently have access to this database.
Copying Credentials
Each field has a copy button next to it. Click the copy icon to instantly copy the value to your clipboard. This prevents typos and speeds up configuration.
Using the Credentials in Your Application
Here is an example of how to use these details in common frameworks:
PHP (PDO):
$pdo = new PDO(
'mysql:host=YOUR_HOSTNAME;port=3306;dbname=YOUR_DATABASE',
'YOUR_USERNAME',
'YOUR_PASSWORD'
);
WordPress (wp-config.php):
define('DB_NAME', 'YOUR_DATABASE');
define('DB_USER', 'YOUR_USERNAME');
define('DB_PASSWORD', 'YOUR_PASSWORD');
define('DB_HOST', 'YOUR_HOSTNAME');
Node.js (mysql2):
const connection = mysql.createConnection({
host: 'YOUR_HOSTNAME',
port: 3306,
user: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
database: 'YOUR_DATABASE'
});
Replace the placeholder values with the actual details shown in the modal.
Managing Database Users from the Modal
If you need to create a new user or manage access, the modal includes a link to navigate to the Database Users page where you can create users and assign specific privileges.
Troubleshooting Connection Issues
- Connection refused — Make sure you are using the correct hostname and port.
- Access denied — Verify the username has been granted access to this specific database.
- Remote access blocked — If connecting from an external server, whitelist your IP address on the Databases page under Remote MySQL.