MySQL deployment to cloud host notes

Source: Internet
Author: User

Write a program that needs to deploy the database to the cloud host

MySQL security-based account root accounts are generally only accessible locally, but may need to open root remote access during the development process

For security, add a new user to Telnet

    • Log in to MySQL:

@>mysql-u root-p

@> Password

    • To create a user:

mysql> INSERT INTO Mysql.user (Host,user,password) VALUES ("localhost", "Test", Password ("1234"));

This creates a user named: Test with a password of: 1234.

Note: "localhost" here means that the user can only log on locally and cannot telnet to another machine. If you want to telnet, change "localhost" to "%", which means you can log on on any computer. You can also specify that a machine can log on remotely.

Change Password

UPDATE user SET Password=password (' 123456 ') WHERE user= ' root ';
FLUSH privileges;

Log in with the root user and then:

Grant all privileges the user name created by * to ("%" identified by "password";

Flush privileges; * Refresh the contents of just now *

Format: Grant permissions on the database tutorial name. table name to user @ Login host identified by "User password";

After the @ is the client IP address (or hostname) that accesses MySQL is represented by any client, if you fill out localhost as

Local access (the MySQL database cannot be accessed remotely by this user).

MySQL deployment to cloud host notes

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.