GNU Info

Info Node: (mysql.info)Windows running

(mysql.info)Windows running


Next: Windows and SSH Prev: NT start Up: Windows
Enter node , (file) or (file)node

Running MySQL on Windows
........................

MySQL supports TCP/IP on all Windows 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:

*Host name* *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 or by specifying `.' as the host name.  Use the
`--socket' option to specify the name of the pipe.

Note that starting from 3.23.50, named pipes are only enabled if mysqld
is started with with `--enable-named-pipe'.  This is because some users
have experienced problems shutting down the MySQL server when one uses
named pipes.

You can test whether or not MySQL is working by executing the following
commands:

     C:\> C:\mysql\bin\mysqlshow
     C:\> C:\mysql\bin\mysqlshow -u root mysql
     C:\> C:\mysql\bin\mysqladmin version status proc
     C:\> C:\mysql\bin\mysql test

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 Windows, 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:\mysql\lib\cygwinb19.dll' to your Windows system directory
(`\windows\system' or similar place).

The default privileges on Windows give all local users full privileges
to all databases without specifying a password.  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. The following
example starts by removing the anonymous user that can be used by anyone
to access the `test' database, then sets a `root' user password:

     C:\> C:\mysql\bin\mysql mysql
     mysql> DELETE FROM user WHERE Host='localhost' AND User='';
     mysql> QUIT
     C:\> C:\mysql\bin\mysqladmin reload
     C:\> C:\mysql\bin\mysqladmin -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:

     C:\> mysqladmin --user=root --password=your_password shutdown

If you are using the old shareware version of MySQL Version 3.21 under
Windows, the above command will fail with an error: `parse error near
'SET OPTION password''.  The fix is in to upgrade to the current MySQL
version, which is freely available.

With the current MySQL versions you can easily add new users and change
privileges with `GRANT' and `REVOKE' commands.  Note: GRANT.


automatically generated by info2www version 1.2.2.9