Setup of MySQL setup and its variables (parameters) after installation

Source: Internet
Author: User
Tags mysql client

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.