[MDEV-3596] LP:983322 - 'Access denied for user debian-sys-maint@localhost' MariaDB 5.5 Ubuntu 10.04 Created: 2012-04-16  Updated: 2012-10-04  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jonathan Bailon Segura (Inactive) Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug983322.xml    

 Description   
  • Starting MariaDB database server mysqld [ OK ]
  • Checking for corrupt, not cleanly closed and upgrade needing tables.

Procesando disparadores para libc-bin ...
ldconfig deferred processing now taking place

ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

xxx@ubuntu:~$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 5.5.23-MariaDB-mariadb1~lucid-log mariadb.org binary distribution

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.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON . TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'wVx0bRaK7VfZ5dQx' WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
MariaDB [(none)]>



 Comments   
Comment by Elena Stepanova [ 2012-04-17 ]

Re: 'Access denied for user debian-sys-maint@localhost' MariaDB 5.5 Ubuntu 10.04
Hi,

Is it a fresh installation, or did you upgrade from a previous version? If you upgraded, what was the previous version?

Could you please provide the part of your syslog (related to mysql) where you ran installation/upgrade, started the server and up to the point when you got the last error?

Thanks.

Comment by Jonathan Bailon Segura (Inactive) [ 2012-04-18 ]

Re: 'Access denied for user debian-sys-maint@localhost' MariaDB 5.5 Ubuntu 10.04
Hello, it is my syslog after start MariaDB:

Apr 18 08:40:37 ubuntu mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Apr 18 08:40:37 ubuntu mysqld: 120418 8:40:37 InnoDB: The InnoDB memory heap is disabled
Apr 18 08:40:37 ubuntu mysqld: 120418 8:40:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Apr 18 08:40:37 ubuntu mysqld: 120418 8:40:37 InnoDB: Compressed tables use zlib 1.2.3.3
Apr 18 08:40:37 ubuntu mysqld: 120418 8:40:37 InnoDB: Initializing buffer pool, size = 256.0M
Apr 18 08:40:37 ubuntu mysqld: 120418 8:40:37 InnoDB: Completed initialization of buffer pool
Apr 18 08:40:37 ubuntu mysqld: 120418 8:40:37 InnoDB: highest supported file format is Barracuda.
Apr 18 08:40:37 ubuntu dhclient: DHCPOFFER of 192.168.13.129 from 192.168.13.254
Apr 18 08:40:37 ubuntu dhclient: DHCPREQUEST of 192.168.13.129 on eth1 to 255.255.255.255 port 67
Apr 18 08:40:37 ubuntu dhclient: DHCPACK of 192.168.13.129 from 192.168.13.254
Apr 18 08:40:37 ubuntu dhclient: bound to 192.168.13.129 – renewal in 898 seconds.
Apr 18 08:40:38 ubuntu init: ssh main process (659) terminated with status 255
Apr 18 08:40:38 ubuntu mysqld: 120418 8:40:38 InnoDB: Waiting for the background threads to start
Apr 18 08:40:38 ubuntu ntpdate[1608]: adjust time server 91.189.94.4 offset -0.008324 sec
Apr 18 08:40:39 ubuntu mysqld: 120418 8:40:39 Percona XtraDB (http://www.percona.com) 1.1.8-24.1 started; log sequence number 143674191
Apr 18 08:40:39 ubuntu mysqld: 120418 8:40:39 [Note] Plugin 'FEEDBACK' is disabled.
Apr 18 08:40:39 ubuntu mysqld: 120418 8:40:39 [Note] Recovering after a crash using /var/log/mysql/mariadb-bin
Apr 18 08:40:39 ubuntu mysqld: 120418 8:40:39 [Note] Starting crash recovery...
Apr 18 08:40:39 ubuntu mysqld: 120418 8:40:39 [Note] Crash recovery finished.
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MariaDB 50161, now running 50523. Please use mysql_upgrade to fix this error.
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [ERROR] mysql.user has no `Event_priv` column at position 29
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT
Apr 18 08:40:40 ubuntu mysqld: _TRANS_TABLES','STRICT_A
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [Note] /usr/sbin/mysqld: ready for connections.
Apr 18 08:40:40 ubuntu mysqld: Version: '5.5.23-MariaDB-mariadb1~lucid-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1670]: Upgrading MySQL tables if necessary.
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1673]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1673]: Looking for 'mysql' as: /usr/bin/mysql
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1673]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1673]: Phase 1/3: Fixing table and database names
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1673]: /usr/bin/mysqlcheck: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) when trying to connect
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1673]: FATAL ERROR: Upgrade failed
Apr 18 08:40:40 ubuntu /etc/mysql/debian-start[1713]: Checking for insecure root accounts.
Apr 18 08:40:40 ubuntu mysqld: 120418 8:40:40 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Comment by Jonathan Bailon Segura (Inactive) [ 2012-04-18 ]

Re: 'Access denied for user debian-sys-maint@localhost' MariaDB 5.5 Ubuntu 10.04
the install is upgrade mysql 5.1

Comment by Elena Stepanova [ 2012-05-03 ]

Re: 'Access denied for user debian-sys-maint@localhost' MariaDB 5.5 Ubuntu 10.04
Hi,

According to the log you provided, you already had a problem with the instance before you upgraded to 5.5, most likely it started when you were upgrading from 5.0 to 5.1, or from an old version of 5.1 to a newer one.

The following record

[ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MariaDB 50161, now running 50523. Please use mysql_upgrade to fix this error.

says that your mysql.db has 20 columns. It's 5.0 format, or possibly an early 5.1; but the same record says that the database was created with 50161 (=5.1.61). 'MariaDB' is irrelevant here, it might mean either MariaDB or MySQL. In either case, 5.1.61 has 22 columns in mysql.db, so it could not create it.

What could happen, for example, is that you were upgrading from 5.0 or an old 5.1 to 5.1.61, and the server was upgraded and started, mysqlcheck was executed, but mysql_upgrade failed. Possibly it failed due to the very same reason, the access problem for the system user.
To find out what happened back then, you need to dig deeper into the logs, if you still have them of the time when you ran the previous upgrade. Maybe it was as simple as wrong password.

Now, when you are upgrading to 5.5, you still need to have system tables fixed, since they are in the old format. However, mysql_upgrade still fails, due to the access problem for the system user. When you are trying to grant permissions to it, you are working with tables which are in the wrong format, which is why your GRANT statement fails.

The solution would be to run mysql_upgrade manually, under root. After you do it, you will be able to run the GRANT statement properly, and then your system user will have its access back.

Please let us know if it worked for you (or if you found another solution for the problem).

Comment by Rasmus Johansson (Inactive) [ 2012-05-03 ]

Launchpad bug id: 983322

Generated at Thu Feb 08 06:49:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.