HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

GRANT command not working in MySQL Server

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
grantworkingmysqlservercommandnot

Problem

I'm trying to execute the below command as root user to provide accessiblity from my application.

GRANT ALL ON communitycourts.* TO 'root'@'%' WITH GRANT OPTION;

But it returns 0 rows affected, but when I dont see this in result of SHOW GRANTS. Pelase help me

Solution

Two points to add:

  • It is recommended to use another user other than root to connect to your DB in your application. Try to use root account for administration only. This can be good only on testing machines.



  • Don't forget to flush privileges for the changes to take effect. This is better than restarting mysql.

Context

StackExchange Database Administrators Q#13557, answer score: 4

Revisions (0)

No revisions yet.