문제

In my windows forms application I use Mysql to get data. (I use MySql.Data.dll)

Here is my connection string:

server=xxx.xxx.xxx.xxx;user id=user_name;Password=userpass;database=products

When I want use my application on a computer, I must add computer's ip to remote mysql connection on cpanel. I want grant all privileges (on every IP) to user which I use on my connection string.

How can I do it?

도움이 되었습니까?

해결책

Try giving the user a "Super User" privileges;

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

to add password into the query;

GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'%' identified by 'userpass';

다른 팁

GRANT ALL PRIVILEGES ON *.* TO 'root'@'Hello@123' WITH GRANT OPTION;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top