How to Find Your MySQL Database Credentials
Guidance on locating the connection details for your MySQL database based on common hosting scenarios.
What You'll Need:
- Hostname (or Server Address): The server address (e.g., IP, domain name).
- Port: The network port (default: 3306).
- Database Name: The specific database to connect to.
- Username: The user account with database access permissions.
- Password: The password for the specified Username.
Where to Look Based on Your Setup:
Cloud Database Service
(e.g., AWS RDS, Google Cloud SQL, Azure, DigitalOcean Managed Databases)
- Log in to your cloud provider's console (AWS, GCP, Azure, DO).
- Navigate to the database service section (RDS, Cloud SQL, etc.) and find your specific database instance.
- Look for sections like "Endpoints," "Connection Details," "Connectivity."
- You'll typically find the Hostname, Port, Database Name (or specify it), and Username (often "Master Username").
- The Password was set during setup. Use the provider's reset mechanism if forgotten.
- Important: Check firewall/security group settings to ensure our service can connect (you might need to allowlist our IP if provided).
- Helpful Links:
Web Hosting with Control Panel
(e.g., cPanel, Plesk)
- Log in to your hosting control panel.
- Find sections like "MySQL Databases" or "Databases."
- Your Database Names and associated Usernames should be listed.
- The Hostname is often
localhost, but *verify* with your host's documentation. - The Port is usually 3306.
- The Password was set when creating the database user. Use the panel's tools to change it if needed.
- Important: You might need to enable "Remote MySQL" or add our IP address to an access list. Check host docs.
- Helpful Links:
Self-Hosted / Custom Server
(e.g., VPS, Dedicated Server, On-Premise)
- Ask the developer, sysadmin, or DevOps person who manages the server.
- Check application configuration files (e.g.,
.env,config.php,settings.py) for connection strings/details (handle with care!). - Check the MySQL configuration file (
my.cnformy.ini) forbind-addressandport. - Refer to any installation notes or documentation.
- Passwords may need to be reset by an administrator if lost.
- Helpful Links:
- MySQL Server Configuration (Technical)
Using a Database Management Tool
(e.g., phpMyAdmin, DBeaver, TablePlus, Sequel Pro/Ace)
- Open your database tool.
- Look for "Manage Connections," "Edit Connection," or similar options.
- The saved connection settings will show the Hostname, Port, Username, and possibly Database Name used previously.
- The password might be masked or stored in your system's keychain.
Still Stuck?
If you can't find the details, please contact the person/team managing your application/database, your hosting provider support, or your IT department/administrator.
