Change and Reset MySQL root Password Reset cambiamento e MySQL root Password
Other then the ways specified Poi altri modi specificati here qui 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: per reimpostare e cambiare la password di root per MySQL banca dati nel caso in cui la password viene dimenticata o smarrita, le seguenti istruzioni spiegano nei dettagli il modo alternativo durante l'ultima parte della guida, se non ulteriori file deve essere creato:
- Login as root to the Windows or Unix-like (Unix, Linux or BSD) machine with the MySQL server. Login come root per Windows o Unix-like (Unix, Linux o BSD) macchina con il server MySQL.
- Stop the MySQL server by using either of the following command: Arrestare il server MySQL utilizzando uno dei seguenti comandi:
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 stop-server.sh - Open the mysql server startup script (ie mysql-server.sh - the file executed to start or stop MySQL server. Aprire il server MySQL script di avvio (vale a dire mysql-server.sh - eseguito il file per avviare o interrompere server MySQL.
- Add –skip-grant-tables to the end of the line that contains the mysqld_safe command as its parameter. Aggiungi-skip-concessione-tabelle alla fine della riga che contiene il comando mysqld_safe come parametro.
- Start MySQL server with the following command: Inizio server MySQL con il seguente comando:
Linux: /etc/rc.d/init.d/mysql start Linux: / etc / rc.d / init.d / mysql start
FreeBSD: /usr/local/etc/rc.d/mysql-server.sh start FreeBSD: / usr / local / etc / rc.d / mysql start-server.sh - Alternatively, start the MySQL server directly and skip the editing with the following command: In alternativa, avviare il server MySQL e saltare direttamente la redazione con il seguente comando:
mysqld_safe –skip-grant-tables & mysqld_safe-skip-concessione-tabelle &
Depending on your path environment, you may need to point to the correct directory where mysqld_safe is instead. A seconda del tuo percorso di ambiente, potrebbe essere necessario per puntare a correggere la directory in cui è invece mysqld_safe.
- Run the following commands to login as the mysql user and connect to mysql user/permission database: Eseguire i seguenti comandi per effettuare il login come utente mysql e connettersi a mysql utente / autorizzazione banca dati:
# mysql -u root mysql # Mysql-u root mysql
- Run the update queries to change the MySQL password: Eseguire l'aggiornamento di query per modificare la password di MySQL:
mysql> UPDATE user SET Password=PASSWORD(’newrootpassword’) WHERE User=’root’; mysql> UPDATE utente SET Password = password ( 'newrootpassword'), dove user = 'root';
mysql> FLUSH PRIVILEGES; mysql> flush privileges;Note: Replace newrootpassword with the new root password for MySQL server. Nota: Sostituire newrootpassword con la nuova password di root per il server MySQL. Flush Privileges is needed to making the password change effect immediately. Flush privileges è necessario per rendere l'effetto cambiare la password immediatamente.
- Exit mysql database client by typing exit. Uscita database mysql client digitando uscita.
- Stop MySQL server with commands listed at step 2. Stop server MySQL con i comandi di cui al punto 2.
- Open the mysql server startup script edit in step 3 again and remove the –skip-grant-tables parameter that has been added. Aprire il server MySQL script di avvio di modificare nel passaggio 3 di nuovo e rimuovere la-skip-concessione-tabelle parametro che è stato aggiunto.
- Start MySQL server by using command from step 5 or 6. Inizio server MySQL utilizzando il comando passo da 5 o 6.
For Redhat Linux users, use the following instructions as the root user of Redhat Linux machine: Per gli utenti di Linux RedHat, utilizzare le seguenti istruzioni come utente root della macchina Linux RedHat:
- Stop MySQL process by using command: Stop MySQL processo utilizzando il comando:
# killall mysqld # Killall mysqld
- Start the MySQL server with following options: Avviare il server MySQL con le seguenti opzioni:
# /usr/libexec/mysqld -Sg –user=root & # / Usr / libexec / mysqld-SG-user = root &
- Start the MySQL client: Avviare il client MySQL:
# mysql # MySQL
You should see the following message: Si dovrebbe vedere la seguente messaggio:
Welcome to the MySQL monitor. Benvenuti a MySQL monitor. Commands end with ; or g. Con comandi fine; o g.
Your MySQL connection id is 1 to server version: 3.xx.xx MySQL il tuo codice di connessione è di 1 a versione del server: 3.xx.xxType ‘help;’ or ‘h’ for help. Type 'help;' o 'h' per aiuto. Type ‘c’ to clear the buffer. Tipo 'c' chiaro a buffer.
mysql>
- Use mysql database: Utilizzare database MySQL:
mysql> USE mysql mysql> USE mysql
You should see the following message: Si dovrebbe vedere la seguente messaggio:
Reading table information for completion of table and column names Tavolo da lettura di informazioni per il completamento del tavolo e nomi di colonna
You can turn off this feature to get a quicker startup with -A È possibile disattivare questa funzione per ottenere un più rapido avvio con-ADatabase changed Database changed
- Then, update the password for the root user with the following command: Quindi, aggiornare la password per l'utente root con il seguente comando:
UPDATE user SET password=password(”newpassword”) WHERE user=”root”; UPDATE utente SET password = password ( "Newpassword") dove l'utente = "root";
Replace newpassword with your desired password. Newpassword sostituire con il tuo password desiderata. You should see the following message: Si dovrebbe vedere la seguente messaggio:
Query OK, 2 rows affected (0.03 sec) Query OK, 2 righe colpite (0,03 sec)
Rows matched: 2 Changed: 2 Warnings: 0 Righe ha trovato: 2 Changed: 2 Warnings: 0Rows affected may be different, but the Query OK should be there. Righe colpite possono essere diverse, ma la Query OK dovrebbe essere lì.
- Flush the database privileges to reload it in order to make the changes effective: Flush banca dati privilegi per ricaricare al fine di apportare le modifiche efficaci:
mysql> flush privileges; mysql> flush privileges;
You should get the following result: Si dovrebbe ottenere il seguente risultato:
Query OK, 0 rows affected (0.02 sec) Query OK, 0 righe colpite (0,02 sec)
- Exit the MySQL client by typing exit. Uscita il client MySQL digitando uscita.
- Kill the MySQL server process by typing killall mysqld. Uccidere il processo server MySQL digitando killall mysqld.
- Then start MySQL again: Quindi avviare nuovamente MySQL:
/etc/init.d/mysqld start / etc / init.d / mysqld inizio
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale in lingua inglese whenever possible. quando possibile.
Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .
Related Articles Articoli correlati
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 L'installazione di server Web in FreeBSD 6,0 con Apache 2,2, 5,0 MySQL e PHP 5 - Parte 3
- Reset the Root Password of MySQL Server Reimpostare la password di root di MySQL Server
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 Installare server Web in Windows XP con Apache2, PHP5 e MySQL4 - Parte 4
- Check and Optimize MySQL Database Automatically with Crontab/Cron Controllare e ottimizzare la base di dati di MySQL automaticamente con crontab / cron
- How to Recover and Reset Gmail (Google Account) Password Come recuperare e Reset Gmail (account Google) Password
- How to Reset AdSense Password Not Associated with Google Account Come reimpostare la password di AdSense non sono associati ad account Google
- How to Reset WordPress Password to Recover Forgotten Secret Come reimpostare wordpress per recuperare la password dimenticata segreto
- Change Oracle Database User Password Cambia database Oracle Utente Password
- Apple iPhone Root Password and Mobile User Password Apple iPhone password di root e mobili Utente Password
- Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank Correzione per il monitoraggio Munin mysql plug grafico non mostra o vuoto
















June 6th, 2006 18:18 6 giugno 2006 18.18
[...] 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): [...] [...] In alternativa, su qualsiasi piattaforma, mysql client può essere utilizzata per impostare la nuova password, anche se è meno sicuro modo di reimpostazione della password (istruzioni dettagliate qui): [...]
July 9th, 2006 12:05 9 luglio 2006 12:05
I wanna reset my ZXDSL 831 ADSL Modemn Voglio reimpostare la mia ZXDSL 831 ADSL Modemn
Plz tell me the way how to reset it Plz dimmi il modo come reimpostarla
I need to do that right now Ho bisogno di farlo ora
Best Rgds Migliori Rgds
dugger(vincitore) Dugger (vincitore)
December 19th, 2006 14:54 19 dicembre 2006 14:54
[...] Re: Help me retrieve my password Try this link… Change and Reset MySQL root Password [...] Re: Help me recuperare la mia password Prova questo link… Cambia e reimpostare la password di root di MySQL
April 23rd, 2007 08:23 23 aprile 2007 08:23
[...] Change and Reset MySQL root Password » My Digital Life (tags: mysql administration) No Tags Gelesen: 2 / heute: 2 [...] [...] Cambia e reimpostare la password di root di MySQL »Il mio Digital Life (tag: mysql amministrazione) n. Tag Gelesen: 2 / oggi: 2 [...]
May 5th, 2008 16:52 5 maggio 2008 16:52
[...] judulnya), setelah googling cuma dapat cara untuk mereset dan mengganti password MySQL di UNIX-like di sini. [...] Judulnya), setelah googling cuma come dovrebbe disponibili per quelle mereset presente mengganti MySQL password di Unix-like di Sini. Wah, perlu sedikit modifikasi ni … Berikut cara2 yang saya lakukan: 1. Wah, è richiesta la sedikit modifikasi ni… berikut cara2 che ho lakukan: 1. Kill proses MySQL [...] Uccidere proses MySQL [...]
July 3rd, 2008 05:46 3 luglio 2008 05:46
On ubuntu, command is mysqld_safe –-skip-grant-tables & A Ubuntu, comando è mysqld_safe - skip-concessione-tabelle &
Extra dash is required so mysql can parse it correctly. Extra trattino è richiesto in modo mysql può analizzare correttamente.