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 log in remotely by mysql

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

Share

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

This article introduces the relevant knowledge of "how to log in remotely from mysql". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

GRANT ALL PRIVILEGES

1. Change the meter. It may be that your account is not allowed to log in remotely, only in localhost. At this time, as long as on the computer in localhost, after logging in to mysql, change the "host" entry in the "user" table in the "mysql" database from "localhost" to "%"

A. Mysql-u root-pvmwaremysql > use mysql

B. mysql > update user set host ='% 'where user =' root'

C. Mysql > select host, user from user

two。 Authorization law. For example, if you want myuser to connect to the mysql server from any host using mypassword.

A. GRANT ALL PRIVILEGES ON *. * TO IDENTIFIED BY 'mypassword' WITH GRANT OPTION

B. FLUSH PRIVILEGES

3. If you want to allow the user myuser to connect to the mysql server from the host with ip 192.168.1.6, and use mypassword as the password

A. GRANT ALL PRIVILEGES ON *. * TO IDENTIFIED BY 'mypassword' WITH GRANT OPTION

B. FLUSH PRIVILEGES

4. If you want to allow the user myuser to connect to the dk database of the mysql server from the host with ip 192.168.1.6, and use mypassword as the password

A. GRANT ALL PRIVILEGES ON dk.* TO IDENTIFIED BY 'mypassword' WITH GRANT OPTION

B. FLUSH PRIVILEGES

Grant command will add a user' myuser' in user table, its password is mypassword, grant its privilege

That's all for the content of "how to log in remotely from mysql". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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