mysql – Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)

Когато преместих всички бази от един MySQL на друг(под всички се разбира и mysql базата) при стартиране или рестартиране дава следната грешка:

Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
# ERROR 1045 (28000): Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)

Това се дължи на различни пароли т.е.  има два варианта

1. да се промени паролата с нова:
1.1 Файл /etc/mysql/debian.cnf
password = НОВА ПАРОЛА

1.2
# mysql -u root -p

mysql>GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@’localhost’ IDENTIFIED BY ‘НОВА ПАРОЛА’ WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;

1.3 /etc/init.d/mysql restart

2. да се добави паролата на предишния mysql server
2.1 Файл /etc/mysql/debian.cnf
password = ПАРОЛАТА ОТ ПРЕДИШНИЯ MySQL СЪРВЪР

Категория:

Logged in as {{omniform_current_user_display_name}}. Edit your profile. Log out? Required fields are marked *

Your email address will not be published. Required fields are marked *

Comments are closed.

You must be logged in to post a comment.