MySQL supports TCP/IP on all Win32 platforms and named pipes on NT. The default is to use named pipes for local connections on NT and TCP/IP for all other cases if the client has TCP/IP installed. The host name specifies which protocol is used:@:
| protocol | |
| NULL (none) | On NT, try named pipes first; if that doesn't work, use TCP/IP. On Win95/Win98, TCP/IP is used. |
| . | Named pipes |
| localhost | TCP/IP to current host |
| hostname | TCP/IP |
You can force a MySQL client to use named pipes by specifying the
--pipe option. Use the --socket option to specify the name of
the pipe.
You can test whether or not MySQL is working by executing the following commands:@:
C:@:mysqlbinmysqlshow C:@:mysqlbinmysqlshow -u root mysql C:@:mysqlbinmysqladmin version status proc C:@:mysqlbinmysql test
By default, MySQL-Win32 is configured to be installed in
`C:@:mysql'. If you want to install MySQL elsewhere, install it
in `C:@:mysql', then move the installation to where you want it. If you
do move MySQL, you must tell mysqld where everything is by
supplying options to mysqld. Use C:@:mysqlbinmysqld --help to
display all options! If, for example, you have moved the MySQL
distribution to `D:@:programsmysql', you must start mysqld with:
D:@:programsmysqlbinmysqld --basedir D:programsmysql
With the registered version of MySQL, you can also create a
`C:@:my.cnf' file that holds any default options for the
MySQL server. Copy the file `mysqlmy-example.cnf' to
`C:@:my.cnf' and edit this to suit your setup. Note that you should
specify all paths with / instead of . If you use
, you need to specify this twice, as is the escape
character in MySQL.
4.15.4 Fichier d'options.
If mysqld is slow to answer to connections on Win95/Win98, there is
probably a problem with your DNS. In this case, start mysqld with
--skip-name-resolve and use only localhost and IP numbers in
the MySQL grant tables. You can also avoid DNS when connecting to a
mysqld-nt MySQL server running on NT by using the
--pipe argument to specify use of named pipes. This works for most
MySQL clients.
There are two versions of the MySQL command line tool:@:
mysql | Compiled on native Win32, which offers very limited text editing capabilities. |
mysqlc | Compiled with the Cygnus GNU compiler and libraries, which offers readline editing.
|
If you want to use mysqlc.exe, you must copy
`C:@:mysqllibcygwinb19.dll' to `windowssystem' (or similar
place).
The default privileges on Win32 give all local users full privileges
to all databases. To make MySQL more secure, you
should set a password for all users and remove the row in the
mysql.user table that has Host='localhost' and
User=''.
You should also add a password for the root user:@:
C:@:mysqlbinmysql mysql mysql> DELETE FROM user WHERE Host='localhost' AND User=''; mysql> QUIT C:@:mysqlbinmysqladmin reload C:@:mysqlbinmysqladmin -u root password your_password
After you've set the password, if you want to take down the mysqld
server, you can do so using this command:@:
mysqladmin --user=root --password=your_password shutdown