Download and install mysql on windows


download link

you will need a OTN account for log in and download, if you do not have a one, you can sign up for  free.
download the installation file, double click to run the installation, select all default options, at the end of the installation, you will be prompt for the configuration.

once complete, launch the configuration tool

click next

choose standard since this is a new installation, click next

choose window service for easier management, you can start MySQL automatically by check the checkbox above, or you can uncheck it but launch the service only when you need it, I also will check the “include bin directory ..” to enable command line operations, so I choice will look like

click next

enter root (db admin user) password and confirm the password, check enable root access from remote to allow you to connect to this MySQL server from remote host (such as another laptop ), click next to continue.

click execute to run.

click finish, done!

==== check the server is running====


=== connect to server ===

launch command line and connect by type in “MySQL -u root -p ”

it will prompt for password

enter password, and get connected

show the existing databases;

connect to database test and show the tables;

no tables, create a dummy table and insert one row of data;

since we log in with root, we should create a new user and grant privileges on the db “test” to the new user, you can grant select, insert, update, delete (any combination), or you can grant all to the new user.

flush privileges to make the privileges enabled immediately.

log out root account and try to log in using the new account

able to connect, now let’s try to test the access

notice this user has access only to the two databases;

try couple of more operations and check the privs

so good so far.