Install WAMP (Windows-Apache-MySQL-PHP) with ZIP packages – (3)

The article is one of a series articles, for more information, please have a look at: Install WAMP (Windows-Apache-MySQL-PHP) with ZIP packages – (1)

MySQL

We use Windows (x86, 32-bit), ZIP Archive (mysql-5.5.19-win32.zip).

1. Extact

Extract all files in the ZIP package to D:\Tools\MySQL

copy my-medium.ini or any of your preferred example ini files to my.ini

Add the following lines to [mysqld] section of my.ini:

# set basedir to your installation path
basedir="D:/Tools/MySQL
# set datadir to the location of your data directory
datadir="D:/Tools/MySQL/data"

2. Start MySQL first time and set root password

In cmd,

D:\Tools\MySQL\bin\mysqld.exe --console

In another cmd, we can set password and shut the server down

D:\Tools\MySQL\bin\mysqladmin -u root password "YourPassword"
D:\Tools\MySQL\bin\mysqladmin -u root -p"YourPassword" shutdown

NOTE: In the second command, there is no space between “p” and “YourPassword”

3. Install as service

D:\Tools\MySQL\bin\mysqld.exe --install
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s