[MDEV-2704] LP:454237 - deb package fails to add user for debian-sys-maint Created: 2009-10-17  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 Priority: Major
Reporter: Sergei Petrunia Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug454237.xml    

 Description   

deb package fails to add user for debian-sys-maint on installation.

This causes package configuration to fail with an error:

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

and then this error will show up on any invocation of /etc/init.d/mysql start|stop|etc.



 Comments   
Comment by Sergei Petrunia [ 2009-10-17 ]

Re: deb package fails to add user for debian-sys-maint
It is possible to connect to the server and there one can see that indeed mysql.user table has no debian-sys-maint user.

Failure to add user is because of the following:

bakery/debian-5.1/dist/Ubuntu/mariadb-server-5.1.postinst has this command:
replace_query=`/bin/echo -e \
"USE mysql\n" \
"REPLACE INTO user SET " \
" host='localhost', user='debian-sys-maint', password=password('$pass'), " \
" Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
" Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
" Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
" Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
" Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
" Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
" Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
" Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`;

On a server with all-defaults configuration the command will succeed with three warnings:
Field 'ssl_cipher' doesn't have a default value
Field 'x509_issuer' doesn't have a default value
Field 'x509_subject' doesn't have a default value

However, ourdelta-mariadb51-2/bakery/debian-5.1/additions/my.cnf has this line:

sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL

Which will make those warnings to be errors, and the command won't succeed any more.

Comment by Sergei Petrunia [ 2009-10-17 ]

Re: deb package fails to add user for debian-sys-maint
The suggested fix is to add

ssl_cipher='', x509_issuer='', x509_subject=''

into replace_query.

Comment by Kristian Nielsen [ 2009-11-15 ]

Re: deb package fails to add user for debian-sys-maint
The fix committed before only works in Ubuntu, there is a typo in the Debian version (missing comma ",").

Have pushed a fix for this to lp:~maria-captains/ourdelta/ourdelta-montyprogram-fixes , will file a merge request.

Comment by Arjen Lentz (Inactive) [ 2009-11-15 ]

Re: deb package fails to add user for debian-sys-maint
Resolved in 5.1.39 build.

Comment by Rasmus Johansson (Inactive) [ 2009-11-24 ]

Launchpad bug id: 454237

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