Cannot access mysql from a program outside I am running a VM that uses windows server 2012 R2 to host a mysql Database , the database works good , i can access it from inside or outside the VM, the problem is that once i try to use the database with Bdoc suite the connection is refused, here are some screens of my problem:


Is the problem comming from my database ? (despite the fact that i can access it using Navicat and the mysqlcmd and :

the firewall is turned off.

I've tried with other users that have the rights on the database.

I've tried using the IP of the VM , and it still did not work.)
Is there any other cause to this problem ?
From the screen shots it looks like Navicat is installed on the same machine as the MySQL server. 
That jives with the messages we see there. 
If Bdoc Suite is running from a machine outside the MySQL server, you would need to use either the ip address or the hostname to connect to your server. 

There also may be an issue with the permissions on the account. MySQL has you specify not only the user, but the source of the connection to assign permissions. 

If you want to connect from ANY other IP, you would want to create a user with a wildcard ip address and use it to connect. 

To test this, you would want to log on locally with your root account and do the following: 

    CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

    GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;

    CREATE USER 'username'@'%' IDENTIFIED BY 'password';

    GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;

    FLUSH PRIVILEGES;


Then try connecting remotely with that new user.  If you prefer to scope your user permissions and know what ip they will be coming from, you can replace the '%' with the ip address you will be connecting from.