% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 N N 0.000000
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 N N 0.000000
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 N N 0.000000
% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 N N 0.000000
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 N N 0.000000
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 N N 0.000000
drop user foo;
create user foo identified by 'password' require CIPHER 'cipher'
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000
drop user foo;
create user foo, foo2 identified by 'password' require CIPHER 'cipher'
@@ -223,7 +226,7 @@ revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE VERSIONING ROWS ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
revoke all privileges on mysqltest.* from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1';
flush privileges;
...
...
@@ -609,6 +612,7 @@ Create temporary tables Databases To use CREATE TEMPORARY TABLE
Create view Tables To create new views
Create user Server Admin To create new users
Delete Tables To delete existing rows
Delete versioning rows Tables To delete versioning table historical rows
Drop Databases,Tables To drop databases, tables, and views
Event Server Admin To create, alter, drop and execute events
Execute Functions,Procedures To execute stored routines
...
...
@@ -664,8 +668,8 @@ SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
@@ -28,6 +28,7 @@ def mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL NULL utf8 utf8_gen
def mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql db Db 2 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL
def mysql db Delete_priv 7 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql db Delete_versioning_rows_priv 23 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql db Drop_priv 9 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql db Event_priv 21 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql db Execute_priv 20 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
...
...
@@ -199,7 +200,7 @@ def mysql tables_priv Db 2 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64)
def mysql tables_priv Grantor 5 NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL select,insert,update,references NEVER NULL
def mysql tables_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
def mysql tables_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL
def mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references NEVER NULL
def mysql tables_priv Table_priv 7 NO set 121 363 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') select,insert,update,references NEVER NULL
def mysql tables_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL
def mysql tables_priv User 3 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL
...
...
@@ -221,15 +222,16 @@ def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NU
def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
def mysql user Alter_priv 17 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user authentication_string 42 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references NEVER NULL
def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references NEVER NULL
def mysql user Create_priv 8 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Create_tablespace_priv 32 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user default_role 45 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL
def mysql user default_role 46 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL
def mysql user Delete_priv 7 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Delete_versioning_rows_priv 33 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Drop_priv 9 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Event_priv 30 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Execute_priv 22 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
...
...
@@ -238,16 +240,16 @@ def mysql user Grant_priv 14 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e
def mysql user Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
def mysql user Index_priv 16 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Insert_priv 5 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user is_role 44 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user is_role 45 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user max_connections 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
def mysql user max_statement_time 46 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL
def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL
def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
def mysql user Password 3 NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) select,insert,update,references NEVER NULL
def mysql user password_expired 43 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user plugin 41 NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL
def mysql user password_expired 44 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user plugin 42 NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL
def mysql user Process_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user References_priv 15 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Reload_priv 10 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
...
...
@@ -257,14 +259,14 @@ def mysql user Select_priv 4 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e
def mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user ssl_cipher 34 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def mysql user ssl_type 33 NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references NEVER NULL
def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def mysql user ssl_type 34 NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references NEVER NULL
def mysql user Super_priv 19 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Trigger_priv 31 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user Update_priv 6 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
def mysql user User 2 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
def mysql user x509_issuer 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def mysql user x509_subject 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
def mysql vtmd_template archive_name 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) MUL select,insert,update,references Name of archive table NEVER NULL
def mysql vtmd_template col_renames 5 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references Column name mappings from previous lifetime NEVER NULL
def mysql vtmd_template end 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references TRX_ID of table lifetime end NEVER NULL
@@ -5,7 +5,7 @@ alter table user drop column default_role;
alter table user drop column max_statement_time;
flush privileges;
create role test_role;
ERROR HY000: Column count of mysql.user is wrong. Expected 44, found 43. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
ERROR HY000: Column count of mysql.user is wrong. Expected 45, found 44. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
drop role test_role;
ERROR HY000: Operation DROP ROLE failed for 'test_role'
alter table user add column is_role enum('N', 'Y') default 'N' not null
...
...
@@ -15,7 +15,7 @@ create role test_role;
create user test_user@localhost;
grant test_role to test_user@localhost;
set default role test_role for root@localhost;
ERROR HY000: Column count of mysql.user is wrong. Expected 45, found 44. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
ERROR HY000: Column count of mysql.user is wrong. Expected 46, found 45. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
drop role test_role;
drop user test_user@localhost;
alter table user add column default_role char(80) binary default '' not null
CREATETABLEIFNOTEXISTShost(Hostchar(60)binaryDEFAULT''NOTNULL,Dbchar(64)binaryDEFAULT''NOTNULL,Select_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Insert_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Update_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Delete_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Drop_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Grant_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,References_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Index_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Alter_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_tmp_table_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Lock_tables_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_view_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Show_view_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_routine_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Alter_routine_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Execute_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Trigger_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,PRIMARYKEYHost(Host,Db))engine=MyISAMCHARACTERSETutf8COLLATEutf8_bincomment='Host privileges; Merged with database privileges';
CREATETABLEIFNOTEXISTSuser(Hostchar(60)binaryDEFAULT''NOTNULL,Userchar(80)binaryDEFAULT''NOTNULL,Passwordchar(41)charactersetlatin1collatelatin1_binDEFAULT''NOTNULL,Select_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Insert_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Update_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Delete_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Drop_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Reload_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Shutdown_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Process_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,File_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Grant_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,References_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Index_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Alter_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Show_db_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Super_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_tmp_table_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Lock_tables_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Execute_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Repl_slave_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Repl_client_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_view_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Show_view_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_routine_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Alter_routine_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_user_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Event_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Trigger_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_tablespace_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,ssl_typeenum('','ANY','X509','SPECIFIED')COLLATEutf8_general_ciDEFAULT''NOTNULL,ssl_cipherBLOBNOTNULL,x509_issuerBLOBNOTNULL,x509_subjectBLOBNOTNULL,max_questionsint(11)unsignedDEFAULT0NOTNULL,max_updatesint(11)unsignedDEFAULT0NOTNULL,max_connectionsint(11)unsignedDEFAULT0NOTNULL,max_user_connectionsint(11)DEFAULT0NOTNULL,pluginchar(64)CHARACTERSETlatin1DEFAULT''NOTNULL,authentication_stringTEXTNOTNULL,password_expiredENUM('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,is_roleenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,default_rolechar(80)binaryDEFAULT''NOTNULL,max_statement_timedecimal(12,6)DEFAULT0NOTNULL,PRIMARYKEYHost(Host,User))engine=MyISAMCHARACTERSETutf8COLLATEutf8_bincomment='Users and global privileges';
CREATETABLEIFNOTEXISTSuser(Hostchar(60)binaryDEFAULT''NOTNULL,Userchar(80)binaryDEFAULT''NOTNULL,Passwordchar(41)charactersetlatin1collatelatin1_binDEFAULT''NOTNULL,Select_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Insert_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Update_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Delete_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Drop_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Reload_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Shutdown_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Process_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,File_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Grant_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,References_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Index_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Alter_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Show_db_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Super_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_tmp_table_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Lock_tables_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Execute_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Repl_slave_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Repl_client_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_view_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Show_view_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_routine_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Alter_routine_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_user_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Event_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Trigger_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Create_tablespace_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,Delete_versioning_rows_privenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,ssl_typeenum('','ANY','X509','SPECIFIED')COLLATEutf8_general_ciDEFAULT''NOTNULL,ssl_cipherBLOBNOTNULL,x509_issuerBLOBNOTNULL,x509_subjectBLOBNOTNULL,max_questionsint(11)unsignedDEFAULT0NOTNULL,max_updatesint(11)unsignedDEFAULT0NOTNULL,max_connectionsint(11)unsignedDEFAULT0NOTNULL,max_user_connectionsint(11)DEFAULT0NOTNULL,pluginchar(64)CHARACTERSETlatin1DEFAULT''NOTNULL,authentication_stringTEXTNOTNULL,password_expiredENUM('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,is_roleenum('N','Y')COLLATEutf8_general_ciDEFAULT'N'NOTNULL,default_rolechar(80)binaryDEFAULT''NOTNULL,max_statement_timedecimal(12,6)DEFAULT0NOTNULL,PRIMARYKEYHost(Host,User))engine=MyISAMCHARACTERSETutf8COLLATEutf8_bincomment='Users and global privileges';
-- Remember for later if user table already existed
set@had_user_table=@@warning_count!=0;
...
...
@@ -51,7 +51,7 @@ CREATE TABLE IF NOT EXISTS plugin ( name varchar(64) DEFAULT '' NOT NULL, dl var