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
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?