MySQL Grant Practice

Source: Internet
Author: User
Tags mysql version readline

I. Preparatory work

Ubuntu1404

Two hosts on the same network segment with MySQL installed

MySQL version

192.168.141.128 Master

MySQL--version

MySQL Ver 14.14 distrib 5.5.46, for Debian-linux-gnu (x86_64) using ReadLine 6.3


192.168.141.129 from

MySQL--version

MySQL Ver 14.14 distrib 5.5.35, for Debian-linux-gnu (x86_64) using ReadLine 6.3


NIC Configuration

Keep the initialization configuration, do not change


Network status

Two hosts need to be interoperable.


Two. Entity operations

Modification of the master server configuration file

sudo vi/etc/mysql/my.cnf

Comment out bind-address = 127.0.0.1 rows (otherwise the primary server cannot be found from the server)


The primary server is licensed from the server user

Grant all on * * to [e-mail protected] identified by ' 123456 ';

Verify the Mysql.user table on the primary server

Mysql> select User,host from user;

+------------------+-----------------+

| user | Host |

+------------------+-----------------+

| Root | 127.0.0.1 |

| Root | 192.168.10.122 |

| test129 | 192.168.141.129 |

| Root | :: 1 |

| Debian-sys-maint | localhost |

| Root | localhost |

| Test | localhost |

| Root | Ubuntu |

+------------------+-----------------+

8 rows in Set (0.00 sec)


Log on to the master server database from the server

mysql-utest129-h192.168.141.128-p123456


Three. Verification

When a data table is created from the server, the primary server verifies that there is

MySQL Grant Practice

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.