Two methods are available for Mysql remote connection configuration.

Source: Internet
Author: User

Two methods are available for Mysql remote connection configuration.

Two Methods for configuring Mysql remote connection

When you work in the company, you often encounter mysql databases stored on a certain computer. to connect to the mysql service, you must enable remote connection on the computer with the mysql service.

First:

Root @ ubuntu:/usr/local/MySQL # mysql-hlocalhost-uroot-proot; mysql> use mysql; mysql> insert into user (host, user, password, Select_priv, Insert_priv, update_priv, Delete_priv, Create_priv, Drop_priv, primary, File_priv, Grant_priv, primary, Index_priv, Alter_priv, primary, Super_priv, primary, show_view_priv, Create_routine_priv, struct, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv) VALUES ('%', // replace % 'with a fixed IP address and password ('Cap '), 'y ', 'y ', 'y', 'y '); mysql> flush privileges;

Second:

Root @ ubuntu:/usr/local/mysql # mysql-hlocalhost-uroot-proot; mysql> grant all privileges on *. * TO 'test' @ '%' identified by 'test' with grant option; // replace % mysql> flush privileges with a fixed IP address;

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

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.