Habe über mysql jetzt eine leere Datenbank erstellt (Benutzer: root), kann diese aber bisher nicht in Contao einbinden.
Server ist wohl localhost, aber Port 3306? Und als Benutzernamen root? Kommt mir irgendwie falsch vor und funktioniert auch nicht...
Es ist:
Code:
netstat -tln
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
und anmelden geht offenbar auch:
Code:
sudo mysql -h localhost -u root contao47
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.7.25-0ubuntu0.18.04.2 (Ubuntu)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Aber mit localhost, Port 3306, User root und dem korrekten Datenbanknamen kommt die Rückmeldung: "Datenbankverbindung fehlgeschlagen!"
Habe auch noch einen neuen User angelegt: CREATE USER 'contao'@'localhost' IDENTIFIED BY 'password';
Aber auch mit diesem Usernamen (auch contao@localhost und nach Neustart von mysql-Service) gleiche Fehlermeldung...
Melde ich mich als User contao bei mysql an, finde ich mit SHOW DATABASES keine Datenbanken. Was erklären würde, warum auch Contao keine findet. Nur kann ich über die Konsole als User Contao auch keine Datenbank erstellen:
Code:
CREATE DATABASE contaodb;
ERROR 1044 (42000): Access denied for user 'contao'@'localhost' to database 'contaodb'
Was mache ich falsch?
Lesezeichen