Oracle 5.0 Reference Manual page 2967

Table of Contents

Advertisement

Common Errors When Using MySQL Programs
If the MySQL server is running on Windows, you can connect using TCP/IP. If the server is started with
the
--enable-named-pipe
on the host where the server is running. The name of the named pipe is
not give a host name when connecting to mysqld, a MySQL client first tries to connect to the named
pipe. If that does not work, it connects to the TCP/IP port. You can force the use of named pipes on
Windows by using
as the host name.
.
The error (2002)
Can't connect to ...
on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when
trying to connect to the server. You should also check that the TCP/IP port you are using has not been
blocked by a firewall or port blocking service.
The error (2003)
Can't connect to MySQL server on 'server' (10061)
network connection has been refused. You should check that there is a MySQL server running, that it
has network connections enabled, and that the network port you specified is the one configured on the
server.
Start by checking whether there is a process named
on Unix or the Task Manager on Windows.) If there is no such process, you should
| grep mysqld
start the server. See
Section 2.18.1.3, "Starting and Troubleshooting the MySQL
If a
process is running, you can check it by trying the following commands. The port number
mysqld
or Unix socket file name might be different in your setup.
machine where the server is running.
shell>
mysqladmin version
shell>
mysqladmin variables
shell>
mysqladmin -h `hostname` version variables
shell>
mysqladmin -h `hostname` --port=3306 version
shell>
mysqladmin -h host_ip version
shell>
mysqladmin --protocol=SOCKET --socket=/tmp/mysql.sock version
Note the use of backticks rather than forward quotation marks with the
cause the output of
hostname
command. If you have no
the host name of your machine (without backticks) following the
to connect with TCP/IP to the local host.
127.0.0.1
Make sure that the server has not been configured to ignore network connections or (if you are
attempting to connect remotely) that it has not been configured to listen only locally on its network
interfaces. If the server was started with
connections at all. If the server was started with
TCP/IP connections only locally on the loopback interface and will not accept remote connections.
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 the
Windows XP personal firewall may need to be configured not to block the MySQL port.
Here are some reasons the
is not running on the local host. Check your operating system's process list to ensure the
mysqld
process is present.
mysqld
• You're running a MySQL server on Windows with many TCP/IP connections to it. If you're
experiencing that quite often your clients get that error, you can find a workaround here:
Section C.5.2.2.1,
"Connection to MySQL Server Failing on
• Someone has removed the Unix socket file that
example, you might have a
run
mysqladmin version
[407]
option, you can also connect with named pipes if you run the client
normally means that there is no MySQL server running
(that is, the current host name) to be substituted into the
command or are running on Windows, you can manually type
hostname
--skip-networking
--bind-address=127.0.0.1
Can't connect to local MySQL server
job that removes old files from the
cron
to check whether the Unix socket file that
2947
MySQL
running on your server host. (Use
mysqld
represents the IP address of the
host_ip
hostname
option. You can also try
-h
[421], it will not accept TCP/IP
Windows".
uses
(/tmp/mysql.sock
mysqld
/tmp
mysqladmin
by default. If you do
indicates that the
ps xa
Server".
command; these
mysqladmin
-h
[401], it will listen for
error might occur:
by default). For
directory. You can always
is trying to use

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents