MySQL Reset password: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/igos-nusantara-web/wiki/includes/diff/DairikiDiff.php on line 438
(←Membuat halaman berisi 'MySQL Reset password $ mysql --user=root > update mysql.user set Password=PASSWORD('sandu-yg-baru') where User='root'; > flush privileges; > quit;')
 
Baris 1: Baris 1:
MySQL Reset password
+
Reset password root pada server MYSQL,
  $ mysql --user=root
+
 
  > update mysql.user set Password=PASSWORD('sandu-yg-baru') where User='root';
+
Lakukan:
  > flush privileges;
+
Matikan service MYSQL
  > quit;
+
  # service mysqld stop
 +
 
 +
Jalankan service MYSQL dalam safe mode
 +
# mysqld_safe --skip-grant-tables
 +
 
 +
Login/konek sebagai root
 +
  # mysql -u root
 +
 
 +
Update password root
 +
mysql> use mysql;
 +
mysql> UPDATE mysql.user SET Password = PASSWORD ('isi_password_baru') WHERE User='root';
 +
  mysql> FLUSH PRIVILEGES;
 +
  mysql> quit;
 +
 
 +
Restart service MYSQL
 +
# /etc/init.d/mysqld restart

Revisi per 4 Mei 2010 06.01

Reset password root pada server MYSQL,

Lakukan: Matikan service MYSQL

# service mysqld stop

Jalankan service MYSQL dalam safe mode

# mysqld_safe --skip-grant-tables

Login/konek sebagai root

# mysql -u root
  

Update password root

mysql> use mysql;
mysql> UPDATE mysql.user SET Password = PASSWORD ('isi_password_baru') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit;

Restart service MYSQL

# /etc/init.d/mysqld restart