MySQL Frequently Asked Questions
Table of Contents
-
Why am I getting the Access denied for user
message, when trying to connect to MySQL DB with a PHP script?
Why am I getting Access denied for user: 'user_name@localhost'?
I am getting an error message telling me to 'Unblock with mysqladmin flush-hosts'. What should I do?
How can I make MySQL user friendly? What program can I use as an Interface?
I forgot my port number. Can you help me find my port number?
I cannot login to mysql.iu.edu using the port number you provided.
I got an error 28 from table handler message. It seems to be related to not having enough space. What should I do?
Why am I getting the Access denied for user message when trying to connect to MySQL DB with a PHP script in my web account or when using phpMyAdmin?
The message like the following,
Warning: Access denied for user: 'newUser@lux.uits.indiana.edu' (Using password: YES) in /ip/account_name/wwws/index.php on line 5
means that the user, newUser, does not have the right (privilege) to access your MySQL Database from lux (one of several backend webservers).
To fix it, grant the access rights to the user to the DB named firstDB, using the following command (replace firstDB with your DB name, newUser with your user name, and password with the password for the newUser):
mysql> GRANT select,insert,update,delete on firstDB.* -> to newUser@'129.79.78.%' IDENTIFIED BY 'password';
Please note that you need to use the single quotation marks around the IP address and the password.
For additional information on this topic, see MySQL User Privileges
Why am I getting an error message like Access denied for user: 'user_name@localhost'?
You may get this error message, after logging in to your MySQL account using SSH and with the command,
mysql -u user_name -pYou are getting this error , because the user, user_name, does not have the right to access your MySQL DB. To fix it, you need to create a user, using the following command (Replace firstDB with your database name,
user_name with your user name,
and password with the user's password).
mysql> GRANT ALL ON *.* to user_name@localhost IDENTIFIED BY 'password';For additional information on this topic, see MySQL User Privileges
I am getting an error message telling me to 'Unblock with mysqladmin flush-hosts'. What should I do?
If you are getting an error message like the following:
"Error connecting to MYSQL server. Host 'lux.uits.indiana.edu' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'"You should login to your account on the MySQL servers (mysql.iu.edu or mysql-test.iu.edu) and stop and restart your MySQL instance. For instructions on this see: http://webmaster.iu.edu/tool_guide_info/mysql/mysql.shtml#j
How can I make MySQL user friendly? What program can I use as an Interface?
You can use a web-based MySQL administration program PhpMyAdmin. You can easily install it in your Webserve account following our phpMyAdmin Setup Guide.
I forgot my port number. Can you help me find my port number?
The .my.cnf file contains your port number. The .my.cnf file is located in the login directory of your account on Janus (mysql.iu.edu) or Europa (mysql-test.iu.edu).
I cannot login to mysql.iu.edu with the port number you provided.
You should not use the port number you've got with the passwords, when you are making an SSH connection in order to log in to your account on mysql.iu.edu. You should just let the SSH program set the port number itself.
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.
I got an error 28 from table handler message. It seems to be related to not having enough space. What should I do?
There are no disk quotas 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 Janus (mysql.iu.edu) or Europa (mysql-test.iu.edu).



