Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql grant all privileges to a user on everywhere

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?

like image 336
Erdinç Özdemir Avatar asked Mar 19 '14 09:03

Erdinç Özdemir


1 Answers

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';
like image 54
Nadeem_MK Avatar answered Sep 27 '22 22:09

Nadeem_MK