Bug 20500 - koha-create fails to connect to mysql
Summary: koha-create fails to connect to mysql
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-29 19:47 UTC by Oleg Vasylenko
Modified: 2020-11-30 21:45 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Vasylenko 2018-03-29 19:47:21 UTC
On VPS server (used Debian 8 and Ubuntu 16.04) installed Vesta CP, then installed Koha (17.11). MySQL version 5.5.59-0+deb8u1 (Debian). Everything was fine until I tried to create koha db:

# sudo koha-create --create-db lib
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

I found out that user debian-sys-maint is present on DB. Password, that is written in config file is the right one. The db user has enough privileges.

The same problem was happening even if I tried to connect to MySQL with code, written in koha-create script:

# mysql --defaults-extra-file=/etc/mysql/koha-common.cnf
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

I tried wrapping options with quote marks, removing extra spaces in .cnf file but with no result.

But somehow everything was fine after I changed option "defaults-extra-file" to "defaults-file". 
Just in case, these lines are contained in files:
 • koha-create
 • koha-remove
 • koha-reset-passwd
 • koha-restore (3 times)
On installed system you can find them in the /usr/sbin/ folder
Comment 1 Jonathan Druart 2018-03-30 19:26:24 UTC
Sounds like a MySQL problem, try to grant privileges to this user.
Comment 2 Rudolf Byker 2019-05-10 10:11:46 UTC
Probably a MySQL problem, yes. What are the contents of your /etc/mysql/koha-common.cnf ?
Comment 3 Katrin Fischer 2020-04-04 23:13:48 UTC
There has been no more information provided by the reporter in a while - moving to RESOLVED for now.