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 access MySql through ip address

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

How do I access MySql through an ip address? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.

1. Log in to mysql:

Mysql-u root-h 127.0.0.1-p

two。 Switch database

Use mysql

3. Authorization

Grant all privileges on *. * to 'root'@'127.0.0.1'identified by' password'

Change 127.0.0.1 to the ip address of the public network.

4. Check my.ini

4.1to see if skip-networking is available

Skip-networking when this option is enabled, MySQL cannot be accessed remotely

For security reasons, if you want the specified IP to access MySQL, you can add bind-address=IP to the configuration file, as long as skip-networking is turned off

Increase under port=3306

Bind-address=192.168.1.100 or bind-address=0.0.0.0

Other questions: try mysql-u root-p-h 192.168.1.100 on the server to see if you can log in successfully. If you can log in, but you can't log in through the client machine, it means it's a problem such as a firewall or a security dog. Just turn it off.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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

Wechat

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

12
Report