On Windows, the data directory and the grant tables do not have
to be created. MySQL Windows distributions include the grant
tables with a set of preinitialized accounts in the
mysql database under the data directory. It
is unnecessary to run the mysql_install_db
script that is used on Unix. Regarding passwords, if you
installed MySQL using the Windows Installation Wizard, you may
have already assigned passwords to the accounts. (See
Section 2.3.3, “Using the MySQL Installation Wizard”.) Otherwise, use the
password-assignment procedure given in
Section 2.10.3, “Securing the Initial MySQL Accounts”.
Before setting up passwords, you might want to try running some client programs to make sure that you can connect to the server and that it is operating properly. Make sure that the server is running (see Section 2.3.9, “Starting the Server for the First Time”), and then issue the following commands to verify that you can retrieve information from the server. The output should be similar to what is shown here:
C:\>C:\mysql\bin\mysqlshow+-----------+ | Databases | +-----------+ | mysql | | test | +-----------+ C:\>C:\mysql\bin\mysqlshow mysqlDatabase: mysql +---------------------------+ | Tables | +---------------------------+ | columns_priv | | db | | func | | help_category | | help_keyword | | help_relation | | help_topic | | host | | proc | | procs_priv | | tables_priv | | time_zone | | time_zone_leap_second | | time_zone_name | | time_zone_transition | | time_zone_transition_type | | user | +---------------------------+ C:\>C:\mysql\bin\mysql -e "SELECT Host,Db,User FROM db" mysql+------+-------+------+ | host | db | user | +------+-------+------+ | % | test% | | +------+-------+------+
If you are running a version of Windows that supports services and you want the MySQL server to run automatically when Windows starts, see Section 2.3.11, “Starting MySQL as a Windows Service”.

User Comments
For me, the "Access denied" was because, unlike the examples in the documentation, for every command I have to supply the --user="root" --password="password goes here"
Also, while I get the same output from the other example commands, from the Select, while there are no errors, I do not see the contents of the table listed. Might the table be empty in some builds?
You can enter the commands as shown here only if you have elected to create an Anonymous Account when configuring the server. Otherwise you must enter the commands using the -u and -p switches.
if you have not created an anonymous account while installation, the command would be:
mysqlshow -uroot -pyourpassword
To do basic queries type:
mysql -uroot -pyourpassword
To use the test schema, type the following:
use test
Note that this page still uses the old installation directory. With the new windows installation you need "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql" -e "SELECT Host,Db,User FROM db" mysql -uroot -p<yourpassword>
I don't get any returned rows either.
Add your own comment.