go-mysql-server icon indicating copy to clipboard operation
go-mysql-server copied to clipboard

superusers should be hidden

Open jycor opened this issue 2 years ago • 0 comments

Currently, all users show up when running select * from mysql.user, assuming you have select privileges on mysql. One of these users is a superuser (can be specified through --user, or defaults to root@localhost) , that shows up but is never persisted. We should hide this superuser due to its special status.

Solution is probably to have a custom struct or something that implements sql.RowIter in mysql_table.go, and all it does is skip over any users that have member variable IsSuperUser set.

jycor avatar Jul 21 '22 22:07 jycor