MySQL user creation and Telnet configuration

Source: Internet
Author: User
Tags mysql create mysql create user

Recently working with the Hive tool, a hive test environment was built. Usually we store the hive metadata information in the outside of MySQL, so we need to install and configure the MySQL database. The next step is to explain the installation and configuration process for MySQL.

installation of MySQL

MySQL installation, you can complete the installation by the following command.

Yum install MySQL mysql-server mysql-devel-y

After the installation is complete, start the MySQL service and start the Service command as follows.

Service mysqld Start

Finally, the root user initializes a password.

mysqladmin-u root password ' password '

This completes the installation of MySQL.

Configuration of MySQL

MySQL is safe, and by default it is not possible to log in remotely, so you need to configure the user so that the root account will operate as an example. The configuration commands are as follows:

GRANT all privileges on * * to ' root ' @ '% '

% indicates that the root login host address can be still address, that is, the address is not limited. The root user grants all permissions to all tables in all databases. This is where you can log in remotely.

MySQL Create user

Because Root is a super administrator, in practice we usually create low-privileged users to use. The next step is to explain the creation of the user and the associated action commands for the configuration.

To create a user:

Granting permissions to users:

Grant all on * * to  ' cnblog ' @ '% ' with GRANT OPTION

The above command gives the user all permissions and grants permission to the user (that is, the Cnblog account can create the user and assign permissions to the user). The column in the Red box is the column that has the specified permission.

MySQL user creation and Telnet configuration

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.