Three solutions to remote login to MySQL database

Source: Internet
Author: User

Solution 1:
Log on to the MySQL Server using the MySQL Adminstrator GUI Tool, but the Server returns the error message Host '60-248-32-13.hinet-ip.hinet.net 'is not allowed to connect to this

MySQL server
This is because of permission issues. The solution is as follows:
Shell> mysql -- user = root-p

Enter Password
Mysql> use mysql
Mysql> grant select, INSERT, UPDATE, delete on [db_name]. * TO [username] @ [ipadd] identified by '[password]';

[Username]: User code for remote login
[Db_name]: indicates the name of the database to be opened to the user.
[Password]: User password for remote login
[Ipadd]: The DNS Name after IP address or IP address reverse lookup. In this example, enter '60-248-32-13.hinet-ip.hinet.net '. Enclose the quotation marks (')

(In fact, it is executed on the remote server. Fill in the IP address of the local host .)

If you want to open all permissions, execute:
Mysql> update user set select_priv = 'y', Insert_priv = 'y', Update_priv = 'y', delete_priv = 'y', Create_priv = 'y ', drop_priv = 'y', Reload_priv = 'y', shutdown_priv = 'y', Process_priv = 'y', File_priv = 'y', Grant_priv = 'y ', references_priv = 'y', Index_priv = 'y', Alter_priv = 'y', Show_db_priv = 'y', Super_priv = 'y', Create_tmp_table_priv = 'y ', lock_tables_priv = 'y', Execute_priv = 'y', Repl_slave_priv = 'y', Repl_client_priv = 'y' where user = '[username]';

  • 1
  • 2
  • 3
  • Next Page

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.