MySQL (i) Installation configuration

Source: Internet
Author: User

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

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.