centos6.5 MySQL settings support remote IP access

Source: Internet
Author: User
Tags iptables

  

Just show the user name and host to

Mysql> Grant all privileges on * * to [e-mail protected] ' 192.168.2.96 ' identified by ' Crmbbs ';

This sentence means: Set an account for Wudaogang password for Crmbbs IP for 192.168.2.96 this IP to access MySQL

If the change is: Grant all privileges on test.* to [email protected] ' 192.168.2.96 ' identified by ' Crmbbs ';

Indicates that you can manipulate only the test database other databases you cannot manipulate *. * indicates that you can manipulate all databases

See Query ok! Indicates that the execution was successful.

Last update on MySQL permissions

Flush privileges;

If you don't have a link at this point, your firewall doesn't have port 3306 open.

#/sbin/iptables-i input-p TCP--dport 80-j accept#/sbin/iptables-i input-p tcp--dport 3306-j ACCEPT

  

#/etc/rc.d/init.d/iptables Save

View open ports When Setup is complete:

#/etc/init.d/iptables Status

Reboot the firewall and

/etc/init.d/iptables restart

This is the end of the MySQL remote account link ~

centos6.5 MySQL settings support remote IP access

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.