Access denied for user ‘root’@’localhost’ (using password: YES) after new installation on Ubuntu

TL;DR: To access newer versions of mysql/mariadb as the root user, after a new install, you need to be in a root shell (ie sudo mysql -u root, or mysql -u root inside a shell started by su – or sudo -i first) Having just done the same upgrade, on Ubuntu, I had the same issue. What was odd was that Would accept … Read more

ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

I have created tables in MySQL Workbench as shown below : ORDRE table: PRODUKT table: and ORDRELINJE table: so when I try to insert values into ORDRELINJE table i get: Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (srdjank.Ordrelinje, CONSTRAINT Ordrelinje_fk FOREIGN KEY (Ordre) REFERENCES Ordre (OrdreID)) I’ve … Read more