Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to authorize remote access in MySQL

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report