1. Set the password for all root users:
mysql> SET PASSWORD
mysql> Update Mysql.user SET password=password ("your_passwd") where user= ' root ';
# mysqladmin
2. Delete all anonymous users
mysql> DROP USER ' @ ' localhost ';
The two steps above can run the command: Mysql_secure_installation
3, recommended to turn off the host name reverse solution function
Skip-name-resolve
MySQL client program
mysql: Interactive CLI tools
mysqldump: Backup utility that initiates a query request based on the MySQL protocol like MYSQLD and saves all the data that was found into a text file, such as Insert
mysqladmin: mysqld based on MySQL protocol management
Mysqlimport: Data import Tool
MySQL non-client class management tools:
myisamchk: Tools to check and organize the repair of MyISAM tables
Myisampack: A tool to package the MyISAM table for compression (the packaged table can only perform query operations)
Check the configuration that MySQL uses by default:
MySQL--print-defaults
mysqld--print-defaults
get a list of available MySQL parameters:
mysqld--help--verbose
gets the running MySQL process using each of the server parameters and their values:
mysql> SHOW GLOBAL VARIABLES;
mysql> SHOW SESSION VARIABLES;
Note: Some of these parameters support run-time modification, will take effect immediately, some parameters are not supported, and can only be modified by modifying the configuration file, and restart the server program to take effect;
Some parameter scopes are global and immutable, and some can provide individual settings for each user;
to modify the value of a server variable:
To View the modification method:
mysql> help SET
global Variable Modification method:
mysql> SET GLOBAL system_var_name=value;
mysql> SET @ @global. system_var_name=value;
Session Variable Modification method:
mysql> SET [SESSION] system_var_name=value;
mysql> SET @@[session.] System_var_name=value;
state variables: Variables used to hold statistics in the mysqld run:
mysql> SHOW GLOBAL STATUS;
mysql> SHOW [SESSION] STATUS;
Setup of MySQL setup and its variables (parameters) after installation