Have you ever forgotten your MySQL root password? क्या आप कभी अपने MySQL रूट पासवर्ड भूल गए? It's one of those things that just happens despite the numerous precautions one might take. यह उन चीजों है कि अभी कई सावधानियों के बावजूद एक ले सकते हैं होता है में से एक है. As a result, you are locked out of your database server. एक परिणाम के रूप में, आप अपने डेटाबेस सर्वर का ताला लगा है. You can't create new databases and are left with little control over the state of your database server. आप नए डेटाबेस नहीं बना और अपने डाटाबेस सर्वर के राज्य पर उनका नियंत्रण नहीं रह सकते हैं. In such situations knowing how to regain root access to your database server comes in handy. ऐसे कैसे आपके डेटाबेस सर्वर से जड़ तक पहुँच पाने के लिए जाने की स्थिति में काम में आता है. So here's what you can do to reset the password for the root user in MySQL on both Windows and Linux. तो यहाँ है कि आप क्या MySQL में जड़ दोनों Windows और Linux पर उपयोगकर्ता के लिए पासवर्ड रीसेट कर सकते हैं.
Windows Users: विंडोज़ प्रयोक्ता:
Log on to your server as the Administrator. प्रशासक के रूप में अपने सर्वर से पर प्रवेश करें. Kill the MySQL server if it's running. MySQL सर्वर को मार डालो अगर वह भाग रही है. To do this you need the Windows Services Manager , so click on the Start Menu , then go to the Control Panel , then to the Administrative Tools , and select Services . ऐसा करने के लिए आप Windows सेवा प्रबंधक की आवश्यकता है, तो प्रारंभ मेनू पर क्लिक करें, तो नियंत्रण कक्ष में जाना है, तो प्रशासनिक उपकरण, और सेवा का चयन करें. Here look for the MySQL server and stop it. यहाँ MySQL सर्वर के लिए देखो और यह बंद करो. If it's not listed there and MySQL is till running it means that MySQL is not running as a service. यदि यह सूचीबद्ध और वहाँ नहीं है MySQL तक है चलने का मतलब है कि MySQL एक सेवा के रूप में नहीं चल रहा है. In that case you need to load the Task Manager which you should be able to access using the key combination of Ctrl+Alt+Del . उस मामले में आप टास्क प्रबंधक, जो आप Ctrl की कुंजी संयोजन + Alt + Del का उपयोग कर उपयोग में सक्षम होना चाहिए लोड की जरूरत है. Now kill the MySQL process. अब MySQL प्रक्रिया को मार डालो.
With the MySQL process stopped you need to force a change of passwords on MySQL using a combination of the UPDATE and FLUSH options. MySQL प्रक्रिया के साथ बंद कर दिया आपको MySQL पर पासवर्ड को बदलने का अद्यतन करें और फ्लश विकल्पों के संयोजन का उपयोग कर शक्ति की जरूरत है. So launch your favorite text editor and create a new file. तो अपने पसंदीदा पाठ संपादक शुरू करने और एक नई फ़ाइल बनाएँ. Enter the following text into the file replacing “NewMySQLPassword” with your new password: जगह फाइल में निम्न पाठ प्रविष्ट करें "NewMySQLPassword" अपने नए पासवर्ड के साथ:
UPDATE mysql.user SET Password=PASSWORD(”NewMySQLPassword”) WHERE User='root'; अद्यतन mysql.user सेट कूटशब्द = पासवर्ड ( "NewMySQLPassword") कहां प्रयोक्ता = रूट ';
FLUSH PRIVILEGES; फ्लश विशेषाधिकार;
What the first line does is that it updates the value of the field “Password” in the table mysql.user for the user “root” to “NewMySQLPassword”. क्या पहली पंक्ति है कि यह उपयोगकर्ता के लिए टेबल mysql.user में क्षेत्र 'पासवर्ड' की कीमत अद्यतन "मूल" "को NewMySQLPassword है." The second line flushes the old set of privileges and makes sure your new password is used everywhere. दूसरी पंक्ति के विशेषाधिकार के पुराने सेट flushes और सुनिश्चित करें कि आपके नए पासवर्ड हर जगह प्रयोग किया जाता है बनाता है. Save this text as C:\mysql_reset.txt . सी के रूप में इस पाठ: \ mysql_reset.txt बचाओ.
Next, you need to start your MySQL server passing this file as a configuration parameter. अगले, आप अपने MySQL एक विन्यास पैरामीटर के रूप में इस फाइल गुजर सर्वर शुरू की जरूरत है. Launch a terminal by going to the Start Menu , then to Run , and then type cmd and hit Enter. प्रारंभ मेनू पर जाकर एक टर्मिनल लांच, तब चलाने के लिए, और फिर प्रकार के अध्यक्ष तथा प्रबंध निदेशक और हिट दर्ज करें. Now enter the following command: अब निम्न कमांड दर्ज करें:
C:\mysql\bin\mysqld-nt --init-file=C:\mysql_reset.txt C: \ mysql \ bin \ mysqld-NT - init-= सी फ़ाइल: mysql_reset.txt \
Once the server is done starting delete the file C:\mysql_reset.txt . एक बार सर्वर का मूल्य उस फ़ाइल सी नष्ट किया: \ mysql_reset.txt है. Your MySQL root password should be reset now. आपके MySQL रूट पासवर्ड अब फिर से स्थापित किया जाना चाहिए. Now restart your MySQL server again. अब आपके MySQL सर्वर फिर से पुनः आरंभ करें. Go back to the Windows Services Manager again to do that. विंडोज सेवा प्रबंधक को वापस जाओ करने के लिए कि. Your new MySQL root password should work for you now. आपका नया MySQL रूट पासवर्ड आपके लिए अब काम करना चाहिए.
Linux Users: लिनक्स उपयोगकर्ता:
Log on to your Linux machine as the root user. रूट उपयोक्ता के रूप में अपने Linux मशीन पर प्रवेश करें. 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. MySQL रूट पासवर्ड resetting में शामिल कदम MySQL सर्वर बंद कर रहे हैं, यह सक्रिय अनुमति के बिना पुनः आरंभ करें ताकि आप MySQL में एक पासवर्ड के बिना जड़ के रूप में लॉग इन कर सकते हैं, एक नया पासवर्ड सेट है, तो और यह सामान्य रूप से पुनः आरंभ करें. Here's how you do it. यहाँ है कि तुम इसे कैसे करते हैं. First, stop the MySQL server: सबसे पहले, MySQL सर्वर बंद:
# /etc/init.d/mysql stop # / Etc / init.d / mysql रोक
Now start the MySQL server using the --skip-grant-tables option, which will run the server without loading the permissions settings: अब MySQL सर्वर का प्रयोग शुरू - स्किप-अनुदान टेबल विकल्प है, जो अनुमति सेटिंग्स लोड हो रहा है बिना सर्वर चलेंगे:
# mysqld_safe --skip-grant-tables & # Mysqld_safe - स्किप-अनुदान और टेबल
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 सर्वर पर लॉग ऑन करें:
# mysql -u root # Mysql-u रूट
It should allow you in without prompting for a password. इसमें आप एक पासवर्ड के लिए चलते बिना अनुमति चाहिए. The following steps will set the new password: निम्न चरणों का नया पासवर्ड सेट होगा:
mysql> use mysql; mysql उपयोग mysql>;
mysql> update user set password=PASSWORD(”NewMySQLPassword”) where User='root'; mysql अद्यतन प्रयोक्ता> निर्धारित कूटशब्द = पासवर्ड ( "NewMySQLPassword") जहाँ प्रयोक्ता जड़ = '';
mysql> flush privileges; mysql> फ्लश विशेषाधिकार;
mysql> quit mysql छोड़>
Replace “NewMySQLPassword” with your own password. बदलें "NewMySQLPassword" अपने पासवर्ड के साथ. Here's what happens here. यहाँ है कि यहाँ क्या होता है. The first line selects the MySQL configuration tables. पहली पंक्ति MySQL विन्यास तालिका का चयन. The second line updates the value of the field “Password” for the user “root” to “NewMySQLPassword”. दूसरी पंक्ति अद्यतन प्रयोक्ता के लिए मैदान "पासवर्ड" मूल्य के "मूल" "को NewMySQLPassword". The third line flushes the old set of privileges and makes sure your new password is used everywhere. तीसरी लाइन विशेषाधिकारों के पुराने सेट flushes और सुनिश्चित करें कि आपके नए पासवर्ड हर जगह प्रयोग किया जाता है बनाता है. 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 रोक
# /etc/init.d/mysql start # / Etc / init.d / mysql शुरू
# mysql -u root -pNewMySQLPassword Mysql-u रूट #-pNewMySQLPassword
Congratulations, your new MySQL root password is set and your MySQL server is ready to be used again. बधाई हो, आपका नया MySQL रूट पासवर्ड सेट और अपने MySQL सर्वर के लिए तैयार है फिर से इस्तेमाल किया जाएगा. Remember to update all your applications to use this password if you are using it anywhere. सभी अपने अनुप्रयोगों के अद्यतन के लिए इस पासवर्ड का उपयोग करें याद है अगर आप इसे कहीं भी उपयोग कर रहे हैं.























{ 5 comments… read them below or (5 टिप्पणियाँ ... उन्हें या नीचे पढ़ें add one एक जोड़ } )
OI como faço para recuperar a senha do root do linux Kurumin पुराना Como faço पैरा recuperar एक senha जड़ कर Linux Kurumin करना
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
BTW the syntax above is missing a – BTW वाक्यविन्यास के ऊपर एक लापता है --
There should be a double minus sign in front of the init. वहाँ 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 यह देखकर, उसके लापता कहीं भी - तो आपके ब्लॉग हो सकता है / s डेश एन डबल w परिवर्तित करने के लिए उन्हें पानी का छींटा
C:\mysql\bin\mysqld-nt -–init-file=C:\mysql_reset.txt C: \ mysql \ bin \ mysqld-NT - init-= सी फ़ाइल: mysql_reset.txt \
Thanks Manfred – you're right, it did convert the double-dashes into a single dash. धन्यवाद Manfred - तुम सही हो, यह एक पानी का छींटा में डबल डैश-परिवर्तित किया था. It's all fixed now. यह सब अब तय है. Thanks again! एक बार फिर धन्यवाद!
Much simpler than the “official” version pointed out by xxxxxxx. बहुत "अधिकृत" से सरल xxxxxxx ने कहा. Nicely written, thanks. अच्छी तरह से लिखा है, धन्यवाद.
Leave a Comment एक टिप्पणी छोड़ दो