Learning Mysql


Client Programs Can’t Connect to the Server



Download 4.24 Mb.
View original pdf
Page77/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   73   74   75   76   77   78   79   80   ...   366
Learning MySQL
Client Programs Can’t Connect to the Server
Consider these questions. Did you use the correct username and password Since the default MySQL installation doesn’t have a password set, it is easy to be confused when passwords are enabled. For the MySQL command-line tools, try using the user and password options. If you’ve forgotten your password, try resetting it by following the steps of Resetting Forgotten MySQL Passwords in Chapter 9.
What If Things Don’t Work | 79


2. Is the server running Try running the command mysqladmin status from a terminal window or command prompt. If connecting to a server on localhost
, do you have filesystem access to the socket file The socket file is normally created as /tmp/mysql.sock but can be created in any location specified when the server was started. If it’s created in a directory that some users can’t access—for example, in the MySQL server’s data directory—
these users won’t be able to connect to the server. For the MySQL command-line tools, use the socket option to specify a custom socket path. If connecting to a server on a host other than localhost
, is the server running on a port other than 3306? You should specify the same port to the client as the one you specified when starting your server if you don’t administer the server, ask the system administrator to tell you the correct port number. For the MySQL com- mand-line tools, use the port option to specify a custom port number. If connecting to a server on a host other than localhost
, is it configured to accept network connections Ensure that the server was not started with the skip-net working option on the command line or in an options file (we discuss options files in Chapter 11).
6. If connecting to a server on a host other than localhost
, is a firewall preventing network connections Firewall software or hardware maybe preventing connections to the port on which MySQL listens for incoming connections (the default port is 3306). To fix this, you need to modify the firewall so that connections on this port are allowed. Firewalls vary between networks and platforms, and you’ll need to refer to your documentation or discuss with your system administrator how to make these changes to your network or host-based firewall. Any firewall changes should be considered carefully to balance feature and security requirements.

Download 4.24 Mb.

Share with your friends:
1   ...   73   74   75   76   77   78   79   80   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page