Password di root dimenticata

Password di root dimenticata

Come fare quando si dimentica la password di root di mysql? Ecco un metodo semplice ed efficace.

Se vi siete dimenticati la password di root, basterà avviare mysqld da root, ignorando la tabella dei privilegi. In un terminale, da root, scrivete:

# /etc/init.d/mysql stop
# mysqld --skip-grant-tables &
# mysql


e quindi dalla console mysql a cui avrete avuto accesso:

mysql> USE mysql
mysql> UPDATE user SET password=password('new_password') WHERE user='root';
mysql> FLUSH privileges;


Infine killiamo il mysqld di emergenza e riapriamo il demone:

# killall mysqld
# /etc/init.d/mysql start

Notes

Questa guida è valida solamente per sistemi linux.

tags mysql, root, linux, password dimenticata, password root mysql

Publication details

Category: MySQL

Published by: loryzz on date: 06.01.2008 21:02:04

Last edit by: loryzz on date: 21.01.2009 11:32:43

Statistics

Details  This article has been viewed 5.998 times.

Send to

add to digg add to reddit add to furl add to facebook add to delicious add to google add to stumbleupon add to technorati add to ask add to live

Ratings

  • Currently 0; ?>/ TOTALSTARS
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

Details 0 user comments, 0 still waiting.

Leave a comment

All comments must be approved by site administrator.
Please write comments on topic. Spam will be never approved.


Confirmation code

Please take a look to image and insert character into the form field.