MySQL's install

Uhh.. Today when I was thinking about the problems in sqli-labs, I asked myself: can you operate MySQL in cmd?
My answer is no hahahaha

So this is a tutorial about how to install MySQL

0x01 install
The first step is to download .zip from MySQL's official website, I use windows system, so I download the 8.0.22 for winx64 version.
then unzip it into service. I chose D://

then the second step, I created an ini file which calls my.ini
then write these into the file:
[client]
default-character-set=utf8

[mysqld]
port = 3306
basedir=D:\\mysql\\mysql-8.0.22-winx64

This is in order to deploy the basic settings of MySQL.

Then the third step:
run cmd.exe by administrator's identity
then change the location to D:\mysql\mysql-8.0.22-winx64\bin (use cd command)
then we need to initialize the SQL
mysqld --initialize --console
then we get the initial password of root@localhost
2020-12-07T08:35:57.308605Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 9XdTwRh%<qIT
then
mysqld install
net start mysql



Since then we successfully install MySQL into our service.

0x02 log in and manage
mysql -u root -p
then enter the initial password

then we must modify our password, or we can't run any command.
ALTER USER 'root'@'localhost' IDENTIFIED BY '(your new password)';

then quit and log in again.
After then we can use SQL commands.

posted @ 2020-12-07 17:27  ChristopherWu  阅读(52)  评论(0编辑  收藏  举报