Home > database >  The mysql database local structures, and change the password
The mysql database local structures, and change the password

Time:10-13

Database building and its change password
1, in the mysql database: https://dev.mysql.com/downloads/mysql/
2, the downloaded file decompression, without having to install
3. Under this folder, new data folder and my ini file

4. To configure my. Ini
[mysqld]
# set port
Port=3306
# set the mysql installation directory
Basedir=D: \ \ sw \ \ mysql - 8.0.19 - winx64
# set of mysql data storage directory
Datadir=D: \ \ sw \ mysql - 8.0.19 - winx64 \ \ data
# to allow maximum number of connections
Max_connections=200
# allows the number of connection fails, this is to prevent someone from the host trying to attack database
Max_connect_errors=10
# server you use utf8 to set the default
Character - set - server=utf8
# to create a new table will use the default storage engine
Default - storage - engine=INNODB
[mysql]
# set the mysql client default character set
Default - character - set=utf8
[client]
# set the mysql client connect to the server when the default ports used
Port=3306
Default - character - set=utf8

5, configure the environment variablesNote: the configuration to the bin directory
6, as an administrator to open the CMD window and jump to mysql under the bin directory of

7, initialization command, get a temporary password
Mysqld - the initialize - user=mysql - the console

8, MySQL to registration to the service
Mysqld - install

9. Start the MySQL server
Net start mysql

10. Login MySQL
Mysql -u root -p # root is the meaning of the user, the -p is input password

11, modify the password (mysql command case-insensitive)
The alter user 'root' @ 'localhost' identified by '111111'.










  • Related