Where to find your stored credentials in MySQL Workbench
MySQL Workbench stores connection details — including usernames and passwords — in a file on your computer, not inside the process itself. On Windows, this file lives in C:\Users\[YourUsername]\AppData\Roaming\MySQL\Workbench\connections.xml. On Mac, it's in ~/Library/process Support/MySQL/Workbench/connections.xml. On Linux, look in ~/.mysql/workbench/connections.xml.
The passwords in this file are encrypted, so you cannot read them as plain text by opening the file in a text editor. However, you can view your username and the connection name (which often hints at what the password was for) by opening the file with any text editor. The connection name and username will be visible; the password field will show encrypted characters.
If you need to see the actual password, the fastest method is to open MySQL Workbench itself and check the connection settings, which will display the username and let you reset the password if you have forgotten it.
Key Takeaways
- MySQL Workbench stores connection details in an XML file on your computer, not in the process — the location depends on your operating system.
- You can open the connections.xml file with a text editor to see usernames and connection names, but passwords are encrypted and will not display as readable text.
- To view or reset a password, open MySQL Workbench, right-click the connection, select Edit Connection, and manage the credentials from there.
- If you have forgotten the password entirely, you will need to reset it through the MySQL server itself, not through Workbench.
Viewing connection details inside MySQL Workbench
The easiest way to check what username is associated with a connection is to open MySQL Workbench and look at the connection list on the home screen. Each connection shows a name (like "Local Instance" or "Production Server") and displays the username underneath or in the connection details.
To see full details including the username, right-click any connection in the list and select Edit Connection. A dialog box opens showing the connection name, the hostname, the port number, and the username field. The password field will be blank or show dots — Workbench does not display stored passwords for security reasons.
If you need to change the password or confirm it works, you can enter a new password in this dialog and click Test Connection. If the connection succeeds, the password is correct. If it fails, the password you entered is wrong.
Resetting a forgotten password
If you have forgotten the password and Workbench will not connect, you cannot recover it from Workbench alone — you must reset it through the MySQL server. The process depends on whether you have command-line access to the server and whether you know the root password.
On a local MySQL server running on your own computer, open Command Prompt (Windows) or Terminal (Mac/Linux) and stop the MySQL service. On Windows, run net stop MySQL80 (replace 80 with your version number). On Mac or Linux, use sudo systemctl stop mysql. Then restart MySQL in safe mode without password checking, connect as root, and update the user password using an SQL command like ALTER USER 'username'@'localhost' IDENTIFIED BY 'newpassword';
If the server is remote or hosted, contact your hosting provider or database administrator — they can reset the password for you. Do not attempt to bypass security on a server you do not own or have permission to manage.
Finding the connections.xml file on your system
The connections.xml file is hidden by default on most systems. On Windows, open File Explorer, click the View tab, and check Hidden items to show hidden files and folders. Then navigate to the AppData\Roaming\MySQL\Workbench folder. On Mac, open Finder, press Command+Shift+Period to show hidden files, and navigate to Library/process Support/MySQL/Workbench. On Linux, use a file manager that shows hidden files or open a terminal and type cat ~/.mysql/workbench/connections.xml.
Once you find the file, open it with any text editor — Notepad on Windows, TextEdit on Mac, or gedit on Linux. Search for the connection name you are looking for. You will see the username in plain text within the XML tags, but the password will be encrypted and unreadable.
Understanding what information is stored where
MySQL Workbench stores several pieces of information for each connection: the connection name (a label you create), the hostname or IP address, the port (usually 3306), the username, and the encrypted password. It also stores whether the connection uses SSL, what the default schema is, and other advanced settings.
The username is stored in plain text because it is not sensitive — anyone with access to your computer can see it anyway. The password is encrypted because it is the actual secret that protects the database. Even if someone reads your connections.xml file, they cannot use the encrypted password to connect unless they also have Workbench installed and can decrypt it using Workbench's internal key.
This is why the safest way to manage credentials is to use environment variables or a separate configuration file with restricted permissions, rather than storing passwords in Workbench at all — but for local development and testing, Workbench's built-in storage is convenient enough for most people.
Checking multiple connections at once
If you have set up several connections in Workbench and need to audit which usernames are associated with each one, the fastest method is to open the connections.xml file and search through it. The file is structured as XML, so each connection appears as a block with tags like <connection>, <name>, and <user>.
Alternatively, in Workbench itself, look at the home screen connection list. Hover over each connection or click Edit Connection to see the username. Write down the connection names and usernames in a spreadsheet or text file so you have a record of what you have set up.
If you are managing many connections across a team, consider using a password manager or a centralized configuration system instead of relying on individual Workbench installations. This makes it easier to rotate passwords, audit access, and onboard new team members.
Frequently Asked Questions
Can I see the actual password if I open connections.xml in a text editor?
No. The password field in connections.xml is encrypted and will display as unreadable characters. You can see the username and connection name in plain text, but the password itself is protected. To verify or reset a password, use Workbench's Edit Connection dialog or reset it through the MySQL server.
What if I do not remember which connection goes with which database?
Open MySQL Workbench, right-click each connection, and select Edit Connection. The connection name, hostname, port, and username will all be visible. You can also click Test Connection to see if it works. Write down the details for your records so you do not lose track again.
Is it safe to store passwords in Workbench?
For local development on your own computer, yes — the passwords are encrypted and stored locally. For production databases or shared servers, no — use environment variables, a secrets manager, or a separate configuration file with restricted file permissions instead. Never commit passwords to version control.
How do I change a password I have already stored in Workbench?
Open Workbench, right-click the connection, select Edit Connection, enter the new password in the password field, and click Test Connection to verify it works. Click OK to save. The new password will be encrypted and stored in connections.xml.
What if the connections.xml file does not exist on my system?
The file is created the first time you save a connection in Workbench. If you have never saved a connection, the file will not exist yet. Create a new connection in Workbench, enter your credentials, and save it — the connections.xml file will be generated automatically in the correct location for your operating system.