mysqlmampvmwarehostdbforge

access mysql database (mamp) in host from Windows guest (dbforge query builder)


I need to be able to access mysql database that I am running in the host through MAMP (not pro) from a program called dbforge query builder running in the windows host. I try to put the ip address of the host in the program but it returns an error: (vmware guest ip address) is not allowed to connect to this MySQL server. How can this be solved?

enter image description here


Solution

    1. Allow remote access to MySQL server. This can be done via my.cnf file (MySQL configuration file) as:

      [mysqld]
      bind-address = YOUR_SERVER_IP (or 0.0.0.0 which means all)
      
    2. grand user with priviliege to access it out of localhost (like 'user'@'%' or at least 'user'@'192.168.1.92' if you want to restrict it to specific IP):

      mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;