Reset the Root Password of MySQL Server اعادة ضبط كلمة السر من الجذر الخلية الخادم

By default, MySQL Server will be installed with root superuser without any password. افتراضيا ، الخلية خادم سيتم تثبيت مع الجذر مستخدم الكومبيوتر ذو الصلاحيات العليا من دون اي كلمة سر. You can connect to MySQL server as root without requiring password or by keying in blank password. يمكنك توصيل الخدمة الى الخلية كما الجذر دون ان يتطلب ذلك من خلال كلمة السر او كلمة السر فارغه في القفل. However, if you have set the password for root and forget or unable to recall the password, then you will need to reset the root password for MySQL. ولكن اذا كنت قد وضعت كلمة السر لالجذر وننسى او غير قادرة على أن أشير الى كلمة السر ، بعد ذلك سوف تحتاج الى اعادة الجذر لكلمة السر الخلية.

MySQL Reference Manual has detail steps on how to reset password for root which are as below: الخلية الدليل المرجعي قد بالتفصيل الخطوات بشأن كيفية اعادة ضبط كلمة المرور للجذور التي هي على النحو التالي :

The procedure under Windows: اجراءات ويندوز :

  1. Log on to the Windows system where MySQL is running as Administrator. قم بتسجيل الدخول الى نظام ويندوز الخلية حيث يعمل مديرا ل.
  2. Stop the MySQL server if it is running. وقف الخلية الخادم اذا كان يعمل. For a server that is running as a Windows service, go to the Services manager: لالخادم الذي يركض وبوصفها خدمة ويندوز ، اذهب الى مدير الخدمات :

    Start Menu -> Control Panel -> Administrative Tools -> Services قائمة أبدا --> لوحة التحكم --> الادوات الاداريه --> خدمات

    Then find the MySQL service in the list, and stop it. ثم العثور على الخلية الخدمة في القائمة ، ووقفها.

    If your server is not running as a service, you may need to use the Task Manager to force it to stop. اذا كان السيرفر الخاص بك لا يعمل ويهدف الى خدمة ، قد تحتاج الى استخدام مدير المهام لإجبارها على التوقف.

  3. Create a text file and place the following command within it on a single line: انشاء ملف ومكان النص التالي في داخلها على خط واحد :

    SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’MyNewPassword’); تعيين كلمة مرور ل'الجذر' @ 'localhost' = كلمة السر ( 'mynewpassword') ؛

    Save the file with any name. حفظ الملف مع اي اسم. For this example the file will be C:\mysql-init.txt. في هذا المثال ملف وسوف ج : \ - init.txt الخلية.

  4. Open a console window to get to the DOS command prompt: Console فتح نافذة للوصول الى الاوامر دوس :

    Start Menu -> Run -> cmd قائمة أبدا --> تشغيل --> CMD

  5. If MySQL is installed in C:\mysql. اذا كان مثبتا في الخلية ج : \ الخلية. If MySQL is installed in another location, adjust the following commands accordingly. اذا كان تركيب الخلية هي في مكان آخر ، ان يعدل الاوامر التالية وفقا لذلك.

    At the DOS command prompt, execute this command: في دوس الاوامر ، وتنفيذ هذه القيادة :

    C:\> C:\mysql\bin\mysqld-nt –init-file=C:\mysql-init.txt ج : \> ج : \ الخلية \ بن \ mysqld - NT - اختصار ل الحرف الاول = ج - ملف : \ الخلية - init.txt

    The contents of the file named by the –init-file option are executed at server startup, changing the root password. محتويات الملف المسمى اختصار ل الحرف الأول من قبل - الخيار - ملف تنفذ في الخادم بدء ، فان تغيير كلمة سر الجذر. After the server has started successfully, you should delete C:\mysql-init.txt. بعد ان الخادم قد بدأت بنجاح ، يجب ان تحذف ج : \ - init.txt الخلية.

    If you installed MySQL using the MySQL Installation Wizard, you may need to specify a –defaults-file option: اذا كنت قد قمت بتثبيت الخلية الخلية باستخدام معالج التثبيت ، قد تحتاج الى تحديد الاعدادات الافتراضيه - ملف - الخيار :

    C:\> “C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe” ج : \> "ج : \ ملفات البرنامج \ الخلية \ الخلية خادم 5،0 \ بن \ mysqld - nt.exe"
    –defaults-file=”C:\Program Files\MySQL\MySQL Server 5.0\my.ini” - - ملف الاعدادات الافتراضيه = "ج : \ ملفات البرنامج \ الخلية \ الخلية خادم 5،0 \ my.ini"
    –init-file=C:\mysql-init.txt - الملف = اختصار ل الحرف الاول - ج : \ الخلية - init.txt

    The appropriate –defaults-file setting can be found using the Services Manager: المناسبه - تحديد الاعدادات الافتراضيه - ملف ويمكن الاطلاع على استخدام مدير الخدمات :

    Start Menu -> Control Panel -> Administrative Tools -> Services قائمة أبدا --> لوحة التحكم --> الادوات الاداريه --> خدمات

    Find the MySQL service in the list, right-click on it, and choose the Properties option. العثور على الخلية الخدمة في القائمة ، وانقر بالزر الايمن عليها ، واختيار الخيار الممتلكات. The Path to executable field contains the –defaults-file setting. الطريق الى ميدان للتنفيذ ، ويتضمن - - ملف تحديد الاعدادات الافتراضيه. Be sure to supply the –init-file argument with the full system path to the file, regardless of your current working directory ومن المؤكد ان لتزويد - اختصار ل الحرف الأول - الحجه الملف الكامل مع منظومة الطريق الى الملف ، بغض النظر عن دليل العمل الحالي الخاص بك

  6. Stop the MySQL server, then restart it in normal mode again. وقف خادم الخلية ، ثم اعادة تشغيلها في طريقة طبيعية مرة اخرى. If the MySQL server is ran as a service, start it from the Windows Services window. واذا كان الخادم هو يتعارض مع الخلية ويهدف الى خدمة ، بداية من ويندوز خدمات النافذة. If you start the server manually, use whatever command you normally use. اذا كنت بدء الخادم يدويا ، واستخدام ما فمن المعتاد ان تستخدم القيادة.
  7. Connect to MySQL server by using the new password. وصل الى الخلية الخادم باستخدام كلمة سر جديدة.

For Unix environment, the procedure for resetting the root password is as follows: لبيئة يونيكس ، واجراءات اعادة السبب الجذري لكلمة السر هي كما يلي :

  1. Log on to the Unix system as either the Unix root user or as the same user that the mysqld server runs as. قم بتسجيل الدخول الى نظام يونيكس اما الجذر يونيكس المستخدم او المستخدم نفسه كما ان ما يتعارض مع خادم mysqld.
  2. Locate the .pid file that contains the server’s process ID. تحديد مكان. رمز المهمة الملف الذي يحتوي على رقم تعريف عملية الخادم. The exact location and name of this file depend on your distribution, hostname, and configuration. بالضبط موقع واسم هذا الملف تعتمد على التوزيع الخاصة بك ، اسم المضيف ، والتكوين. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. المواقع المشتركة / فار / ليب / الخلية / ، / فار / تشغيل / mysqld / ، و / usr / المحلية / الخلية / بيانات /. Generally, the filename has the extension of .pid and begins with either mysqld or the system’s hostname. وبوجه عام ، وقد الملف تمديد. رمز المهمة ويبدأ اما mysqld او النظام المضيف.

    Stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command: وقف خادم الخلية العاديه من خلال ارسال القتل (لا تقتل -9) الى mysqld عملية ، وذلك باستخدام مسار لل. رمز المهمة في الملف التالي :

    shell> kill `cat /mysql-data-directory/host_name.pid` شل> `قتل القط / mysql-data-directory/host_name.pid`

    Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command. علما استخدام backticks الى الامام بدلا من الاقتباسات مع قيادة لجنة مناهضه التعذيب ؛ هذه القضية الناتج من اتفاقيه مناهضه التعذيب الى ان تكون بديلا للقيادة في القتل.

  3. Create a text file and place the following command within it on a single line: انشاء ملف ومكان النص التالي في داخلها على خط واحد :

    SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’MyNewPassword’); كلمة السر لمجموعة 'الجذر' @ 'localhost' = كلمة السر ( 'mynewpassword') ؛

    Save the file with any name. حفظ الملف مع اي اسم. For this example the file will be ~/mysql-init. في هذا المثال ملف وسوف ~ / الخلية - اختصار ل الحرف الاول.

  4. Restart the MySQL server with the special –init-file=~/mysql-init option: اعادة تشغيل الخلية مع خادم الخاصة - اختصار ل الحرف الاول - ملف = ~ / الخلية اختصار ل الحرف الأول - الخيار :

    shell> mysqld_safe –init-file=~/mysql-init & شل> mysqld_safe - اختصار ل الحرف الاول - ملف = ~ / الخلية - اختصار ل الحرف الاول &

    The contents of the init-file are executed at server startup, changing the root password. محتويات اختصار ل الحرف الاول من الملفات تتم في بدء الخدمة ، تغيير كلمة سر الجذر. After the server has started successfully you should delete ~/mysql-init. بعد ان الخادم قد بدأت بنجاح يجب عليك ان تحذف ~ / الخلية - اختصار ل الحرف الاول.

  5. Connect to MySQL server by using the new password. وصل الى الخلية الخادم باستخدام كلمة سر جديدة.

Alternatively, on any platform, mysql client can be used to set the new password, althought it’s less secure way of resetting the password (detailed instruction وبدلا من ذلك ، على اي منهاج ، الخلية الزبائن يمكن ان تستخدم لوضع كلمة سر جديدة ، على الرغم من انه اقل امنا من طريقة اعادة ضبط كلمة المرور (تعليمات مفصلة here هنا ): (:

  1. Stop mysqld and restart it with the –skip-grant-tables –user=root options (Windows users omit the –user=root portion). وقف mysqld واعادة تشغيلها مع القفز - - - المنح جداول الجذر = خيارات المستخدم (ويندوز المستخدمين - حذف الجزء المستخدم الجذر =).
  2. Connect to the mysqld server with this command: ان توصلك الى خادم mysqld مع هذه القيادة :

    shell> mysql -u root شل> الخلية - يو الجذر

  3. Issue the following statements in the mysql client: المساله التالية التى ادلى بها في الخلية العميل :

    mysql> UPDATE mysql.user SET Password=PASSWORD(’newpwd’) الخلية> تحديث مجموعة mysql.user = كلمة السر كلمة السر ( 'newpwd')
    -> WHERE User=’root’; --> فيها المستخدم = 'الجذر' ؛
    mysql> FLUSH PRIVILEGES; الخلية> الاحمرار الامتيازات ؛

    Replace ‘newpwd’ with the actual root password that you want to use. استبدل 'newpwd' مع الجذر كلمة السر الفعليه التي تريد استخدامها.

  4. You should be able to connect using the new password. هل ينبغي أن تكون قادرة على ربط باستخدام كلمة سر جديدة.

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. هام : هذا هو الاله الذي ترجم صفحة مقدمة "كما هى" دون ضمان. Machine translation may be difficult to understand. الترجمة الاليه قد يكون من الصعب ان نفهم. Please refer to يرجى الرجوع الى original English article المادة الاصليه English whenever possible. كلما كان ذلك ممكنا.

Share and contribute or get technical support and help at والمساهمة في حصة او الحصول على الدعم التقني والمساعدة فى My Digital Life Forums بلدي الرقميه الحياة المنتديات .



10 Responses to “Reset the Root Password of MySQL Server” 10 ردود الى "اعادة ضبط كلمة السر من الجذر الخلية خادم"

  1. Change and Reset MySQL root Password » My Digital Life تغيير الخلية الجذريه واعادة ضبط كلمة السر »بلدي الحياة الرقميه
    June 6th, 2006 18:12 السادس من حزيران / يونية ، 2006 18:12
    1

    [...] Other then the ways specified here to reset and change the root password for mySQL database in the case that the password is forgotten or lost, the following instructions explain in details the alternative way at the last part of the guide, where no additional file needs to be created: [...] [...]اخرى ثم هنأ بطرق محددة لاعادة الجذر وتغيير كلمة السر لقاعدة بيانات الخلية في حالة ان كلمة السر هي المنسيه او المفقودة ، التعليمات التالية في شرح تفاصيل عن طريقة بديلة في الجزء الاخير من الدليل ، حيث الملف اضافية لا بد من خلق : [...]

  2. Mike Scalora مايك scalora
    October 8th, 2007 03:47 في الثامن تشرين الاول / اكتوبر ، 2007 03:47
    2

    You should add –verbose –console to the command in step 5. - يجب عليك ان تضيف مضجر - مستعدة لقيادة في الخطوة 5. I got a error because of a copy and paste issue that include a quote of the wrong type but there’s no error feedback without the –console. انا حصلت بسبب وجود خطأ في نسخ ولصق وتشمل القضية التي استشهد من نوع الخطأ ولكن ليس هناك خطأ في التغذيه المرتده - دون ان يحدث. Also, the -console to stop the server with CTRL-C under windows, not sure about linux. أيضا ، - مستعدة لوقف الخادم - ج السيطرة مع ويندوز ، لم تكن متأكدا عن لينكس.

    -Mike - مايك

  3. Roar الزئير
    April 23rd, 2008 23:38 نيسان / ابريل 23rd ، 2008 23:38
    3

    This isn’t correct. هذا ليس صحيحا. The syntax should be “–init” not “-init”. النحو ينبغي ان يكون "- اختصار ل الحرف الأول" لا "- اختصار ل الحرف الأول".

  4. Roar الزئير
    April 23rd, 2008 23:39 نيسان / ابريل 23rd ، 2008 23:39
    4

    Ah and now that I’ve posted I see the problem. آه والآن بعد ان كنت ارى ان تنشر هذه المشكلة. This site is disallowing double “-”. هذا الموقع هو الرفض المزدوج "--". It’s being escaped or something. انه هرب او ما يجري.

    Well dear reader, just now that “-init” should have TWO dashes (hyphens), not one. جيدا ايها القارئ الكريم ، ان للتو "- اختصار ل الحرف الأول" ينبغي أن يكون اثنين شرطات (الشرطات) ، لا احد.

  5. Roar الزئير
    April 23rd, 2008 23:39 نيسان / ابريل 23rd ، 2008 23:39
    5

    Gah. “know” not “now”. "اعرف" لا "الان". I’m going for coffee now. انا ذاهب الان للبن.

  6. Rob روب
    April 24th, 2008 10:05 نيسان / ابريل 24th ، 2008 10:05
    6

    Dude, مهندم ،

    Didn’t see these comments while reading the article, but I figured out the double-hyphen syntax by trial and error. لا ترى هذه التعليقات اثناء قراءة هذه المادة ، الا انني حظيت بها المزدوج من جانب الشرطة لغوي التجربه والخطأ.
    Anyway you saved my Life by putting this documentation on the Net !! على اي حال انت انقذت حياتي من خلال وضع هذه الوثائق على شبكة الانترنت! A thousand thanks ! ألف شكرا! -Rob - روب

  7. Dan دان
    April 25th, 2008 01:37 نيسان / ابريل 25th ، 2008 01:37
    7

    There is a typo on the mysqld startup script. وثمة الخطأ المطبعي على mysqld بدء الكتابة.

    The correct command requires TWO dashes before the parameter setting. الصحيح يتطلب قيادة اثنين قبل ان تطيح تحديد المعلمه.

    The correct command is (note TWO dashes before skip-grant-tables): القيادة هو الصحيح (ملاحظه قبل ان تطيح تخطى اثنين من المنح - جداول) :

    mysqld_safe –skip-grant-tables mysqld_safe - القفز - المنح الجداول

  8. Kamal BAKOUR كمال bakour
    July 31st, 2008 21:18 يوليو 31st ، 2008 21:18
    8

    Procdure to reset root password in MySQL [RedHat & Fedora] Procdure الجذريه لاعادة تعيين كلمة السر في الخلية [فيدورا RedHat &]

    ====================================================== ================================================== ====
    Step-1 خطوة - 1
    [root@redhat~]#killall mysqld [RedHat الجذر @ ~] # killall mysqld
    [root@redhat~]#/usr/libexec/mysqld –skip-grant-tables –user=root & [RedHat الجذر @ ~] # / usr / libexec / mysqld - القفز - المنح - جداول المستخدم الجذر = &

    ====================================================== ================================================== ====
    Step-2 (In MySQL) 2 - الخطوة (في الخلية)
    [root@redhat~]#mysql [RedHat الجذر @ ~] # الخلية
    use mysql; استخدام الخلية ؛
    update user set password=password(”newpassowrd”) where user=”root”; تحديث مجموعة المستخدم كلمة المرور = كلمة السر ( "newpassowrd") المستخدم فيها = "الجذر" ؛
    flush privileges; الاحمرار الامتيازات ؛
    exit; خروج ؛

    ====================================================== ================================================== ====
    Step-3 خطوة - 3
    [root@redhat~]#killall mysqld [RedHat الجذر @ ~] # killall mysqld
    [root@redhat~]#/etc/init.d/mysqld start [RedHat الجذر @ ~] # / الخ / init.d / mysqld البداية

    There you go هناك تذهب :)

  9. Jose خوزيه
    August 14th, 2008 10:47 اب / اغسطس 14th ، 2008 10:47
    9

    phpmyadmin

  10. Rob روب
    September 9th, 2008 07:34 التاسع من ايلول / سبتمبر ، 2008 07:35
    10

    Completely wrong syntax, check the code before posting guy خطأ لغوي تماما ، للتحقق من رجل قانون قبل النشر

Leave a Reply ترك الرد

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> يمكنك استخدام هذه العلامات : <ahref="" title=""> <abbrtitle=""> <acronymtitle=""> <b><blockquotecite=""> <cite><code><دل datetime = ""> <em><i><qCite=""> <strike><strong>

Subscribe without commenting اشترك بدون تعليق


Custom Search

New Articles المواد الجديدة

Incoming Search Terms for the Article الوافدة من حيث البحث عن المادة

reset mysql password اعادة الخلية كلمة السر - -- mysql forgot password الخلية نسيت كلمة السر - -- mysql forgot root password الخلية الجذريه نسيت كلمة السر - -- MySQL remove root password الخلية الجذريه ازالة كلمة السر - -- remove mysql password ازالة الخلية كلمة السر - -- mysql default password الخلية كلمة السر الافتراضيه - -- mysql reset password الخلية اعادة ضبط كلمة السر - -- mysql reset root password الخلية الجذريه اعادة ضبط كلمة السر - -- xampp mysql password xampp الخلية كلمة السر - -- forget mysql password ننسى الخلية كلمة السر - -- mysql remove password الخلية ازالة كلمة السر - -- mysql reset root اعادة الخلية الجذريه - -- default mysql password افتراضي الخلية كلمة السر - -- reset password mysql اعادة ضبط كلمة السر الخلية - -- ubuntu mysql root password الخلية الجذريه اوبونتو كلمة السر - -- xampp default password xampp الافتراضي كلمة السر - -- remove mysql root password ازالة الجذر الخلية كلمة السر - -- remove password mysql ازالة كلمة السر الخلية - -- lost mysql password windows فقدت كلمة السر الخلية ويندوز - -- mysql password reset الخلية اعادة ضبط كلمة السر - -- reset xampp password اعادة ضبط كلمة السر xampp - -- xampp reset password xampp اعادة ضبط كلمة السر - -- recover mysql password الخلية استعادة كلمة السر - -- resetting mysql password اعادة الخلية كلمة السر - -- forgot password mysql نسيت كلمة السر الخلية - -- mysql lost password windows فقدت كلمة المرور الخلية ويندوز - -- mysql forget password الخلية هل نسيت كلمة المرور - -- mysql root password recovery الخلية الجذريه استرجاع كلمة السر - -- xampp forgot password xampp نسيت كلمة السر - -- resetting mysql root password اعادة الخلية الجذريه كلمة السر - -- mysql password forgot الخلية نسيت كلمة السر - -- xampp reset mysql password xampp اعادة الخلية كلمة السر - -- delete mysql password حذف الخلية كلمة السر - -- reset mysql password windows اعادة ضبط كلمة السر الخلية ويندوز - -- Recover MySQL root password Windows الخلية الجذريه استعادة كلمة المرور ويندوز - -- removing mysql password ازالة الخلية كلمة السر - -- reset mysql root password windows اعادة ضبط كلمة السر الخلية الجذريه ويندوز - -- how to remove mysql password كيفية ازالة الخلية كلمة السر - -- reset mysql root اعادة الخلية الجذريه - -- how to reset MySQL password كيفية اعادة الخلية كلمة السر - -- forgot mysql root password الخلية الجذريه نسيت كلمة السر - -- remove root password mysql ازالة الجذر الخلية كلمة السر - -- mysql forgotten password الخلية نسيت كلمة السر - -- find mysql password العثور على الخلية كلمة السر - -- xampp mysql root password xampp الخلية الجذريه كلمة السر - -- mysql password recovery الخلية استرجاع كلمة السر - -- mysql recover root password الخلية الجذريه استعادة كلمة السر - -- forget password mysql هل نسيت كلمة المرور الخلية - -- mysql password windows الخلية كلمة السر ويندوز - -- xampp mysql default password xampp الافتراضي الخلية كلمة السر - -- reset root password mysql اعادة ضبط كلمة السر الخلية الجذريه - -- reset root password mysql windows اعادة ضبط كلمة السر الخلية الجذريه ويندوز - -- mysql reset root password windows الخلية الجذريه اعادة ضبط كلمة السر ويندوز - -- mysql password forget الخلية كلمة المرور نسيان - -- mysql 5 default password 5 الافتراضي الخلية كلمة السر - -- forgot password for mysql نسيت كلمة السر لالخلية - -- mysql removing root password الخلية الجذريه ازالة كلمة السر - -- recover mysql password windows استعادة كلمة السر الخلية ويندوز - -- mysql windows lost password الخلية ويندوز فقدت كلمة السر - -- windows mysql password ويندوز الخلية كلمة السر - -- all الكل - -- forgot xampp password نسيت كلمة السر xampp - -- xampp default mysql password xampp الافتراضي الخلية كلمة السر - -- mysql 5.0 default password 5،0 الافتراضي الخلية كلمة السر - -- mySQL recover password windows الخلية استعادة كلمة المرور ويندوز - -- reset mysql root password الخلية الجذريه اعادة ضبط كلمة السر - -- recover mysql root password الخلية الجذريه استعادة كلمة السر - -- remove password in mysql ازالة كلمة المرور في الخلية - -- xampp password mysql xampp الخلية كلمة السر - -- mysql 5 reset root password 5 اعادة الخلية الجذريه كلمة السر - -- removing mysql root password ازالة الجذر الخلية كلمة السر - -- xampp password reset xampp اعادة ضبط كلمة السر - -- removing root password mysql ازالة الجذر الخلية كلمة السر - -- reset mysql password xampp اعادة ضبط كلمة السر الخلية xampp - -- mysql5 default password mysql5 الافتراضي كلمة السر - --