I\'m working on a website using JetBrains PHPStorm. I created a database with default settings, when I try to test the connection or connect to the database, this error pops
I ran into this issue, and I needed to enable "Allow network access to mysql" for it to work.
Had the same issue with PHPStorm on MAMP. Checked the port in localhost where MySQL was installed. It was 8889 and not the default 3306. Updating the port fixed the issue for me.
If you update your port number this issue will be fixed. So I thought it would be helpful if you know the step to find out the port number in which your mysql is installed.
In your mysql client type following sql query:
SHOW GLOBAL VARIABLES LIKE 'PORT';
OR use this stackoverflow link
How to test which port MySQL is running on and whether it can be connected to?