1、 MySQL installation

  1. Download community version on official website

  2. Unzip to Disk C: C:\mysql-5.7.21-winx64

  3. Run the command line as an administrator and enter the directory C:\mysql-5.7.21-winx64\bin

  1. Registration service:C:\mysql-5.7.21-winx64\bin>mysqld install mysql5.7.21

  2. Initialize database: C:\mysql-5.7.21-winx64\bin>mysqld --initialize

  3. Startup database:C:\mysql-5.7.21-winx64\bin>net start mysql5.7.21

  4. Sign database:C:\mysql-5.7.21-winx64\bin>mysql -u root -p

Note: the login password can be found in the *. err file of MySQL installation directory, for example, the red character: 2018-01-17T09:26:11.260249Z 1 [Note] A temporary password is generated for root@localhost: _=(H,?pX.7yZ

  1. update root user password:C:\mysql-5.7.21-winx64\bin>mysqladmin -u root -p _=(H,?pX.7yZ password 1234

2、 MySQL configuration

Create C:\mysql-5.7.21-winx64\my.ini by yourself. The contents of the file are as follows:

#Set 3306 port
port = 3306
#Set the installation directory of MySQL
#Set the storage directory of MySQL database data
#Maximum connections allowed
#The character set used by the server defaults to the 8-bit Latin1 character set
#Default storage engine to use when creating new tables
#Set to strict mode

#Set MySQL client default character set
Like The Article To View All

All Comments

Leave a Reply Cancel Reply

Tips: Your email address will not be disclosed!

If you can't see clearly,please click to change...