1. Installation Configuration
CD D:\mysql\bin
MYSQLD--initialize--insecure # Initializing Server
MYSQLD # Boot Server
MYSQLD--install # Registration Service
Mysqld--remove # Delete Service
net start MySQL # startup service
net stop MYSL # Shutdown service
Mysql-h 10.0.0.3-u root-p xxxx # login Server
2. User Management
Increase:
Create user ' username ' @ ' IP address ' identified by ' password ';
By deleting:
Drop user ' username ' @ ' IP address ';
Change:
Rename user ' username ' @ ' IP address '; To ' new user name ' @ ' IP address ';;
Set password for ' username ' @ ' IP address ' = password (' New password ')
Check:
SELECT * from Mysql.user\g; # View all account information
is a common table that supports direct operations such as delete update
3. Rights Management
Increase:
Grant permissions on the database. Table to ' user ' @ ' 10.0.0.% '--authorization
By deleting:
Revoke permissions on the database. Table from ' user ' @ ' IP address '--Cancel permissions
Change:
Flush privileges # takes effect immediately
Grant all on * * to ' * ' @ '% ';
Check:
Show grants for [email protected]; --View Permissions
4. Forgot Password
# start the license-free service
Mysqld--skip-grant-tables
# Client
Mysql-u root-p
# Modify User name password
Update Mysql.user Set Authentication_string=password (' 666 ') where user= ' root ';
Flush privileges;
5. Database Operation
Increase:
Create database name CharSet UTF8;
# CREATE Database MyTest, specify character set UTF8
By deleting:
drop database name;
Change:
--For comments
Check:
show databases;
6. Ubuntu Internet win
Issues that cannot be connected on win:
View Run ports
sudo netstat-tap | grep MySQL
Found
TCP 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 7843/mysqld
Change the configuration file
sudo vim/etc/mysql/mysql.conf.d/mysqld.cnf
/bind finds 43 rows bind-address = 127.0.0.1 comment out
Restart Service
sudo service MySQL restart
OK to solve the problem
MySQL (i) Installation configuration