Change and Reset MySQL root Password Mudança e Reset MySQL raiz Senha

Other then the ways specified Outras formas especificadas em seguida a here aqui 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: para redefinir e alterar a senha do root para banco de dados mySQL, no caso de que a senha é esquecido ou perdido, as seguintes instruções explicar em detalhes a forma alternativa ao nível da última parte do guia, onde nenhum arquivo adicional tem de ser criado:

  1. Login as root to the Windows or Unix-like (Unix, Linux or BSD) machine with the MySQL server. Login como raiz para o Windows ou Unix-like (Unix, Linux ou BSD) máquina com o servidor MySQL.
  2. Stop the MySQL server by using either of the following command: Pare o servidor MySQL, usando um dos seguintes comandos:

    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 parar

  3. Open the mysql server startup script (ie mysql-server.sh - the file executed to start or stop MySQL server. Abra o servidor MySQL scripts (ou seja, mysql-server.sh - executa o arquivo para iniciar ou parar o MySQL server.
  4. Add –skip-grant-tables to the end of the line that contains the mysqld_safe command as its parameter. Adicione-skip-concessão de quadros para o final da linha que contém o comando mysqld_safe como seu parâmetro.
  5. Start MySQL server with the following command: Inicie o servidor MySQL com o seguinte 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-server.sh início

  6. Alternatively, start the MySQL server directly and skip the editing with the following command: Como alternativa, inicie o servidor MySQL e saltar diretamente a edição com o seguinte comando:

    mysqld_safe –skip-grant-tables & mysqld_safe-skip-conceder-quadros &

    Depending on your path environment, you may need to point to the correct directory where mysqld_safe is instead. Dependendo do seu caminho ambiente, pode ser necessário para apontar para o diretório onde mysqld_safe é correto vez.

  7. Run the following commands to login as the mysql user and connect to mysql user/permission database: Execute os seguintes comandos para login como o usuário mysql e conectar ao usuário mysql / permissão base de dados:

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

  8. Run the update queries to change the MySQL password: Executar a atualização de consulta para alterar o MySQL senha:

    mysql> UPDATE user SET Password=PASSWORD(’newrootpassword’) WHERE User=’root’; mysql> UPDATE user SET Password = PASSWORD ( 'newrootpassword') WHERE User = 'root';
    mysql> FLUSH PRIVILEGES; mysql> FLUSH PRIVILEGES;

    Note: Replace newrootpassword with the new root password for MySQL server. Observação: Substitua newrootpassword com a nova senha para o servidor MySQL raiz. Flush Privileges is needed to making the password change effect immediately. Flush Privilégios é necessária para tornar a senha alterar efeito imediato.

  9. Exit mysql database client by typing exit. Exit mysql database cliente digitando a sair.
  10. Stop MySQL server with commands listed at step 2. Parar servidor MySQL com comandos listados na etapa 2.
  11. Open the mysql server startup script edit in step 3 again and remove the –skip-grant-tables parameter that has been added. Abra o servidor MySQL scripts editar no passo 3 novamente e remova-o pular de concessão de quadros parâmetro que foi adicionado.
  12. Start MySQL server by using command from step 5 or 6. Inicie o servidor MySQL usando comando do passo 5 ou 6.

For Redhat Linux users, use the following instructions as the root user of Redhat Linux machine: Red Hat Linux para os usuários, use as seguintes instruções como a raiz do usuário Linux RedHat máquina:

  1. Stop MySQL process by using command: Parar processo usando o MySQL comando:

    # killall mysqld # Killall mysqld

  2. Start the MySQL server with following options: Inicie o servidor MySQL com os seguintes opções:

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

  3. Start the MySQL client: Inicie o cliente MySQL:

    # mysql # MySQL

    You should see the following message: Você deverá ver a seguinte mensagem:

    Welcome to the MySQL monitor. Bem vindo ao MySQL monitor. Commands end with ; or g. Comandos com efeito, ou g.
    Your MySQL connection id is 1 to server version: 3.xx.xx A sua ligação MySQL id é 1 para a versão: 3.xx.xx

    Type ‘help;’ or ‘h’ for help. Digite 'help;' ou 'h' para ajuda. Type ‘c’ to clear the buffer. Tipo "c" para limpar o buffer.

    mysql>

  4. Use mysql database: Use banco de dados MySQL:

    mysql> USE mysql mysql> USE mysql

    You should see the following message: Você deverá ver a seguinte mensagem:

    Reading table information for completion of table and column names Leitura tabela informações para a conclusão de mesa e de coluna nomes
    You can turn off this feature to get a quicker startup with -A Você pode desativar esse recurso para obter um rápido arranque com-A

    Database changed Banco de dados alterados

  5. Then, update the password for the root user with the following command: Em seguida, atualizar a senha para o usuário root com o seguinte comando:

    UPDATE user SET password=password(”newpassword”) WHERE user=”root”; UPDATE user SET password = password ( "newpassword") WHERE user = "root";

    Replace newpassword with your desired password. Substituir newpassword com sua senha desejada. You should see the following message: Você deverá ver a seguinte mensagem:

    Query OK, 2 rows affected (0.03 sec) Query OK, 2 linhas afectadas (0,03 segundos)
    Rows matched: 2 Changed: 2 Warnings: 0 Linhas correspondência: 2 Changed: 2 Advertências: 0

    Rows affected may be different, but the Query OK should be there. As linhas afetadas podem ser diferentes, mas o Query OK deveria estar lá.

  6. Flush the database privileges to reload it in order to make the changes effective: Lavar o banco de dados privilégios para recarregar-lo, a fim de tornar eficazes as mudanças:

    mysql> flush privileges; mysql> flush privilégios;

    You should get the following result: Você deve obter o seguinte resultado:

    Query OK, 0 rows affected (0.02 sec) Query OK, 0 linhas afectadas (0,02 segundos)

  7. Exit the MySQL client by typing exit. Saia do MySQL cliente digitando a sair.
  8. Kill the MySQL server process by typing killall mysqld. Matar o servidor MySQL processo escrevendo killall mysqld.
  9. Then start MySQL again: Então inicie o MySQL novamente:

    /etc/init.d/mysqld start / etc / init.d / mysqld iniciar

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.

Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .



6 Responses to “Change and Reset MySQL root Password” 6 Responses para "Mudança e MySQL raiz Senha Reset"

  1. Reset the Root Password of MySQL Server » My Digital Life Redefinir a senha do root do MySQL Server "Minha vida digital
    June 6th, 2006 18:18 6 de junho de 2006 18:18
    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): [...] [...] Em alternativa, em qualquer plataforma, cliente mysql pode ser utilizado para definir a nova senha, mas ele é menos segura maneira de redefinir a senha (aqui instruções detalhadas): [...]

  2. Vincitore
    July 9th, 2006 12:05 9 de julho de 2006 12:05
    2

    I wanna reset my ZXDSL 831 ADSL Modemn Eu quero o meu reset ZXDSL 831 ADSL Modemn
    Plz tell me the way how to reset it Plz diga-me o caminho para redefinir a forma como ele
    I need to do that right now Eu preciso fazer isso agora

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

  3. Help me retrieve my password - Geeks Talk Ajude-me a recuperar minha senha - Geeks Talk
    December 19th, 2006 14:54 19 de dezembro de 2006 14:54
    3

    [...] Re: Help me retrieve my password Try this link… Change and Reset MySQL root Password [...] Re: Ajude-me a recuperar minha senha Experimente este link… Mudança e Reset MySQL raiz Senha

  4. links for 2007-04-23 | Patrick Kempf ligações para 2007-04-23 | Patrick Kempf
    April 23rd, 2007 08:23 23 de abril de 2007 08:23
    4

    [...] Change and Reset MySQL root Password » My Digital Life (tags: mysql administration) No Tags Gelesen: 2 / heute: 2 [...] [...] Mudança e Reset Password MySQL raiz "Minha Vida Digital (tags: mysql administração) n º Tags Gelesen: 2 / heute: 2 [...]

  5. Mengubah password root pada MySQL 5.0 di Windows. Mengubah senha raiz pada MySQL 5,0 di Windows. « Iwan Binanto: “hari-hari ku yang berlalu ..” «Iwan Binanto:" hari-ku hari yang berlalu .. "
    May 5th, 2008 16:52 5 de maio de 2008 16:52
    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 senha MySQL di UNIX-like di sini. Wah, perlu sedikit modifikasi ni … Berikut cara2 yang saya lakukan: 1. Wah, perlu sedikit modifikasi ni… Berikut cara2 yang saya lakukan: 1. Kill proses MySQL [...] Kill proses MySQL [...]

  6. Rajesh Cheethirala Rajesh Cheethirala
    July 3rd, 2008 05:46 3 de julho de 2008 05:46
    6

    On ubuntu, command is mysqld_safe –-skip-grant-tables & Em Ubuntu, comando é mysqld_safe - skip-conceder-quadros &

    Extra dash is required so mysql can parse it correctly. Pitada extra é necessária de modo mysql pode analisar-la corretamente.

Leave a Reply Deixe uma resposta

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> Você pode usar estas tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Subscreva sem comentar


Custom Search

New Articles Novos Artigos

Incoming Search Terms for the Article Incoming Termos de pesquisa para o artigo

change mysql root password MySQL raiz alterar senha - -- mysql change root password MySQL mudança raiz senha - -- mysql change password MySQL alterar senha - -- reset mysql password redefinir o MySQL password - -- reset mysql root password redefinir o MySQL raiz senha - -- mysql password change MySQL alterar senha - -- mysql password reset MySQL redefinição de senha - -- mysql password recovery MySQL senha recuperação - -- change root password mysql alterar senha root mysql - -- change password mysql alterar senha MySQL - -- retrieve mysql root password recuperar o MySQL raiz senha - -- forgot mysql password Esqueci MySQL password - -- mysql root password change MySQL raiz alteração de senha - -- mysql root password reset MySQL raiz redefinição de senha - -- reset mysql password ubuntu redefinir o MySQL senha Ubuntu - -- reset mysql root pass redefinir o MySQL raiz passar - -- mysql retrieve root password MySQL raiz recuperar senha - -- ubuntu stop mysql Ubuntu parar MySQL - -- change password in mysql alterar senha no MySQL - -- mysql reset root pass MySQL reset raiz passar - -- How to change Mysql root password Como alterar a senha raiz MySQL - -- change mysql password ubuntu MySQL alterar senha Ubuntu - -- CHANGE MYSQL PASSWORD Mysql alterar senha - -- how to reset mysql password MySQL como redefinir a senha - -- mysql reset privileges MySQL reset privilégios - -- ubuntu reset mysql root password Ubuntu redefinir o MySQL raiz senha - -- ubuntu reset mysql password Ubuntu redefinir o MySQL password - -- how to change password in mysql Como alterar a senha no mysql - -- mysql ubuntu default password MySQL Ubuntu senha padrão - -- retrieve mysql password MySQL recuperar senha - -- mysql reset password MySQL redefinição de senha - -- ubuntu mysql reset password Ubuntu MySQL redefinição de senha - -- reset mysql root password ubuntu redefinir o MySQL raiz senha Ubuntu - -- crack mysql password crack MySQL password - -- reset mysql password linux redefinir o MySQL password Linux - -- forgot mysql root password Esqueci MySQL raiz senha - -- reset mysql pass redefinir o MySQL passar - -- all todos - -- reset password mysql redefinir senha MySQL - -- stop mysql ubuntu stop mysql Ubuntu - -- ubuntu change mysql password Ubuntu mudança MySQL password - -- ubuntu mysql change password Ubuntu MySQL alterar senha - -- mysql set password MySQL conjunto senha - -- mysql lost password MySQL perdeu a senha - -- mysql forgot password MySQL esqueceu sua senha - -- mysql reset password linux MySQL redefinir senha Linux - -- mysql reset root MySQL reset raiz - -- changing mysql root password mudando o MySQL raiz senha - -- how to reset mysql root password como redefinir a senha root mysql - -- ubuntu mysql default password Ubuntu MySQL senha padrão - -- mysql forgot root password MySQL raiz esqueci senha - -- mysql change password root MySQL alterar senha raiz - -- ubuntu mysql set root password Ubuntu MySQL conjunto raiz senha - -- mysql "change password" MySQL "mudar a senha" - -- lost mysql password MySQL senha perdida - -- mysql change root pass MySQL mudança raiz passar - -- mysql root change password MySQL raiz alterar senha - -- ubuntu mysql reset root password Ubuntu MySQL reset raiz senha - -- resetting mysql password redefinindo o MySQL password - -- mysql reset root password MySQL reset raiz senha - -- change password mysql ubuntu alterar senha MySQL Ubuntu - -- change mysql root pass mudança MySQL raiz passar - -- change mysql password linux senha alterar o MySQL Linux - -- mysql clear password MySQL claro senha - -- mysql password MySQL password - -- mysql lost root password windows MySQL perdeu raiz senha do Windows - -- mysql reset user MySQL reset usuário - -- set mysql password definir o MySQL password - -- set password mysql Definir senha MySQL - -- ubuntu mysql password Ubuntu MySQL password - -- lost mysql password ubuntu perdeu o MySQL senha Ubuntu - -- linux mysql reset password Linux MySQL redefinição de senha - -- reset mysql database password repor banco de dados MySQL password - -- retrieve lost mysql password recuperar perdido MySQL password - -- linux reset mysql password Linux redefinir o MySQL password - --