SlideShare a Scribd company logo
1 of 4
Download to read offline
MySQL Password Recovery & Linux Centos Root Şifresinin
Resetlenmesi
Merhaba Arkadaşlar,
Bugün ki yazımızda “ Mysql root şifresini “ resetleyeceğiz. Database root şifresini güvenlik gereği
not etmediğimiz için yer yer unutma problemi yaşayabiliyoruz. Bu sıkıntıyı en çok da ben yaşıyorum. Bu
yazı en çok da benim işime yarayacak. 
 Öncelikel Mysql’i durduruyoruz.
Kurduğunuz Mysql standart installation ise aşağıdaki komutu kullanabilirsiniz.
# /etc/init.d/mysqld stop
Shutting down MySQL. SUCCESS!
Yada
Kurduğunuz mysql rpm kurulumu ( Enterprice, Community Edition (GPL)) ise
# /etc/init.d/mysql stop
Shutting down MySQL. SUCCESS!
Sırada skip-grant özelliği ile Mysql’i tekrar başlatıyoruz.
# mysqld_safe --skip-grant-tables &
Starting mysqld daemon with databases from /var/lib/mysql
Artık Mysql’imizin root şifresi yok. Artık şifresiz girebilirsiniz.
[root@testmysql ~]# mysql –uroot ( Doğrudan Enter’e basalım. )
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.5.44 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
Şimdi root için password belirleyelim.
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('qwerty');
Query OK, 0 rows affected (0.00 sec)
mysql> quit;
Şimdi Mysql’î durduralım ve yeniden başlatalım.
# /etc/init.d/mysqld stop
Shutting down MySQL. SUCCESS!
Yada
# /etc/init.d/mysql stop
Shutting down MySQL. SUCCESS!
# /etc/init.d/mysqld stop
Starting MySQL.. SUCCESS!
Yada
# /etc/init.d/mysql start
Starting MySQL.. SUCCESS!
Şimdi yukarıda belirlediğimiz password ile login olabiliriz.
# mysql –uroot –p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.5.44 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
Kaynak :
http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html
https://www.syslogs.org/mysql-sifresini-resetlemek/
Yazan: Hızlan ERPAK

More Related Content

More from Hızlan ERPAK

C# ile Web Service Connection
C# ile Web Service ConnectionC# ile Web Service Connection
C# ile Web Service ConnectionHızlan ERPAK
 
DML Data Manipulation Language
DML Data Manipulation LanguageDML Data Manipulation Language
DML Data Manipulation LanguageHızlan ERPAK
 
DDL_Create-Alter-Drop
DDL_Create-Alter-DropDDL_Create-Alter-Drop
DDL_Create-Alter-DropHızlan ERPAK
 
MySql Restore Script
MySql Restore ScriptMySql Restore Script
MySql Restore ScriptHızlan ERPAK
 
MySql 5.7 Backup Script
MySql 5.7 Backup ScriptMySql 5.7 Backup Script
MySql 5.7 Backup ScriptHızlan ERPAK
 
Centosta mysql enterprise kurulumu
Centosta mysql enterprise kurulumuCentosta mysql enterprise kurulumu
Centosta mysql enterprise kurulumuHızlan ERPAK
 

More from Hızlan ERPAK (6)

C# ile Web Service Connection
C# ile Web Service ConnectionC# ile Web Service Connection
C# ile Web Service Connection
 
DML Data Manipulation Language
DML Data Manipulation LanguageDML Data Manipulation Language
DML Data Manipulation Language
 
DDL_Create-Alter-Drop
DDL_Create-Alter-DropDDL_Create-Alter-Drop
DDL_Create-Alter-Drop
 
MySql Restore Script
MySql Restore ScriptMySql Restore Script
MySql Restore Script
 
MySql 5.7 Backup Script
MySql 5.7 Backup ScriptMySql 5.7 Backup Script
MySql 5.7 Backup Script
 
Centosta mysql enterprise kurulumu
Centosta mysql enterprise kurulumuCentosta mysql enterprise kurulumu
Centosta mysql enterprise kurulumu
 

MySQL Password Recovery

  • 1. MySQL Password Recovery & Linux Centos Root Şifresinin Resetlenmesi Merhaba Arkadaşlar, Bugün ki yazımızda “ Mysql root şifresini “ resetleyeceğiz. Database root şifresini güvenlik gereği not etmediğimiz için yer yer unutma problemi yaşayabiliyoruz. Bu sıkıntıyı en çok da ben yaşıyorum. Bu yazı en çok da benim işime yarayacak.   Öncelikel Mysql’i durduruyoruz. Kurduğunuz Mysql standart installation ise aşağıdaki komutu kullanabilirsiniz. # /etc/init.d/mysqld stop Shutting down MySQL. SUCCESS! Yada Kurduğunuz mysql rpm kurulumu ( Enterprice, Community Edition (GPL)) ise # /etc/init.d/mysql stop Shutting down MySQL. SUCCESS! Sırada skip-grant özelliği ile Mysql’i tekrar başlatıyoruz. # mysqld_safe --skip-grant-tables & Starting mysqld daemon with databases from /var/lib/mysql
  • 2. Artık Mysql’imizin root şifresi yok. Artık şifresiz girebilirsiniz. [root@testmysql ~]# mysql –uroot ( Doğrudan Enter’e basalım. ) Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 1 Server version: 5.5.44 MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql> Şimdi root için password belirleyelim. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
  • 3. mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('qwerty'); Query OK, 0 rows affected (0.00 sec) mysql> quit; Şimdi Mysql’î durduralım ve yeniden başlatalım. # /etc/init.d/mysqld stop Shutting down MySQL. SUCCESS! Yada # /etc/init.d/mysql stop Shutting down MySQL. SUCCESS! # /etc/init.d/mysqld stop Starting MySQL.. SUCCESS! Yada # /etc/init.d/mysql start Starting MySQL.. SUCCESS! Şimdi yukarıda belirlediğimiz password ile login olabiliriz. # mysql –uroot –p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 1 Server version: 5.5.44 MySQL Community Server (GPL)
  • 4. Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql> Kaynak : http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html https://www.syslogs.org/mysql-sifresini-resetlemek/ Yazan: Hızlan ERPAK