sudo /etc/init.d/mysql stop

  •  
  • [Output ] 
  • mysql stop/waiting  

 sudo mysqld_safe –skip-grant-tables &

  • [Output]  
  • 110309 19:59:15 mysqld_safe Logging to syslog.
  • 110309 19:59:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

mysql -u root

  •  
  • [Output]
  • Welcome to the MySQL monitor.  Commands end with ; or \g.
  • Your MySQL connection id is 1

on “mysql>” prompt write “use mysql” ;

  •  
  • [Output] 
  • Database changed

on “mysql>” prompt write “ update user set password=PASSWORD(“your-new-password“) where User=’root’; “

  • [Output] 
  • Query OK, 2 rows affected (0.00 sec)
  • Rows matched: 2  Changed: 2  Warnings: 0

flush privileges; quit ;

  • [Output]
  • Bye

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">