including : import data package size, password security policy level, root initialization password
.mysql_secret file and version 5.7 The first method: find the password in the installation log of /var/log/mysqld.log with following command grep -i 'a temporary password' mysqld.log The second method is to enable skip-grant- tables mode, specific: 1. In the /etc/my.cnf file [mysqld] skip-grant-tables=1 2. Then log in to mysql -uroot 3. Change the password: update user set authentication_string = password('root'), password_expired = 'N', password_last_changed = now() where user = 'root'; 4. Exit, restore my.cnf #skip-grant-tables=1 5. Restart mysqld, note that mysql"d" service mysqld stop
![](http://dl2.iteye.com/upload/attachment/0121/8296/2de78172-124c-3097-b642-0e4d52b52509.png)
service mysqld start
2. The password security policy, the default is mediumn, that is, more than 8 digits, special characters in upper and lower case data, it is very painful to set a password like this in the development environment, so I immediately changed it to the low
command
show variables like '%policy%';
set global validate_password_policy=0;
![](http://dl2.iteye.com/upload/attachment/0121/8299/4807dd7b-f6af-348d-a498-66bddac0f5c9.png)
3. Change the password
before version 5.7. The password field is password
![](http://dl2.iteye.com/upload/attachment/0121/8303/cac22be8-f87e-3085-861f-2417ab5943e1.jpg)
4. The maximum import packet size is only 16m by default, and an error will be reported when importing a larger packet
Command :
set global max_allowed_packet= 1024*1024*1024; //Note that the unit here is byte
show variables where variable_name= 'max_allowed_packet';
![](http://dl2.iteye.com/upload/attachment/0121/8396/16b397a0-17c1-3fcf-a4c7-d521c0de3de0.png)