MySql connection linux server from app in windows

-2

I do not know if this query is in the target range of the page.

Has anyone ever encountered having to connect an application from visual studio to a DB MySql hosted on a linux server?

Try connecting to a connection string by changing the engine parameters, but it does not work.

Maybe it has something to do, that the server does not have a graphical interface, because when I enter putty to the server, I first start with root, then if I can access the db.

    
asked by Brian Velez 18.12.2018 в 14:23
source

1 answer

-1

It is very possible that it is a matter of permissions. To be able to have remote access to a MySql database server, you must execute the following command as root:

GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD' with grant option;

If you do not want to specify a specific ip, replace IP with % .

After that, you must restart the server, or run FLUSH PRIVILEGES;

It is explained in several places, for example here: Configure mariadb for remote client access

    
answered by 18.12.2018 в 15:33