MySQL - ERROR 1045: Access denied for user 'debian-sys-maint' @ 'localhost'

Another MySQL problem, which some say is I ran into: "ERROR 1045: Access denied for user 'debian-sys-maint' @ 'localhost'" I want you briefly explain the problem + solution

The problem

Debian has its own checking account (debian-sys-maint) to start / stop and status of MySQL. This user + password information is stored in the file / etc / mysql / debian.cnf. After a new installation of MySQL, or migrating from one database including user tables to a new system password for the user agrees not agree more:

/etc/init.d/mysql start
Starting MySQL database server: mysqld ..
Checking for corrupt, not cleanly closed and upgrade needing tables..
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
nvieking1:/# ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

The solution

The file / etc / mysql / debian.cnf open and the password for the user debian-sys-maint read and copy.

Connect to the root user to the database:

mysql -u root -p

The password of the user debian-sys-maint with the following command (change <<password>> is to replace the read password to):

mysql> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<<passwort>>' WITH GRANT OPTION;

Now you can start your MySQL database again.

/etc/init.d/mysql start
Starting MySQL database server: mysqld ..
Checking for corrupt, not cleanly closed and upgrade needing tables..

Similar items:

  1. MySQL user password change
  2. Web server (LAMP) installation in Debian 5 (Lenny) and Ubuntu
  3. Icinga - Open Source Monitoring - Installing on Debian 5 (Lenny) with IDOUtils and MySQL database
  4. MySQLDump - Can not open file (errno: 24) when using LOCK TABLES
  5. Sequel Pro - MySQL with SSH Tunnel Manager for MAC OS X

Tags: , , , , ,

Monday, July 6th, 2009 Linux

5 Comments on MySQL - ERROR 1045: Access denied for user 'debian-sys-maint' @ 'localhost'

  • Benny says:

    juhu, finally found a solution to my problem.
    After ewiglangen dig around ...

    Thanks Thanks Thanks Thanks

  • Thomas says:

    Hi,

    that explains so united and works immediately!

    Thank you for that!

  • Grex says:

    In my case I had to explicitly set the password:

    set password for 'debian-sys-maint' @ 'localhost'='<>':

    After then GRANT was necessary in order to have (finally worked out) ...

    Now I just need to be clarified why MythTV can not upgrade database ... 0:22 to 0:21: ((Debian Sid / Sidux)

  • Leave a Reply

    rssfeed xing delicious
    Sysadmin's Life on Facebook
    steve jobs steve jobs
      Bloggeramt.de Blog directory - blog directory bloggerei.de blogoscoop blogtotal www.beliebtestewebseite.de technorati_fav Creative Commons License Internet & Communications