Èç¹ûÄãÍü¼ÇÁËÄãµÄMYSQLµÄroot¿ÚÁîµÄ»°£¬Äã¿ÉÒÔͨ¹ýÏÂÃæµÄ¹ý³Ì»Ö¸´¡£
1. Ïòmysqld server ·¢ËÍkillÃüÁî¹Øµômysqld server(²»ÊÇ kill -9),´æ·Å½ø³ÌIDµÄÎļþͨ³£ÔÚMYSQLµÄÊý¾Ý¿âËùÔÚµÄĿ¼ÖС£
kill `cat /mysql-data-directory/hostname.pid`
Äã±ØÐëÊÇUNIXµÄrootÓû§»òÕßÊÇÄãËùÔËÐеÄSERVERÉϵÄͬµÈÓû§£¬²ÅÄÜÖ´ÐÐÕâ¸ö²Ù×÷¡£
2. ʹÓÃ'--skip-grant-tables' ²ÎÊýÀ´Æô¶¯ mysqld¡£
3. ʹÓÃ'mysql -h hostname mysql'ÃüÁîµÇ¼µ½mysqld server £¬ÓÃgrantÃüÁî¸Ä±ä¿ÚÁî¡£ÄãÒ²¿ÉÒÔÕâÑù×ö£º'mysqladmin -h hostname -u user password 'new password''¡£
£¨ÆäʵҲ¿ÉÒÔÓÃuse mysql; update user set password =password('yourpass') where user='root'¡¡À´×öµ½¡££©
4. ÔØÈëȨÏÞ±í£º `mysqladmin -h hostname flush-privileges' £¬»òÕßʹÓà SQL ÃüÁî`FLUSH PRIVILEGES'¡££¨µ±È»£¬ÔÚÕâÀÄãÒ²¿ÉÒÔÖØÆômysqld¡££©
jerry520 ÓÚ 2009-03-27 16:44:30·¢±í:
ºÇºÇ,²»´í°¡!ѧϰÁË.
linux ÓÚ 2005-09-27 00:40:06·¢±í:
Áì½ÌÁË
ccs ÓÚ 2005-08-11 00:11:43·¢±í:
ÊܽÌ
chentong ÓÚ 2005-07-11 00:13:58·¢±í:
²»´í