How to authorize remote access in MySQL
In order to solve the problem of how to authorize remote access in MySQL, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
> grant all on *. * to identified by '123456'
> FLUSH PRIVILEGES
MySQL remote access authorization and quick repair
MySQL for remote authorization
# mysql-uroot-p
> GRANT all privileges ON *. * to IDENTIFIED BY "comsenz"
> FLUSH PRIVILEGES
> GRANT all privileges ON discuzbbs.* to IDENtTIFIED BY "comsenz"
> FLUSH PRIVILEGES
Note: if the user discuz does not exist in the MySQL, the MySQL will automatically add the user in the authorization operation and perform the authorization operation.
Rapid repair of MySQL
Some problems may arise after using MySQL for a long time. Most problems can be quickly fixed by simple operations. Here are two ways to quickly overhaul the MySQL database.
1. Myisamchk
The MySQL server must be temporarily stopped when using myisamchk. For example, we need to overhaul the discuz database. Do the following:
# service stop (stop MySQL)
# myisamchk-r / var/lib/mysql/discuz/*MYI
# service mysql start
Myisamchk automatically checks for and fixes indexing errors in the data table.
2. Mysqlcheck
Using mysqlcheck does not need to stop MySQL, and hot repair can be done. The steps are as follows:
# mysqlcheck-r discuz.*
Note: whether it is myisamchk or mysqlcheck, generally do not use the-f force repair, the-f parameter will delete part of the error data to try to repair when the general repair is not successful.
This is the answer to the question about how to authorize remote access in MySQL. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.