Fix MySQL ODBC Access Denied No Password Supplied Error in Excel
Question details
The user needs to resolve an issue where Excel fails to connect to a MySQL database via ODBC due to an access denied error, despite the ODBC connection test succeeding.
- Product
- Excel
- Device & OS
- not provided
- Scenario
- Importing data from a MySQL database into Excel using an ODBC connection.
- Observed behavior
- The MySQL ODBC connection test succeeds in the setup window, but Excel reports 'Access denied for user' and indicates that no password was supplied when attempting to load the data.
Ensure you have the correct MySQL server IP, database name, username, and password on hand. Verify that your MySQL server is configured to accept remote connections from your client machine's IP address.
Reconfigure and Verify ODBC Data Source Credentials
Manually re-enter and save the authentication credentials directly in the ODBC Data Source Administrator to ensure the application passes the password correctly.
Often, the ODBC Administrator caches the password for the connection test but fails to save it properly in the connection string used by third-party applications. Re-saving the configuration forces the credentials to be registered.
Press the Windows key, type 'ODBC Data Sources', and open the application matching your Excel bit-version (32-bit or 64-bit).
Navigate to the 'System DSN' or 'User DSN' tab, select the MySQL connection you configured for Excel, and click the 'Configure' button.
Clear the existing password field and carefully retype the correct database password. Ensure the 'User' field contains the correct MySQL username.
Click 'Test' to confirm the connection succeeds, then click 'OK' to save the updated settings. Restart Excel and attempt the data import again.
Grant Appropriate MySQL User Remote Permissions
Adjust the database server settings to ensure the user account is explicitly allowed to connect from the client's host IP address.
Import External Database Data Seamlessly with WPS Office
WPS Spreadsheet provides a straightforward interface for connecting to external databases via ODBC, ensuring secure and stable data imports for your reports without complex configuration errors.
- 1. Open WPS Spreadsheet: Launch WPS Office and open a new or existing Spreadsheet document.
- 2. Access Data Import: Navigate to the 'Data' tab on the top ribbon and click on 'Import Data'.
- 3. Select ODBC Connection: Choose 'ODBC DSN' as your data source type from the available options.
- 4. Load Data: Select your configured MySQL database, input your query, and load the data directly into your worksheet.

Frequently Asked Questions
Why does the ODBC test succeed but Excel still fails to connect?
The ODBC Administrator tool securely caches the password during the setup test. However, for security reasons, the password is not always passed through the DSN registry string to third-party applications like Excel. You may need to embed the password in the Excel connection string or set it to prompt you upon refresh.
Does WPS Spreadsheet support MySQL database connections?
Yes, WPS Spreadsheet supports connecting to MySQL and other relational databases through the standard ODBC Data Source interface available in the Windows operating system.
How do I force Excel to ask for the database password?
In Excel, go to Data > Queries & Connections. Right-click your connection, select Properties, and under the Definition tab, clear the saved password from the connection string or check the box to 'Save password' if you want it to remember the credentials permanently.
What does 'Access denied for user' mean in MySQL?
This error means the MySQL server rejected the connection attempt. This is typically caused by an incorrect password, a misspelled username, or the user lacking the necessary host permissions to connect from that specific client IP address.




