يتلقّى أنت في أيّ وقت نسيت ك [مسقل] جذر كلمة سرّ? هو واحدة من أنّ أشياء أنّ فقط يحدث على الرغم من ال يتعدّد إحتياطات أحد أمكن أخذت. [أس ا رسولت], أنت مقفلة من ك قاعدة معطيات نادلة. أنت يستطيع لا يخلق قاعدة معطيات جديدة وتركت مع بعض تحكم على الدولة من ك قاعدة معطيات نادلة. نفذت في هذا حالات يعرف كيف أن يستعيد جذر إلى ك قاعدة معطيات نادلة يأتي في عمليّة. هكذا هنا ماذا أنت يستطيع أتمّت أن يعيد الكلمة سرّ للجذر مستعملة في [مسقل] على على حدّ سواء [ويندووس] و [لينوإكس].
[ويندووس] مستعملات:
[لوغن] إلى نادلتك كالمديرة. قتلت [مسقل] نادلة إن هو يكون يركض. أن يتمّ هذا يحتاج أنت ال [ويندووس] خدمات مديرةطقطقت, لذلك فوق ال بدأت قائمة الطعامذهبت, بعد ذلك إلى ال [كنترول بنل], بعد ذلك إلى ال أدوات إداريّة, ومختارة خدمات. هنا فتّشت [مسقل] نادلة وتوقّفت هو. إن هو يكون لا يعدّد هناك و [مسقل] حتّى يعني يركض هو أنّ [مسقل] لا يركض كخدمة. في أنّ حالة يحتاج أنت أن يحمّل المهمة مديرة أيّ أنت سوفت كنت يمكن أن ينفذ يستعمل ال [كي كمبينأيشن] من [كترللتدل]. الآن قتلت [مسقل] عملية.
احتجت مع [مسقل] عملية يتوقّف أنت أن يجبر تغير الكلمة سرّ على [مسقل] يستعمل إدماج من ال تحديث و تدفق خيارات. هكذا أطلقت [تإكست ديتور] ك مفضّلة وخلقت مبرد جديدة. دخلت النص تالي داخل المبرد يستبدل "[نومسقلبسّوورد]" مع كلمت سرّك جديدة:
تحديث [مسقل.وسر] [بسّووردبسّوورد] محدّدة (" [نومسقلبسّوورد]") حيث [أوسر]' جذر';
امتيازات متوهّجة;
ماذا الخطّ أولى يتمّ أنّ يحدّث هو القيمة من المجال "كلمة سرّ" في الطاولة [مسقل.وسر] للمستعملة "جذر" أن "[نومسقلبسّوورد]". [فلوشس] الثاني خطّ المجموعة قديمة امتيازات ويتأكّد كلمت سرّك جديدة استعملت في كلّ مكان. باستثناء هذا نص بما أنّ C:\\mysql [رست.تإكست].
بعد ذلك, يحتاج أنت أن يبدأ ك [مسقل] نادلة يمرّ هذا مبرد كتشكيل معلمة. أطلقت انتهائيّة ب يذهب إلى ال بدأت قائمة الطعام, بعد ذلك إلى شوططبعت, وبعد ذلك [كمد] ويدخل إصابة. الآن دخلت الأمر تالي:
C:\\mysql\\bin\\mysqld - [نت] --[إينيت-فيل] C:\\mysql [رست.تإكست]
ما إن النادلة يكون أتمّت يبدأ مفتاح للشطب المبرد C:\\mysql [رست.تإكست]. ك [مسقل] جذر كلمة سرّ سوفت كنت أعدت الآن. الآن استأنفت ك [مسقل] نادلة ثانية. ذهبت [بك تو] [ويندووس] خدمات مديرة ثانية أن يتمّ أنّ. ك جديدة [مسقل] جذر كلمة سرّ سوفت عملت ل أنت الآن.
[لينوإكس] مستعملات:
Log on to your Linux machine as the root user. The steps involved in resetting the MySQL root password are to stop the MySQL server, restart it without the permissions active so you can log into MySQL as root without a password, set a new password, and then restart it normally. Here’s how you do it. First, stop the MySQL server:
# /etc/init.d/mysql stop
Now start the MySQL server using the --skip-grant-tables option, which will run the server without loading the permissions settings:
# mysqld_safe --skip-grant-tables &
The & option at the end makes the command you have executed run as a background process. Now log on to your MySQL server as root:
# mysql -u root
It should allow you in without prompting for a password. The following steps will set the new password:
mysql> use mysql;
mysql> update user set password=PASSWORD(”NewMySQLPassword”) where User=’root’;
mysql> flush privileges;
mysql> quit
Replace “NewMySQLPassword” with your own password. Here’s what happens here. The first line selects the MySQL configuration tables. The second line updates the value of the field “Password” for the user “root” to “NewMySQLPassword”. The third line flushes the old set of privileges and makes sure your new password is used everywhere. Now, the last step is to restart the server normally and use your new root password to log in:
# /etc/init.d/mysql stop
# /etc/init.d/mysql start
# mysql -u root -pNewMySQLPassword
Congratulations, your new MySQL root password is set and your MySQL server is ready to be used again. Remember to update all your applications to use this password if you are using it anywhere.























{ 4 comments… read them below or add one }
OI como faço para recuperar a senha do root do linux Kurumin
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
BTW the syntax above is missing a -
There should be a double minus sign in front of the init. Do that and the commands work fine. Looking at it, its missing elsewhere too - so might be your blog s/w converting double en dash to em dash
C:\mysql\bin\mysqld-nt -–init-file=C:\mysql_reset.txt
Thanks Manfred - you’re right, it did convert the double-dashes into a single dash. It’s all fixed now. Thanks again!
Leave a Comment