FreeBSD 6.2 mysql error message
åœæŽ‰ mysqld ,然後用 –skip-grant-tables åƒæ•¸åŽ»å•Ÿå‹• mysql
#mysqld_safe –user=mysql –skip-grant-tables &
#mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.67-log FreeBSD port: mysql-server-5.0.67_1
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> UPDATE mysql.user SET Password=PASSWORD(‘pass1234′) WHERE User= ‘root’ ;
Query OK, 2 rows affected (0.00 sec)
Rows matched: 3 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
å³å¯,離開å†ç™»å…¥ä¸€æ¬¡
mysql> exit
Bye
#mysql -u root
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.67-log FreeBSD port: mysql-server-5.0.67_1
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
åƒè€ƒè³‡æ–™:
http://www.mydigitallife.info/2006/04/23/reset-the-root-password-of-mysql-server/