mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-wl2050-new
This commit is contained in:
@@ -136,6 +136,10 @@ GRANT INSERT ON "test".* TO 'mysqltest_1'@'%'
|
||||
GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%'
|
||||
GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%'
|
||||
drop user 'mysqltest_1', 'mysqltest_3';
|
||||
grant all on test.t1 to 'mysqltest_1';
|
||||
ERROR 42000: 'root'@'localhost' is not allowed to create new users
|
||||
drop user 'mysqltest_1';
|
||||
ERROR HY000: Operation DROP USER failed for 1 of the requested users
|
||||
drop table t1, t2;
|
||||
insert into mysql.db set user='mysqltest_1', db='%', host='%';
|
||||
flush privileges;
|
||||
@@ -197,7 +201,7 @@ GRANT SELECT ON "mysql".* TO '%@a'@'a'
|
||||
drop user '%@a'@'a';
|
||||
create user mysqltest_2@localhost;
|
||||
grant usage on *.* to mysqltest_2@localhost with grant option;
|
||||
select host,user,password from mysql.user order by host,user,password;
|
||||
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
|
||||
ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysql'
|
||||
create user mysqltest_A@'%';
|
||||
rename user mysqltest_A@'%' to mysqltest_B@'%';
|
||||
@@ -205,15 +209,10 @@ drop user mysqltest_B@'%';
|
||||
drop user mysqltest_2@localhost;
|
||||
create user mysqltest_3@localhost;
|
||||
grant all privileges on mysql.* to mysqltest_3@localhost;
|
||||
select host,user,password from mysql.user order by host,user,password;
|
||||
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
|
||||
host user password
|
||||
% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
|
||||
127.0.0.1 root
|
||||
chilla%
|
||||
chilla% root
|
||||
localhost
|
||||
localhost mysqltest_3
|
||||
localhost root
|
||||
insert into mysql.user set host='%', user='mysqltest_B';
|
||||
create user mysqltest_A@'%';
|
||||
ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql'
|
||||
|
@@ -125,8 +125,10 @@ show grants for 'mysqltest_1';
|
||||
drop user 'mysqltest_1', 'mysqltest_3';
|
||||
#
|
||||
# Grant must not create user
|
||||
#grant all on test.t1 to 'mysqltest_1';
|
||||
#drop user 'mysqltest_1';
|
||||
--error 1211
|
||||
grant all on test.t1 to 'mysqltest_1';
|
||||
--error 1268
|
||||
drop user 'mysqltest_1';
|
||||
#
|
||||
# Cleanup
|
||||
drop table t1, t2;
|
||||
@@ -198,7 +200,7 @@ grant usage on *.* to mysqltest_2@localhost with grant option;
|
||||
connect (user2,localhost,mysqltest_2,,);
|
||||
connection user2;
|
||||
--error 1044
|
||||
select host,user,password from mysql.user order by host,user,password;
|
||||
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
|
||||
create user mysqltest_A@'%';
|
||||
rename user mysqltest_A@'%' to mysqltest_B@'%';
|
||||
drop user mysqltest_B@'%';
|
||||
@@ -211,7 +213,7 @@ create user mysqltest_3@localhost;
|
||||
grant all privileges on mysql.* to mysqltest_3@localhost;
|
||||
connect (user3,localhost,mysqltest_3,,);
|
||||
connection user3;
|
||||
select host,user,password from mysql.user order by host,user,password;
|
||||
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
|
||||
insert into mysql.user set host='%', user='mysqltest_B';
|
||||
--error 1044
|
||||
create user mysqltest_A@'%';
|
||||
|
Reference in New Issue
Block a user