MySQL Remote login problem

Source: Internet
Author: User
Tags server port

[Q1] Resolve MySQL Telnet

First, confirm the server port number is open
1. Confirm whether Port 3306 is open to the outside

Ubuntu@ubuntu:~-| 3306  0127.0. 0.1:3306  0.0.  0.0:*   LISTEN


Here 3306 Port only listens to the local (127.0.0.1) connection, modifies the bind-address in the/etc/mysql/my.cnf, comments out or changes to the specified IP
Two, authorized remote connection user <br>
1. Login:

Mysql-uroot-pxxxx

2. Authorization

Grant all privilege on [database]. [Table] to [USER]@[IP] identified by [password]mysql>grant all on * * to [e-mail protected] '% ' identified by ' USER_PASSW Ord ';

Database: The name of the authorized databases, all databases with matches ' * ' <br>
Table: The name of the authorized tables, all the tables with the match ' * ' <br>
User: Authorized username <br>
IP: Authorized IP address, e.g. 'xxx.xxx.xxx.xxx'

Password: the password for the authorized user name, e.g. 'xxxxxx'
3. Refresh license or MySQL restart

/etc/init.d/mysql restart

---
[Q2]mysql Command Import CSV

Select *  fromTest_info intoOutFile'/tmp/test.csv'Fields terminated by ','Optionally enclosed by '"'Escaped by '"'Lines terminated by '\ r \ n';

MySQL Remote login problem

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.