ERROR HY000: The user specified as a definer ('foo'@'bar') does not exist
Warnings:
create user foo@bar;
Note 1449 The user specified as a definer ('foo'@'bar') does not exist
create role role6 with admin foo@bar;
create user bar with admin current_user;
create user bar with admin current_user;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'admin current_user' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'admin current_user' at line 1
grant role1 to foo@localhost with admin option;
grant role1 to foo@localhost with admin option;
...
@@ -20,7 +24,7 @@ grant select on *.* to foo@localhost with admin option;
...
@@ -20,7 +24,7 @@ grant select on *.* to foo@localhost with admin option;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'admin option' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'admin option' at line 1
show grants for foo@localhost;
show grants for foo@localhost;
Grants for foo@localhost
Grants for foo@localhost
GRANT USAGE ON *.* TO 'foo'@'localhost'
GRANT CREATE USER ON *.* TO 'foo'@'localhost'
GRANT role1 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role1 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role2 TO 'foo'@'localhost'
GRANT role2 TO 'foo'@'localhost'
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
...
@@ -51,7 +55,7 @@ localhost root role4 Y
...
@@ -51,7 +55,7 @@ localhost root role4 Y
flush privileges;
flush privileges;
show grants for foo@localhost;
show grants for foo@localhost;
Grants for foo@localhost
Grants for foo@localhost
GRANT USAGE ON *.* TO 'foo'@'localhost'
GRANT CREATE USER ON *.* TO 'foo'@'localhost'
GRANT role1 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role1 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role2 TO 'foo'@'localhost'
GRANT role2 TO 'foo'@'localhost'
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
...
@@ -73,7 +77,7 @@ revoke admin option for role3 from role4;
...
@@ -73,7 +77,7 @@ revoke admin option for role3 from role4;
revoke admin option for role2 from foo@localhost;
revoke admin option for role2 from foo@localhost;
show grants for foo@localhost;
show grants for foo@localhost;
Grants for foo@localhost
Grants for foo@localhost
GRANT USAGE ON *.* TO 'foo'@'localhost'
GRANT CREATE USER ON *.* TO 'foo'@'localhost'
GRANT role2 TO 'foo'@'localhost'
GRANT role2 TO 'foo'@'localhost'
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
show grants for role1;
show grants for role1;
...
@@ -102,7 +106,7 @@ localhost root role4 Y
...
@@ -102,7 +106,7 @@ localhost root role4 Y
flush privileges;
flush privileges;
show grants for foo@localhost;
show grants for foo@localhost;
Grants for foo@localhost
Grants for foo@localhost
GRANT USAGE ON *.* TO 'foo'@'localhost'
GRANT CREATE USER ON *.* TO 'foo'@'localhost'
GRANT role2 TO 'foo'@'localhost'
GRANT role2 TO 'foo'@'localhost'
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION
show grants for role1;
show grants for role1;
...
@@ -118,4 +122,4 @@ GRANT USAGE ON *.* TO 'role3'
...
@@ -118,4 +122,4 @@ GRANT USAGE ON *.* TO 'role3'
GRANT USAGE ON *.* TO 'role4'
GRANT USAGE ON *.* TO 'role4'
GRANT role3 TO 'role4'
GRANT role3 TO 'role4'
drop role role1, role2, role3, role4, role5, role6;
drop role role1, role2, role3, role4, role5, role6;