Senin, 23 September 2013

Cannot Reset MySQL Root Password

Di komputer klient BalonCoding mendapatkan error seperti di bawah ini, 
C:\Users\Administrator>mysqld --console --skip-grant-tables 130923 15:10:08 [Note] Plugin 'FEDERATED' is disabled. 130923 15:10:08 InnoDB: The InnoDB memory heap is disabled 130923 15:10:08 InnoDB: Mutexes and rw_locks use Windows interlocked functions 130923 15:10:08 InnoDB: Compressed tables use zlib 1.2.3 130923 15:10:08 InnoDB: Initializing buffer pool, size = 42.0M 130923 15:10:08 InnoDB: Completed initialization of buffer pool 130923 15:10:08 InnoDB: highest supported file format is Barracuda. 130923 15:10:09 InnoDB: Waiting for the background threads to start 130923 15:10:10 InnoDB: 1.1.8 started; log sequence number 1595675 130923 15:10:10 [ERROR] mysqld: unknown variable 'default-character-set=latin1' 130923 15:10:10 [ERROR] Aborting 130923 15:10:10 InnoDB: Starting shutdown... 130923 15:10:10 InnoDB: Shutdown completed; log sequence number 1595675 130923 15:10:10 [Note] mysqld: Shutdown complete
Sementara di komputer VirtualBox BalCod berjalan lancar,
C:\Documents and Settings\wi>mysqld --console --skip-grant-tables 130923 15:08:22 [Note] Plugin 'FEDERATED' is disabled. InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use Windows interlocked functions 130923 15:08:22 InnoDB: highest supported file format is Barracuda. 130923 15:08:22 InnoDB Plugin 1.0.5 started; log sequence number 44374 130923 15:08:22 [Note] mysqld: ready for connections. Version: '5.5.0-m2-community' socket: '' port: 3306 MySQL Community Server (GPL)
BalCod kembali ke komputer klient, untuk mencoba lagi dengan eksekusi perintah berikut,
  • terlebih dahulu pastikan service mysql sudah dimatikan (Control Panel | Administrative Tools | pilih Services | pilih MySQL | klik kanan | Stop)
  • mysqld --defaults-file="c:\my.ini" --console --skip-grant-tables (biarkan layar command prompt I ini tetap terbuka)
  • mysql -u root (ketik perintah ini di layar command prompt II yang lain)
  • use mysql; (pilih database mysql untuk reset password)
  • update user set password=PASSWORD("mynewpassword") where User='root';
  • flush privileges;
  • quit;
  • tutup kedua command prompt
  • hidupkan kembali service MySQL (kalau tidak tahu dimana, lihat langkah yang pertama)
  • di command prompt, ketikkan mysql --user=root --password=mynewpassword
  • tada... sudah masuk kan ?

Tidak ada komentar:

Posting Komentar