Пробовал восстанавливать пароль по этому ману http://wiki.archlinux.org/index.php/MySQL#...e_Root_Password
Но это не помогает.
Вот выхлоп:
Код: Выделить всё
[root@my-desktop mypc]# mysql -u root mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@my-desktop mypc]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)Вот как пытался восстановить:
Код: Выделить всё
[root@my-desktop mypc]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@my-desktop mypc]# /etc/rc.d/mysqld stop
:: Stopping MySQL Server [DONE]
[root@my-desktop mypc]# mysqld_safe --skip-grant-tables &
[1] 23105
[root@my-desktop mypc]# 100809 15:27:06 mysqld_safe Logging to '/var/lib/mysql/my-desktop.err'.
100809 15:27:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
^C
[root@my-desktop mypc]# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with; or \g.
Your MySQL connection id is 1
Server version: 5.1.47 Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> UPDATE user SET password=PASSWORD("qwerty") WHERE User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@my-desktop mypc]# /etc/rc.d/mysqld restart
:: Stopping MySQL Server [BUSY] 100809 15:27:32 mysqld_safe mysqld from pid file /var/lib/mysql/my-desktop.pid ended
[DONE]
:: Starting MySQL Server [DONE]
[1]+ Done mysqld_safe --skip-grant-tables
[root@my-desktop mypc]# mysql -u root mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@my-desktop mypc]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)