Change and Reset MySQL root Password Pārmaiņas un Reset MySQL root paroli

Other then the ways specified Citi pēc tam, kā noteikts here šeit 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: atiestatīt un mainīt root paroli MySQL datubāzes gadījumā, parole ir aizmirsta vai pazaudēta, sekojot norādēm izskaidrot detalizēti alternatīvā veidā pēc pēdējā daļa guide, ja nav papildu fails ir jārada:

  1. Login as root to the Windows or Unix-like (Unix, Linux or BSD) machine with the MySQL server. Login kā root uz Windows vai Unix tamlīdzīgi izstrādājumi (Unix, Linux vai BSD) mašīna ar MySQL serveri.
  2. Stop the MySQL server by using either of the following command: Apturēt MySQL serveri, izmantojot kādu no šādu komandu:

    Linux: /etc/rc.d/init.d/mysql stop Linux: / etc / rc.d / init.d / mysql stop
    FreeBSD: /usr/local/etc/rc.d/mysql-server.sh stop FreeBSD: / usr / local / etc / rc.d / mysql-server.sh stop

  3. Open the mysql server startup script (ie mysql-server.sh – the file executed to start or stop MySQL server. Atvērt mysql servera palaišanas skriptu (piemēram, mysql-server.sh - fails izpilda sākt vai pārtraukt MySQL serveri.
  4. Add –skip-grant-tables to the end of the line that contains the mysqld_safe command as its parameter. Add-skip-dotāciju tabulas beigās līnijā, kas satur mysqld_safe komandu kā tās parametrs.
  5. Start MySQL server with the following command: Start MySQL serveri ar šādu komandu:

    Linux: /etc/rc.d/init.d/mysql start Linux: / etc / rc.d / init.d / mysql sākums
    FreeBSD: /usr/local/etc/rc.d/mysql-server.sh start FreeBSD: / usr / local / etc / rc.d / mysql-server.sh sākums

  6. Alternatively, start the MySQL server directly and skip the editing with the following command: Alternatīvi, start MySQL servera tieši un izlaist rediģēšana ar šādu komandu:

    mysqld_safe –skip-grant-tables & mysqld_safe-skip-dotāciju galdi &

    Depending on your path environment, you may need to point to the correct directory where mysqld_safe is instead. Atkarībā no jūsu ceļa vidē, jums var būt nepieciešams, lai norādītu uz pareizo direktoriju, kur mysqld_safe ir vietā.

  7. Run the following commands to login as the mysql user and connect to mysql user/permission database: Palaist šādas komandas lai pieteiktos kā mysql lietotājs un pieslēgties mysql lietotājs / atļauju datu bāze:

    # mysql -u root mysql # Mysql-u root mysql

  8. Run the update queries to change the MySQL password: Palaist update vaicājumus mainīt MySQL parole:

    mysql> UPDATE user SET Password=PASSWORD('newrootpassword') WHERE User='root'; mysql> UPDATE lietotāja SET Password = PASSWORD ( 'newrootpassword') WHERE user = 'root';
    mysql> FLUSH PRIVILEGES; mysql> FLUSH privilēģijas;

    Note: Replace newrootpassword with the new root password for MySQL server. Piezīme: Aizvietot newrootpassword ar jaunu root paroli MySQL serverim. Flush Privileges is needed to making the password change effect immediately. Flush privilēģijām ir nepieciešama, lai padarītu paroles maiņas spēkā nekavējoties.

  9. Exit mysql database client by typing exit. Iziet mysql datubāzes klients ierakstot exit.
  10. Stop MySQL server with commands listed at step 2. Apturēt MySQL serveri ar komandu uzskaitīti 2 soli.
  11. Open the mysql server startup script edit in step 3 again and remove the –skip-grant-tables parameter that has been added. Atvērt mysql servera startēšanas skriptu rediģēt 3 soli vēlreiz un noņemt-skip-dotāciju tabulas parametriem, kam ir pievienots.
  12. Start MySQL server by using command from step 5 or 6. Start MySQL serveri, izmantojot komandu no 5 ātrumi vai 6.

For Redhat Linux users, use the following instructions as the root user of Redhat Linux machine: Par Redhat Linux lietotājiem, izmanto šādas instrukcijas kā root lietotājam Redhat Linux mašīna:

  1. Stop MySQL process by using command: Pārtraukt MySQL process, izmantojot komandu:

    # killall mysqld # Killall mysqld

  2. Start the MySQL server with following options: Start MySQL serveri ar šādām iespējām:

    # /usr/libexec/mysqld -Sg –user=root & # / Usr / libexec / mysqld-SG-user = root &

  3. Start the MySQL client: Start MySQL client:

    # mysql # Mysql

    You should see the following message: Jums vajadzētu redzēt sekojošu vēstījumu:

    Welcome to the MySQL monitor. Welcome to MySQL monitor. Commands end with ; or g. Commands end with; vai g.
    Your MySQL connection id is 1 to server version: 3.xx.xx Jūsu MySQL Connection ID ir 1 pret servera versija: 3.xx.xx

    Type 'help;' or 'h' for help. Tips 'palīdzību; "vai" h "palīdzību. Type 'c' to clear the buffer. Tips "C", lai skaidri buferšķīdumā.

    mysql> mysql>

  4. Use mysql database: Izmantot mysql datubāzi:

    mysql> USE mysql mysql> Lietot mysql

    You should see the following message: Jums vajadzētu redzēt sekojošu vēstījumu:

    Reading table information for completion of table and column names Lasījums tabulas informācija pabeigšanai tabulu un kolonnu nosaukumi
    You can turn off this feature to get a quicker startup with -A Jūs varat izslēgt šo iespēju, lai iegūtu ātrāku sāknēšanas with -

    Database changed Database mainīts

  5. Then, update the password for the root user with the following command: Tad, atjauniniet paroli root lietotājam ar šādu komandu:

    UPDATE user SET password=password(”newpassword”) WHERE user=”root”; UPDATE lietotāja SET Password = password ( "Newpassword") WHERE user = "root";

    Replace newpassword with your desired password. Aizstāt Newpassword ar jūsu vēlamo paroli. You should see the following message: Jums vajadzētu redzēt sekojošu vēstījumu:

    Query OK, 2 rows affected (0.03 sec) Query OK, 2 rows affected (0.03 sec)
    Rows matched: 2 Changed: 2 Warnings: 0 Rows saskaņotās: 2 Changed: 2 Brīdinājumi: 0

    Rows affected may be different, but the Query OK should be there. Rindas ietekmēti, var būt dažādas, bet Query OK, būtu tur.

  6. Flush the database privileges to reload it in order to make the changes effective: Flush datubāzē privilēģijas pārlādēt to, lai izmaiņas efektīvi:

    mysql> flush privileges; mysql> flush privilēģijas;

    You should get the following result: Jums vajadzētu iegūt šādu rezultātu:

    Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.02 sec)

  7. Exit the MySQL client by typing exit. Iziet MySQL klients, uzrakstot exit.
  8. Kill the MySQL server process by typing killall mysqld. Nogalināt MySQL servera process, ierakstot killall mysqld.
  9. Then start MySQL again: Tad sāk MySQL vēlreiz:

    /etc/init.d/mysqld start / etc / init.d / mysqld sākums

IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: lapa mašīna iztulkot un pasniegts tàds, "kàds tas ir" bez garantijas. Machine translation may be difficult to understand. Mašīntulkošanas var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.


10 Responses to “Change and Reset MySQL root Password” 10 Atbildes uz "pārmaiņām" un Reset MySQL root paroli "

  1. Matt J. Matt J.
    September 20th, 2009 00:19 20 septembris 2009 00:19
    10 10

    I see it worked under Ubuntu for 'trail', but it did not work for me. Es redzu, ka strādāja pie Ubuntu "taka", bet tas nestrādāja mani.

    On the contrary: even after following Rajesh's suggestion to use “–skip-grant-tables” instead of “-skip-grant-tables”, even after correcting the erroneous reference to “/etc/rc.d/init.d” for Linux (my Ubuntu has no such directory, it has only “/etc/init.d/”) I get strange error messages by the time I get to step 7. Par pretējo: pat pēc šādiem Rajesh ierosinājumu izmantot "-skip-dotāciju galdi", nevis "-skip-piešķirt-galdi", pat pēc tam, labojot kļūdainu norādi "/ etc / rc.d / init.d" par Linux (mana Ubuntu nav šāda direktorija, tas ir tikai "/ etc / init.d /") I get dīvaini kļūdas ziņojumus, kad es nokļūt soli 7.

    It seems either one of two things goes wrong. Šķiet, ka vai nu vienu no divām lietām kas notiek nepareizi. Either 1) the server process starts, then soon dies or 2) if it finds the process running at all, it still gives me “ERROR 1045 (28000): Access denies for 'root'@'localhost' (using password: NO)” Nu 1) serveris process sākas, tad drīz nomirst, vai 2) ja tā konstatē, procesu darbojas visu, tā joprojām dod man "ERROR 1.045 (28.000): Access noliedz ar 'root' @ 'localhost' (izmantojot password: NO) "

    What has my even more baffled is that I get this last message when trying to start and stop mysql! Kas ir manā vēl neizprotamu ir tas, ka man šo pēdējo ziņojumu, mēģinot iedarbināt un apturēt mysql!

    Finally, the instructions to edit mysql are highly misleading: one cannot put “–skip-grant-tables” at the END of the line, since the line ends with redirection and '&'. Visbeidzot, instrukcijas rediģēt mysql ir ļoti maldinoši: viens nevar nodot "-skip-dotāciju tabulās" pēc beigas līniju, jo līnija beidzas ar redirection un '&'. The line now reads: Rindā ir šāds:

    “/usr/bin/mysqld_safe –skip-grant-tables > /dev/null 2>&1 &” "/ Usr / bin / mysqld_safe-skip-dotāciju galdi> / dev / null 2> & 1 &"

    I am running the very latest released Ubuntu, with all updates as of yesterday. Es esmu darbojas ļoti vēlāk atbrīvota Ubuntu, ar visiem, kas vakar atjauninājumiem.

  2. Reset MySQL Root Password (for Windows) « Noel's Techie Blog Reset MySQL Root Password (Windows) "Noel's Techie Blog
    August 8th, 2009 10:57 8 augusts 2009 10:57
    9 9

    [...] This article was written based on information from [...] Šis raksts tika rakstīts, pamatojoties uz informāciju no http://www.mydigitallife.info/2006/06/06/change-and-reset-mysql-root-password/ http://www.mydigitallife.info/2006/06/06/change-and-reset-mysql-root-password/ to illustrate changing the mysql password on [...] lai ilustrētu mainīt mysql paroli [...]

  3. ap ap
    March 12th, 2009 17:35 12 marts 2009 17:35
    8 8

    @trail: Worked like a charm, thanks! @ taka: Strādājis kā šarmu, thanks!

  4. trail taka
    September 23rd, 2008 17:22 23 septembris 2008 17:22
    7 7

    worked for me on ubuntu, in just one line: strādāja mani uz Ubuntu, tikai vienā line:

    sudo dpkg-reconfigure mysql-server-5.0 sudo dpkg-pārstrukturēt mysql-server-5.0

  5. Rajesh Cheethirala Rajesh Cheethirala
    July 3rd, 2008 05:46 3 jūlijs 2008 05:46
    6 6

    On ubuntu, command is mysqld_safe –-skip-grant-tables & Par Ubuntu, komanda ir mysqld_safe - skip-dotāciju galdi &

    Extra dash is required so mysql can parse it correctly. Extra dash ir nepieciešama, lai mysql varētu izanalizēt to pareizi.

  6. Mengubah password root pada MySQL 5.0 di Windows. Mengubah parole root pada MySQL 5,0 di Windows. « Iwan Binanto: “hari-hari ku yang berlalu ..” «Iwan Binanto:" Spēlēju-Hari ku yang berlalu .. "
    May 5th, 2008 16:52 5 maijs 2008 16:52
    5 5

    [...] judulnya), setelah googling cuma dapat cara untuk mereset dan mengganti password MySQL di UNIX-like di sini. [...] Judulnya) setelah googling Cuma dapat cara untuk mereset dan mengganti paroli MySQL di UNIX līdzīgu di sini. Wah, perlu sedikit modifikasi ni … Berikut cara2 yang saya lakukan: 1. Wah, perlu maz modifikasi ni ... Berikut cara2 yang saya lakukan: 1. Kill proses MySQL [...] Kill proses MySQL [...]

  7. links for 2007-04-23 | Patrick Kempf saites uz 2007/04/23 | Patrick Kempf
    April 23rd, 2007 08:23 Aprīlis 23, 2007 08:23
    4 4

    [...] Change and Reset MySQL root Password » My Digital Life (tags: mysql administration) No Tags Gelesen: 2 / heute: 2 [...] [...] Pārmaiņas un Reset MySQL root paroli »My Digital Life (tags: mysql administrācija) Nr Tags Gelesen: 2 / heute: 2 [...]

  8. Help me retrieve my password - Geeks Talk Palīdzēt man iegūt manu paroli - Geeks Talk
    December 19th, 2006 14:54 Decembris 19, 2006 14:54
    3 3

    [...] Re: Help me retrieve my password Try this link… Change and Reset MySQL root Password [...] Re: Help me ielādētu manu paroli Try this link ... pārmaiņu un Reset MySQL root paroli

  9. Vincitore Vincitore
    July 9th, 2006 12:05 9 jūlijs 2006 12:05
    2 2

    I wanna reset my ZXDSL 831 ADSL Modemn Es gribu, lai atjaunotu manu ZXDSL 831 ADSL Modemn
    Plz tell me the way how to reset it Plz tell me veids, kā, lai atjaunotu tā
    I need to do that right now Man tas ir jādara tūlīt

    Best Rgds Best rgds
    dugger(vincitore) dugger (vincitore)

  10. Reset the Root Password of MySQL Server » My Digital Life Reset root parole MySQL Server »My Digital Life
    June 6th, 2006 18:18 6 jūnijs 2006 18:18
    1 1

    [...] 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): [...] [...] Vai arī uz jebkuras platformas, mysql klients var izmantot, lai uzstādītu jauno paroli, lai gan tas ir tik droši kā atgriezi paroli (detalizētiem norādījumiem šeit): [...]

Leave a Reply 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> Jūs varat izmantot šos tagus: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Parakstīties uz komentāriem iezīme ir atspējota. To receive notification of latest comments posted, subscribe to Saņemt informāciju par jaunāko komentārus, parakstīties uz My Digital Life Comments RSS feed Mana Digital Life Comments RSS feed or vai register to receive reģistrēties, lai saņemtu new comments in daily email digest. jauni komentāri ikdienas e-pasta sagremot.
Custom Search

New Articles Jauns pants

Incoming Search Terms for the Article Ienākošo Meklēt noteikumi pants

reset mysql password reset mysql parole - -- reset password mysql Reset password mysql - -- change mysql root password mainīt mysql root parole - -- mysql password reset mysql paroles reset - -- lost mysql password zaudējis mysql parole - -- mysql reset password mysql paroles - -- mysql reset root password linux mysql reset root parole linux - -- retrieve mysql password iegūt mysql parole - -- ubuntu mysql default password Ubuntu mysql default parole - -- ubuntu mysql root password Ubuntu mysql root parole - -- changing default password mysql mainīt noklusēto paroli mysql - -- change mysql password windows mainīt mysql parole logi - -- change mysql-server password mainīt mysql-server paroli - -- how to reset mysql root password kā nomainīt mysql root parole - -- how to clear password in mysql kā skaidrs paroli mysql - -- how to reset mysql password kā reset mysql parole - -- mysql root password change mysql root password maiņa - -- mysql password recovery mysql Paroles atjaunošana - -- password recovery of mysql database in ubuntu Paroles atjaunošana MySQL datubāzi ubuntu - -- reset mysql password ubuntu reset mysql parole ubuntu - -- start mysql in ubuntu af root sākums mysql in Ubuntu af saknes - -- ubuntu mysql password Ubuntu mysql parole - -- ubuntu mysql root Ubuntu mysql root - -- Recover MySQL root password and user name in Ubuntu Atgūt MySQL root paroli un lietotājvārdu Ubuntu - -- +mysql +change root password + mysql + izmaiņas root parole - -- Alterar senha MySQL query Alterar paroli MySQL query - -- change mysql database password windows mainīt mysql datubāzes parole logi - -- change lost password mysql root mainīt Aizmirsu paroli mysql root - -- changing admin mysql password mainīt admin mysql parole - -- change mysql root user mainīt mysql root lietotāja - -- change password for mysql user mainīt paroli mysql lietotāja - -- change lost password mysql mainīt Aizmirsu paroli mysql - -- change mysql password in windows mainīt mysql paroli logi - -- change mysql password mainīt mysql parole - -- change root mysql password mainīt mysql root parole - -- change root password mysql windows mainīt root parole mysql logiem - -- change password mysql root Mainīt paroli mysql root - -- change passpord mysql mainīt passpord mysql - -- crackear contraseña mysql crackear contraseña mysql - -- crack mysql root kreka mysql root - -- default user password for mysql ubuntu noklusējuma lietotāja parole mysql Ubuntu - -- default mysql password root ubuntu default mysql parole root ubuntu - -- forgot mysql root password ubuntu aizmirsāt mysql root parole ubuntu - -- forget mysql pass users command aizmirst mysql pass lietotāji komanda - -- forgotten mysql root password + windows aizmirsta mysql root parole + windows - -- freebsd forgotten password mysql freebsd aizmirsta parole mysql - -- gpu crack mysql password GPU kreka mysql parole - -- how to reset password mysql 5 kā nomainīt paroli mysql 5 - -- how to edit mysql password kā rediģēt mysql parole - -- how to recover mysql database that has no root access kā atgūt mysql datu bāzi, kas nav root pieeja - --