Download mysql
Download it from here:
dev.mysql.com/downloads/m…
Install mysql
- unzip it and open terminal (run as administrator)
- change directory to xxx-mysql-xxxx/bin
$ cd <your mysql path>/bin
- create my.ini and set basedir and datadir
# xxxx-mysql/bin/my.ini
basedir=<your mysql path>/bin
datadir=<your mysql path>/data
- create data folder under /bin
- initialize mysql
$ mysqld --initialize
will get temperate passcode under file data/xxx.err
- install mysql
$ mysqld --install
Start server
$ net start mysql
Use temperaty password access mysql db
$ mysql -u root -p # then input the temperary password
change password
$ mysqladmin -uroot -proot password <newpassword>