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:
- MySQL>use MySQL;
- Database changed
- MySQL> grant all on aaa_db.* to aaa@localhost identified by 'abcd1234';
Configure user databases and related Permissions
- Query OK, 0 rows affected (0.02 sec)
- MySQL> flush privileges;
Save and restart the MySQL Service
- 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.