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.
Asked
Active
Viewed 3,596 times
1

Oren Zakay
- 519
- 8
- 17
-
Change your port 3306 to 3308 or 3307 See this answer https://stackoverflow.com/a/59813485/12232340 – Mar 24 '20 at 09:58
-
This question belongs over here: https://superuser.com/ – lilbiscuit Mar 24 '20 at 13:57
1 Answers
0
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.

Oren Zakay
- 519
- 8
- 17