Indiana University

IU Webmaster

MySQL Frequently Asked Questions

Correcting Common Errors

Account Related Questions

Access denied for user error

The error message is similar to this:

Warning: Access denied for user: 'username@lux.uits.indiana.edu' 
  (Using password: YES) in /ip/account_name/wwws/index.php on line 5

This means that the user, in this case "username", does not have the privileges necessary to access the MySQL database from lux (one of several backend webservers).

Correction

Grant privileges to the username specified in the error message. Instructions on how to grant privileges can be found at: MySQL User Privileges

Back to Top


Access denied for user: 'username@localhost' error

This error may occur when attempting to execute the following command on the MySQL server:

mysql -u username -p
The access denied error message indicates that "username" as specified in the command above does not have privileges to access the database.

Correction
Grant the username the appropriate privileges. For example:

mysql> GRANT ALL ON *.* to username@localhost IDENTIFIED BY 'password';

You may opt which privileges are set by replacing "ALL" with the specific privileges that should be granted. You may also restrict privileges to a specific database rather than all by substituting "*.*" with the name of the database/table for which these privileges should apply.

For more information on granting privileges and the various options available, see: MySQL User Privileges.

Back to Top


'Unblock with mysqladmin flush-hosts' error

The error message is similar to this:

Error connecting to MYSQL server. Host 'lux.uits.indiana.edu' is
blocked because of many connection errors.  Unblock with 'mysqladmin
flush-hosts'
Correction
Login to your account on the MySQL server (mysql.iu.edu) and stop and restart your MySQL server. For information on how to stop/restart your server, see:
Starting/Stopping the MySQL server for your account

Back to Top


Error 28 from table handler message
This error message is usually accompanied by a message that indicates a space issue.
Correction
While this error message indicates a space issue, there are no disk quota enabled on mysql.iu.edu or mysql-test.iu.edu. It may be that your .my.cnf file needs some adjustment to accommodate more temporary tables during queries, etc. The .my.cnf file is located in the login directory of your account on mysql.iu.edu or mysql-test.iu.edu. Please be cautious when making edits to this file. It is recommended that you create a backup of the original file before making any changes to it in the event you should need to revert back to the original.

Back to Top


Forgotten port number

The .my.cnf file in your account on the MySQL server contains your port number. Login to either mysql.iu.edu or mysql-test.iu.edu (depending upon which port number you are trying to obtain) and view the .my.cnf file taking care not to make any edits to this file. The port number is listed in multiple places within this file.

If you have any difficulty locating the port number, you may also contact IU Webmaster to obtain this information.

Back to Top


Unable to login to mysql.iu.edu with the port number provided

The MySQL port number is the port number for your MySQL server process which should be used by your web applications on Webserve in order to access your MySQL server. When making an SSH connection, such as with the PuTTY client, a port number (22) is referenced. You should not change this port number. Changing this port number will prevent you from being able to login to your account.

Back to Top