ROOT Account restoration guide after deletion by mistake

Source: Internet
Author: User
No details none -- 1 kill your MYSQLD process etcinit. dmysqldstop -- 2 enter the bin directory of MYSQL and start MYSQLcdusrlocalmysqlbin without permission verification. mysqld_safe -- skip-grant-tables -- 3 the new process logs on to MYSQL. mysql -- 4 do not use the ROOT account name to create the admin user inserti

No details none -- 1 kill your MYSQLD process/etc/init. d/mysqld stop -- 2 enter the bin directory of MYSQL and start MYSQLcd/usr/local/mysql/bin without permission verification. /mysqld_safe -- skip-grant-tables -- 3 the new process logs on to MYSQL. /mysql -- 4 do not use the ROOT account name to create the admin user insert I

<无详细内容> <无>
-- 1 kill your MYSQLD process/etc/init. d/mysqld stop -- 2 enter the bin directory of MYSQL and start MYSQLcd/usr/local/mysql/bin without permission verification. /mysqld_safe -- skip-grant-tables & -- 3 new processes log on to MYSQL. /mysql -- 4 do not use the ROOT account name to create the admin user insert into mysql. user set user = 'admin', ssl_cipher = '', host = '%', password = password (" password "), x509_issuer ='', x509_subject = ''; -- 5 grant the permission to update mysql. user set Host = '%', select_priv = 'y', insert_priv = 'y', update_priv = 'y', Alter_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', create_user_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', create_view_priv = 'y ', show_view_priv = 'y', create_routine_priv = 'y', alter_routine_priv = 'y', create_user_priv = 'y' where user = 'admin'; -- 6 load new permissions flush privileges; -- 7 killall mysqld, which kills the mysql process in safe mode -- 8. Start MYSQL/etc/init. d/mysqld start
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.