Set Change mysqlroot password
Enter MySQL database for the first time,
!
The MySQL absolute path can be added to the environment variable,
You can also set the boot load,
Reload environment variable for MySQL to take effect
Re-login to Mysql-uroot
Add a password to MySQL
Re-login verification,
Change Password
Re-login verification, validation successful
Reset password, modify configuration file, skip authorization
Restart the MySQL service, use root user authentication does not require a password
Go in and change the password file
Update user set Password=password (' Aminglinux ') where user= ' root ';
Modify my.conf after exiting
Delete the above skip authorization file
Restart MYSQLD Service
Re-entry to MySQL authentication
Connect to MySQL
Mode 1: Use the TCPIP protocol IP: port, for remote IP, this example is the machine to do the experiment
Mode 2: Using the socket (provided the my.conf is configured with sock), this situation is only suitable for use in this machine.
Method 3: Use the command line to fit with the shell script
MySQL Common commands
Query library show databases;
Switch the library use MySQL;
View the table in the library show tables;
View the fields in the table desc tb_name;
View Build Table statement Show create TABLE tb_name\g;
View the current user Select User ();
View the database currently in use Select Databsase ();
Creating a library Create database db1;
CREATE table use DB1; CREATE TABLE T1 ( id
int (4), name
char (+)) Engine=innodb DEFAULT Charset=utf8;
Delete tables drop table T1;
View current database version select version ();
View database status Show status;
View each parameter show variables; Pass with show variables like ' max_connect% ';
Modify the parameter set global max_connect_errors=1000; can also be modified in/etc/my.conf
View queue show Processlist; Show full processlist;
Set change mysqlroot password, connect mysql,mysql common commands