Network - Server

Check and create root user of mysql on Ubuntu

How about try this: 

Code:
 
  • sudo /etc/init.d/mysql stop
  • sudo mysqld --skip-grant-tables &
  • mysql
  • mysql> use mysql;
  • mysql> select user,host from user where user='root' G
  •  
  • If you see output, stop here and post the output.
    If you see no output, then copy/paste this: 
     
    Code:
     
  • INSERT INTO `mysql`.`user` (`Host`, `User`, `Password`, `Select_priv`, `Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`, `Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`, `Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`, `Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`,`Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`, `Repl_client_priv`, `Create_view_priv`, `Show_view_priv`, `Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`, `Event_priv`, `Trigger_priv`, `Create_tablespace_priv`, `ssl_type`, `max_questions`, `max_updates`, `max_connections`,`max_user_connections`, `plugin`, `authentication_string`, `password_expired`) VALUES ('localhost', 'root', 'D4mqMiERUC4sb', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '0', '0', '0', '0', '', NULL, 'N');
  •  
  •  
  • mysql>flush privileges;
  • mysql>quit
  • sudo killall mysqld
  • sudo /etc/init.d/mysql start
  • More infomation : http://goweb.vn/kien-thuc-web-vi/thiet-ke-web/localhost-phpmyadmin-root-password-recovery-in-ubuntu-1071.html

    0 Bình luận

    Trở về
    • Setup window xp từ usb!
    • Setup window xp từ usb!

      Tôi xin chia sẻ với các bạn cách sử dụng USB để làm bộ cài đặt windows xp, giống như một đĩa...

    • Mysql command
    • Mysql command

       # [mysql dir]/bin/mysql -h hostname -u root -p Create a database on the sql server. mysql> create database [databasename]; List...