`

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y

 
阅读更多

[trixbox1.localdomain ~]# mysql -u root

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 19

Server version: 5.0.77 Source distribution

 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 

mysql> use mysql

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

 

Database changed

mysql>  UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’; 

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '’newpassword’) where USER=’root’' at line 1

mysql> update user set password=old_password('scf') where user='root' and host='localhost';

Query OK, 1 row affected (0.00 sec)

Rows matched: 1  Changed: 1  Warnings: 0

 

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

 

mysql> quit

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics