Mysql5.7.21 installation and configuration tutorial,
Simple installation and configuration of mysql5.7.21 are as follows:
1. Install MySQL
1. Download community edition from the official website
2. Extract To drive C: \ mysql-5.7.21-winx64
3. Run the command line as administrator and enter the directory C: \ mysql-5.7.21-winx64 \ bin
4. register the service: C: \ mysql-5.7.21-winx64 \ bin> mysqld install mysql5.7.21
5. initialize the database: C: \ mysql-5.7.21-winx64 \ bin> mysqld -- initialize
6. start Database: C: \ mysql-5.7.21-winx64 \ bin> net start mysql5.7.21
7. log on to the database: C: \ mysql-5.7.21-winx64 \ bin> mysql-u root-p
Note that the logon password is in the mysql installation directory *. find in the err file, for example, the red character 2018-01-17T09: 26: 11.260249Z 1 [Note] A temporary password is generated for root @ localhost: _ = (H ,? PX.7yZ
8. Modify the root user password: C: \ mysql-5.7.21-winx64 \ bin> mysqladmin-uroot-p _ = (H ,? PX.7yZ password 1234
Ii. MySQL Configuration
1. Create C: \ mysql-5.7.21-winx64 \ my. ini, the file content is as follows:
[Mysqld] # Set port 3306 port = 3306 # Set mysql installation directory basedir = C: \ mysql-5.7.21-winx64 # Set the mysql database data storage directory datadir = C: \ mysql-5.7.21-winx64 \ data # maximum number of connections allowed max_connections = 200 # the character set used by the server defaults to an 8-bit latin1 character set character-set-server = utf8 # The default storage that will be used when creating a new table engine default-storage-engine = INNODB # Set to strict mode SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [mysql] # set the default character set of the mysql client default-character-set = utf8
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.