18-03-2015, Saat: 07:01 PM
~~Öncelikle sunucumuza root girişi yapıyoruz(putty ile).
Kod:
/etc/init.d/mysql stop
/etc/init.d/mysql stop
yazıyoruz.
(Hata verenler
Kod:
/usr/local/etc/rc.d/mysql-server stop
Kod:
/usr/local/etc/rc.d/mysql-server stop
yazabilir
2. adımda aşağıdaki kodu yazın
Kod:
mysqld_safe --skip-grant-tables &
mysqld_safe --skip-grant-tables &
Sonra karşımıza aşağıdaki gibi bir çıktı geliyor.
Kod:
[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started
[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started
doğru yoldayız
3. Adım
Kod:
mysql -u root
mysql -u root
yazıyoruz.
Bu seferde ;
Kod:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>
bu tarz bir çıktı ile karşılaşıyoruz
4. Adımda aşağıdaki her satırı sırayla uygulayın.
Kod:
mysql> use mysql;
mysql> update user set password=PASSWORD("Yeni_Şifre") where User='root';
mysql> flush privileges;
mysql> quit
mysql> use mysql;
mysql> update user set password=PASSWORD("Yeni_Şifre") where User='root';
mysql> flush privileges;
mysql> quit
Not: mysql> flush privileges; adımında hata verirse önemsemeyin
Reboot atmanıza gerek yok
Kod:
/usr/local/etc/rc.d/mysql-server start
/usr/local/etc/rc.d/mysql-server start
yazıp mysql startlayın yeni şifreniz devrede.
