Здравствуйте.
Так получилось, что нужно было изменить пароль рута. Пароль не известен.
Выполняю действия, результат:/home/xxxx>ps -ax | grep mysql
24624 p0 S 0:00.01 /bin/sh /usr/local/bin/mysqld_safe --skip-grant-tables
24639 p0 S 0:00.14 /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/mysql --user=mysql --pid-file=/var/db/mysql/it.d
/home/xxxx>mysqladmin -u root password '123456'
mysqladmin:
You cannot use 'password' command as mysqld runs
with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead
/home/xxxx>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 4.1.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> 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('123456') WHERE User='root';
Query OK, 0 rows affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 1
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> quit
Bye
/home/xxxx>killall -9 mysql
/home/xxxx>/usr/local/etc/rc.d/mysql-server.sh start
/home/xxxx>ps -ax | grep mysql
24676 p0 I 0:00.02 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql
24699 p0 S 0:00.80 /usr/local/libexec/mysqld -defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql
/home/xxxx>mysql -u root -p mysql
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
В чем проблема?