How can I correctly configure the MySQL database under liunx?

Source: Internet
Author: User

This article mainly describes the actual operation procedure for correctly configuring the MySQL database under liunx and the commands to be used in actual operations, the following is a description of the specific solution. I hope it will help you in your future study.

If you use your MySQL database as the root user, you can directly upload your MySQL database file to the/usr/local/MySQL/data directory, modify the connection file of your database to use the MySQL database.
To create a MySQL user, follow these steps:

1. Enter the directory where the MySQL database is stored: cd/usr/local/MySQL/data

2. Create a database directory in mkdir aaa_db)

3. log on to the MySQL database as ROOT Using/usr/local/MySQL/bin/MySQL-uroot-p)

4. Run the following command:

 
 
  1. MySQL>use MySQL;   
  2. Database changed   
  3. MySQL> grant all on aaa_db.* to aaa@localhost identified by 'abcd1234';  

Configure user databases and related Permissions

 
 
  1. Query OK, 0 rows affected (0.02 sec)   
  2. MySQL> flush privileges; 

Save and restart the MySQL Service

 
 
  1. Query OK, 0 rows affected (0.02 sec)  

The above content is an introduction to the MySQL database configuration under liunx. I hope you will get some benefits.


The above content describes the configuration of the MySQL database under liunx, hoping to help you in this regard.

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.