Package: phpmyadmin
Version: 4:4.6.6-4
Severity: normal

Hi,

running dpkg-reconfigure phpmyadmin on a Stretch machine, telling it to 
reinstall the database while
specifying a custom DB name other than phpmyadmin, fails like this:

---------8<-----------
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
checking privileges on database sys_phpmyadmin for sys_phpmyadmin@localhost: 
user creation needed.
granting access to database sys_phpmyadmin for sys_phpmyadmin@localhost: 
success.
verifying access for sys_phpmyadmin@localhost: success.
dbconfig-common: dumping mysql database sys_phpmyadmin to 
/var/tmp/phpmyadmin.sys_phpmyadmin.2017-12-20-04.23.mysql.6Ur1Cg.
dbconfig-common: dropping old mysql database sys_phpmyadmin.
dropping database sys_phpmyadmin: success.
verifying database sys_phpmyadmin was dropped: success.
creating database sys_phpmyadmin: success.
verifying database sys_phpmyadmin exists: success.
populating database via sql...  error encountered populating database:
mysql said: ERROR 1044 (42000) at line 20: Access denied for user 
'sys_phpmyadmin'@'localhost' to database 'phpmyadmin'
--------->8-----------


NB: 'phpmyadmin' in the last line althtough the DB name specified was
'sys_phpmyadmin', which did get respected in the prior lines.


dbconfig-common uses /usr/share/dbconfig-common/data/phpmyadmin/install/mysql
to bootstrap the PMA database, which contains at the very top these interfering
statements:

---------8<-----------
CREATE DATABASE IF NOT EXISTS `phpmyadmin`[...];
USE phpmyadmin;
--------->8-----------



After I commented-out both statements (not required since dbconfig-common
handles DB creation itself anyway), dpkg-reconfigure ran through and PMA was
correctly configured to use the custom-named  DB.



Thanks

Daniel




-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'proposed-updates'), (990, 
'stable'), (500, 'oldstable-updates'), (500, 'oldstable-proposed-updates'), 
(500, 'testing'), (500, 'oldstable'), (98, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-0.bpo.1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages phpmyadmin depends on:
ii  dbconfig-common                 2.0.9~bpo9+1
ii  dbconfig-mysql                  2.0.9~bpo9+1
ii  debconf [debconf-2.0]           1.5.61
ii  libjs-sphinxdoc                 1.4.9-2
ii  perl                            5.24.1-3+deb9u2
ii  php                             1:7.0+49
ii  php-mbstring                    1:7.0+49
ii  php-mysql                       1:7.0+49
ii  php-php-gettext                 1.0.12-0.1
ii  php-phpseclib                   2.0.4-1
ii  php-xml                         1:7.0+49
ii  php7.0 [php]                    7.0.19-1
ii  php7.0-cli [php-cli]            7.0.19-1
ii  php7.0-json [php-json]          7.0.19-1
ii  php7.0-mbstring [php-mbstring]  7.0.19-1
ii  php7.0-xml [php-xml]            7.0.19-1
ii  ucf                             3.0036

Reply via email to