Troubleshooting Problems Connecting to MySQL •Check to make sure that there is no firewall blocking access to MySQL. Your firewall may be configured on the basis of the application being executed, or the port number used by MySQL for communication (3306 by default). Under Linux or Unix, check your IP tables (or similar) configuration to ensure that the port has not been blocked. Under Windows, applications such as ZoneAlarm or Windows Firewall may need to be configured not to block the MySQL port. •The grant tables must be properly set up so that the server can use them for access control. For some distribution types (such as binary distributions on Windows, or RPM and DEB distributions on Linux), the installation process initializes the MySQL data directory, including the  mysql  system database containing the grant tables. For distributions that do not do this, you must initialize the data directory manually. For details, see Section 2.10, “Postinstallation Setup and Testing” . To determine whether you need to initialize the grant tables, look for a  mysql  directory under the data directory. (The data directory normally is named  data  or  var  and is located under your MySQL installation directory.) Make sure that you have a file named  user.MYD  in the  mysql  database directory. If not, initialize the data directory. After doing so and starting the server, you should be able to connect to the server. •After a fresh installation, if you try to log on to the server as  root  without using a password, you might get the following error message. shell>  mysql -u root  ERROR 1045 (28000): Access denied for user ’root’@’localhost’ (using password: NO) shell>  mysql -u root -p Enter password: shell>  mysql Client does not support authentication protocol requested by server; consider upgrading MySQL client However, the server is going to let you connect as  root  without using a password if you have initialized MySQL using  mysqld --initialize-insecure  (see Section 2.10.1, “Initializing the Data Directory”  for details). That is a security risk, so you should set a password for the  root  account; see Section 2.10.4, “Securing the Initial MySQL Account”  for instructions. It means a root password has already been assigned during installation and it has to be supplied. See Section 2.10.4, “Securing the Initial MySQL Account”  on the different ways the password could have been assigned and, in some cases, how to find it. If you need to reset the root password, see instructions in Section B.3.3.2, “How to Reset the Root Password” . After you have found or reset your password, log on again as  root  using the  --password  (or  -p ) option: •If you have updated an existing MySQL installation to a newer version, did you perform the MySQL upgrade procedure? If not, do so. The structure of the grant tables changes occasionally when new capabilities are added, so after an upgrade you should always make sure that your tables have the current structure. For instructions, see Section 2.11, “Upgrading MySQL” . •If a client program receives the following error message when it tries to connect, it means that the server expects passwords in a newer format than the client is capable of generating: • Remember that client programs use connection parameters specified in option files or environment variables. If a client program seems to be sending incorrect default connection parameters when you have not specified them on the command line, check any applicable option files and your environment. For example, if you get  Access denied  when you run a client without any options, make sure that you have not specified an old password in any of your option files! You can suppress the use of option files by a client program by invoking it with the  --no-defaults option. For example: 1275