Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service mysql restart --skip-grant-tables --skip-networking
- [mysqld]
- skip-grant-tables
- skip-networking
- net stop mysql (wait 10 seconds)
- net start mysql
- INSERT INTO mysql.user SET
- Host='localhost',
- User='mynewuser',
- Password=PASSWORD('whateverpassword'),
- Select_priv='Y',
- Insert_priv='Y',
- Update_priv='Y',
- Delete_priv='Y',
- Create_priv='Y',
- Drop_priv='Y',
- Reload_priv='Y',
- Shutdown_priv='Y',
- Process_priv='Y',
- File_priv='Y',
- Grant_priv='Y',
- References_priv='Y',
- Index_priv='Y',
- Alter_priv='Y',
- Show_db_priv='Y',
- Super_priv='Y',
- Create_tmp_table_priv='Y',
- Lock_tables_priv='Y',
- Execute_priv='Y',
- Repl_slave_priv='Y',
- Repl_client_priv='Y';
- service mysql restart
- select user,host,password from mysql.user;
- DELETE FROM mysql.user WHERE ...;
- FLUSH PRIVILEGES;
- desc mysql.user;
- SELECT CONCAT('SET ... ',GROUP_CONCAT(CONCAT(column_name,'=''Y'''),';'))
- FROM information_schema.columns
- WHERE table_schema='mysql'
- AND table_name='user'
- AND column_type='enum(''N'',''Y'')'
- ORDER BY ORDINAL_POSITIONG
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement