mysql5.7

The mysql5.7 version has changed a lot from the original,
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
























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;


3. Change the password
before version 5.7. The password field is password




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';




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326535931&siteId=291194637