简体   繁体   中英

How to access MySQL Server - XAMPP Mac OS?

I could not connect to MySQL Server of my own XAMPP. root user could not connect to the localhost/server IP MySQL server of XAMPP.

It has shown the following error: root登录错误

I could not figure out why is that not working, While searching a lot for a solution I notice there are a lot of answers that not targeting the true cause of this problem.

The problem is: the root user can connect only from the localhost machine, and since the XAMPP is running on its own virtual machine you can't access it directly from your own machine localhost. This is why you need to: 1. Allow the root user to connect from other IPs 2. Create a secondary user and allow him with specific rules to connect.

I found a great article that describes the solution and how to manage that. https://www.dev2qa.com/how-to-connect-to-mysql-server-after-install-xampp-on-mac-os/

Thanks to Jerry Zhao for writing the right solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM