Connection errors (MySQL)
Question
When running the script, I get an error message that says Got an error: Bad ObjectDriver config: Connection error: [some error].
Answer
Too many connections
Your MySQL server is not permitting any more connections to your database; you'll need to contact your host for resolution of this error.
Can't connect to local MySQL server through socket '/path/to/socket'
- If your SQL database server is on localhost, but the socket is not in a standard location, you'll need to set the path using the DBSocket directive in
mt-config.cgi1:DBSocket /path/to/mysql.sock - If your SQL database server is not local, you should be using the DBHost directive in
mt-config.cgito specify the location of the server:
replacingDBHost database_hostdatabase_hostwith the proper hostname.
Access denied for user: 'username@hostname' (Using password: YES)
- Make sure that you set your password in
mt-config.cgi2:DBPassword database_passwordYou should replace
database_passwordwith your actual password, and also make sure that you have uncommented the directive3. - Make sure you uploaded
mt-config.cgito your server in ASCII mode and to the same folder wheremt.cgiis located. - Make sure that you associated
usernamewith the database you have created with the same password you designated inmt-config.cgi. - Make sure that you granted
usernamefull privileges to the database.
Access denied for user: 'username@hostname' (Using password: NO)
This means the connection attempt is being made without a password. Make sure that you set your password in mt-config.cgi2:
DBPassword database_password
You should replace database_password with your actual password, and also make sure that you have uncommented the directive3.
Access denied for user: '@hostname'
The database username is missing from the error message, which indicates some directives may not have been specified correctly in mt-config.cgi1. Before editing, the relevant lines in mt-config.cgi look like this:
# ObjectDriver DBI::mysql
# Database <database-name>
# DBUser <database-username>
# DBHost localhost
Note that the <database-name> and <database-username> sections should be replaced with the correct information; in other words, you should not leave the < and > symbols in place when substituting your database and user names. You must also uncomment each of these directives3.
Client does not support authentication protocol requested by server; consider upgrading MySQL client
A change was made in MySQL 4.1 and higher to the password authentication process, and this change is not backward-compatible. Every MySQL client has to be updated in order to work with this new version of MySQL.
The DBD::mysql module is the "MySQL client" in this case, and it has not yet been updated for this change, so you will need to either 1) reset the password to pre-4.1 style for your database user, or 2) tell the server to use the older password hashing algorithm. Instructions for both of these options are included in the MySQL documentation for this error message.
1 In versions prior to 3.2, the configuration file is named mt.cfg.
2 In versions prior to 3.2, the password is set separately in mt-db-pass.cgi.
3 To uncomment a directive means to remove the # from the beginning of the line where it appears.


