Microtribute
Microtribute

Reputation: 1062

How to connect to MAMP MySQL Server using DataGrip

DataGrip doesn't connect to my local MySQL server that comes with MAMP Pro server. However, when I try connecting with PHP or the mysql command, it works perfectly. Can anyone help?

Upvotes: 3

Views: 2721

Answers (2)

Pavel Simonov
Pavel Simonov

Reputation: 91

MAMP Pro -> Mysql Tab -> Check "Allow network access to Mysql" -> Save -> Profit!

Upvotes: 9

Microtribute
Microtribute

Reputation: 1062

I found a solution. I had to edit my.cnf (You must edit the template here: Mamp PRO -> File -> Edit Template -> MySQL my.cnf)

I commented out MAMP_bind-address_MAMP and added a new line bind-address = 0.0.0.0 to allow incoming connections from all IPs.

sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
# MAMP_bind-address_MAMP
bind-address = 0.0.0.0

Hope it helps anyone who has the same problem.

Upvotes: 3

Related Questions