CREATETABLEhost(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,PRIMARYKEYHost(Host,Db))engine=MyISAMCHARACTERSETutf8COLLATEutf8_bincomment='Host privileges; Merged with database privileges';
CREATETABLEuser(Hostchar(60)binaryDEFAULT''NOTNULL,Userchar(16)binaryDEFAULT''NOTNULL,Passwordchar(41)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,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,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,PRIMARYKEYHost(Host,User))engine=MyISAMCHARACTERSETutf8COLLATEutf8_bincomment='Users and global privileges';
CREATETABLEfunc(namechar(64)binaryDEFAULT''NOTNULL,rettinyint(1)DEFAULT'0'NOTNULL,dlchar(128)DEFAULT''NOTNULL,typeenum('function','aggregate')COLLATEutf8_general_ciNOTNULL,PRIMARYKEY(name))engine=MyISAMCHARACTERSETutf8COLLATEutf8_bincomment='User defined functions';
CREATETABLEtime_zone_name(Namechar(64)NOTNULL,Time_zone_idintunsignedNOTNULL,PRIMARYKEYName(Name))engine=MyISAMCHARACTERSETutf8comment='Time zone names';
CREATETABLEtime_zone_transition(Time_zone_idintunsignedNOTNULL,Transition_timebigintsignedNOTNULL,Transition_type_idintunsignedNOTNULL,PRIMARYKEYTzIdTranTime(Time_zone_id,Transition_time))engine=MyISAMCHARACTERSETutf8comment='Time zone transitions';
CREATETABLEtime_zone_transition_type(Time_zone_idintunsignedNOTNULL,Transition_type_idintunsignedNOTNULL,OffsetintsignedDEFAULT0NOTNULL,Is_DSTtinyintunsignedDEFAULT0NOTNULL,Abbreviationchar(8)DEFAULT''NOTNULL,PRIMARYKEYTzIdTrTId(Time_zone_id,Transition_type_id))engine=MyISAMCHARACTERSETutf8comment='Time zone transition types';
CREATETABLEtime_zone_leap_second(Transition_timebigintsignedNOTNULL,CorrectionintsignedNOTNULL,PRIMARYKEYTranTime(Transition_time))engine=MyISAMCHARACTERSETutf8comment='Leap seconds information for time zones';
# Run the mysql_fix_privilege_tables.sql using "mysql --force"