System Version Information:
# Mysql-V
MySQL ver 14.12 distrib 5.0.32, for PC-Linux-GNU (IMG) using Readline 5.2
# Uname-
Linux auto-at-server 2.6.18-6-686 #1 SMP Tue Jun 17 21:31:27 UTC 2008 i686 GNU/Linux
The following error is reported when you restart MYSQL:
#/Etc/init. d/MySQL restart
* Stopping MySQL database server mysqld [fail]
* Starting MySQL database server mysqld [OK]
/Usr/bin/mysqladmin: connect to server at 'localhost' failed
Error: 'Access denied for user' Debian-sys-maint' @ 'localhost' (using password: Yes )'
Google: "Debian-sys-Maint" is used to start and stop databases and other database maintenance operations (Linux operating system ).
How can I change the password of this device? I checked it for a long time and explained it as follows:
When MySQL is started in Linux, MySQL will be in the/etc/MySQL/Debian. CNF file.
Query the password information of a Debian-sys-Maint user.
The password information in this file is synchronized from MySql in real time, and the problem should be solved. MySQL unexpectedly exited, causing information not to be synchronized.
I did modify the password of the root user before adding it. I may have changed the password by mistake.
The solution is as follows:
1: query the password information of the Debian-sys-Maint user.
# Cat/etc/MySQL/Debian. CNF
# Automatically generated for Debian scripts. Do not touch!
[Client]
Host = localhost
User = Debian-sys-Maint
Password = n4ashup04s1j32x5
Socket =/var/run/mysqld. Sock
[Mysql_upgrade]
User = Debian-sys-Maint
Password = n4ashup04s1j32x5
Socket =/var/run/mysqld. Sock
Basedir =/usr
2: log on to MySQL and change the password.
# Mysql-u root-P <password>
Mysql> grant all privileges on *. * To 'debian-sys-maint' @ 'localhost' identified by 'n4ashup04s1j32x5 ';
3: reboot successful
#/Etc/init. d/MySQL restart
* Stopping MySQL database server mysqld [OK]
* Starting MySQL database server mysqld [OK]
* Checking for login upt, not cleanly closed and upgrade needing tables.