[gelöst] DB Setup: failed: Access denied for user 'root'@'localhost'

Hilfe zu OTRS Problemen aller Art
Post Reply
rnippes
Znuny newbie
Posts: 3
Joined: 03 Jul 2017, 21:09
Znuny Version: 5.0.20
Real Name: Reiner Nippes
Company: Nippes IT

[gelöst] DB Setup: failed: Access denied for user 'root'@'localhost'

Post by rnippes »

Hallo,

beim Versuch OTRS 5.0.20 auf einem Ubuntu 16.04 mit mariadb 10.0.29 und nginx 1.10.3 zu installieren, bekomme ich entweder Fehlermeldung im nginx-log, wenn ich bei der Einrichtung der DB den root User wähle:

Code: Select all

"fastcgi://unix:/var/run/fcgiwrap.socket:", host: "tickets.<domain>.de", referrer: "https://tickets.<domain>.de/otrs/installer.pl"
2017/07/03 20:53:39 [error] 23676#23676: *196953 FastCGI sent in stderr: "[Mon Jul  3 20:53:39 2017] installer.pl: DBI connect('database=;host=localhost;','root',...) failed: Access denied for user 'root'@'localhost' at /opt/otrs/bin/cgi-bin/../../Kernel/Modules/Installer.pm line 1198" while reading response header from upstream, client: <ip>, server: tickets.<domain>.de, request: "POST /otrs/installer.pl? HTTP/2.0", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "tickets.<domain>.de", referrer: "https://tickets.<domain>.de/otrs/installer.pl"
Das root Password funktioniert auf der Commando Zeile.

Erstelle ich eine DB otrs nebst User otrs und wählen im Setup aus, die bestehende DB otrs zu verwenden, läuft das Setup zwar durch, die Datenbank wird aber nur unvollständig angelegt. U.a. fehlen die Tabellen users und groups. Somit gibt es keine root@localhost.
Die Häckchen für die drei DB Tasks im Setup sind grün. Im log finden sich u.a. folgende Fehlermeldung:

Code: Select all

 Message: Specified key was too long; max key length is 767 bytes, SQL: 'CREATE TABLE valid (
    id SMALLINT NOT NULL AUTO_INCREMENT,
    name VARCHAR (200) NOT NULL,
    create_time DATETIME NOT NULL,
    create_by INTEGER NOT NULL,
    change_time DATETIME NOT NULL,
    change_by INTEGER NOT NULL,
    PRIMARY KEY(id),
    UNIQUE INDEX valid_name (name)
)'
Wenn auf der Commando Zeile versuche, das DB Schema mit den Skripten in /opt/otrs/scripts/database zu erstellen, gibt's die gleichen Fehlermeldungen.


Any ideas?
Last edited by rnippes on 30 Jul 2017, 17:28, edited 1 time in total.
UJo
Znuny newbie
Posts: 2
Joined: 17 Jul 2017, 12:18
Znuny Version: 5.0.20

Re: DB Setup: failed: Access denied for user 'root'@'localhost'

Post by UJo »

Hallo,

ich das gleiche Problem weil ich die Anleitung nicht richtig gelesen habe da steht
Note

Please note that OTRS requires utf8 as database storage encoding.
Also muss die Datenbank mit

Code: Select all

CREATE DATABASE $DATENBANKNAME CHARACTER SET utf8;
erstellt werden.
rnippes
Znuny newbie
Posts: 3
Joined: 03 Jul 2017, 21:09
Znuny Version: 5.0.20
Real Name: Reiner Nippes
Company: Nippes IT

Re: DB Setup: failed: Access denied for user 'root'@'localhost'

Post by rnippes »

Ich hatte

Code: Select all

create database otrs CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
verwendet.
Hier https://medium.com/@adamhooper/in-mysql ... 761243e434 hatte ich gelesen, dass das die modernere Form ist.
UJo
Znuny newbie
Posts: 2
Joined: 17 Jul 2017, 12:18
Znuny Version: 5.0.20

Re: DB Setup: failed: Access denied for user 'root'@'localhost'

Post by UJo »

Hmm, also geht otrs immer noch nicht?

Ich habe noch:

Code: Select all

[mysqld]
sql-mode="NO_ENGINE_SUBSTITUTION"
default-storage-engine=INNODB
in der

Code: Select all

/etc/mysql/my.cnf
gesetzt.
Das hatte ich gemacht bevor ich das character set geändert habe. Alleine hat das mein Problem aber auch nicht gelöst.
wurzel
Znuny guru
Posts: 3230
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: DB Setup: failed: Access denied for user 'root'@'localhost'

Post by wurzel »

Hi,

ich hatte mit den aktuellsten mariadb Versionen das "Problem" dass ich mich nicht mit root@localhost
an mysql anmelden konnte. Ich habe einen zweiten root2@localhost erstellt, volle Rechte incl. Passwort.

Dann liefs.

Evtl. liegt's daran?

viele Grüße
Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
rnippes
Znuny newbie
Posts: 3
Joined: 03 Jul 2017, 21:09
Znuny Version: 5.0.20
Real Name: Reiner Nippes
Company: Nippes IT

Re: DB Setup: failed: Access denied for user 'root'@'localhost'

Post by rnippes »

Danke. Das war's.
CREATE USER 'root2'@'localhost' IDENTIFIED BY 'was-ganz-geheimen';
GRANT ALL PRIVILEGES ON *.* TO 'root2'@'localhost' WITH GRANT OPTION;
Post Reply