Score:0

mysql debian-start[190181]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

fr flag

I am trying to set up MariaDB server under xubuntu 20.04 and import all the db's I had previously on another machine under xubuntu 18 (following the notes I took when doing it there coming from opensuse).

The installed mariadb has datadir in /var/lib/mysql, and contains only a "null" msyql db with a root user with no password (as tested entering as sudo mysql -u root mysql which requires my personal passwd password).

I stopped the MariaDB server from the system installation, edited the mariadb.conf.d/50-server.cnf with my few changes (chief of them is that the datadir is /elsewhere/Mysql), then I rsynced all my databases from the previous machine (I had prepared also mysql dumps,but since the MariaDB version is the same, I thought this was easier).

Then a systemctl start mariadb returns with no error but a systemctl status mariadb shows that the post-processing debian-start has given the error reported in the subject.

MariaDB looks running OK. I can enter with the mysql client in all my personal databases using my old mysql password, and I can also enter as mysql root using my old mysql root password. Those passwords are of course not the same as the passwd ones.

So I can work normally, only there is this slightly disturbing message from debian-start as if it was trying to login using no root password (which succeeds using the original mariadb.conf.d/50-server.cnf).

This did not occur on Ubuntu 18 (there I had to set ProtectHome=false, but apparently this is not required on 20)

Any way to get rid of the annoying message, or should I just live with it since all the rest works ?

in flag
Can I confirm that you've manually installed a *Debian* version of MariaDB on Xubuntu rather than use the default packages that are available in the repositories? If so, you may need to use `sudo mysql_fix_privilege_tables` to ensure that everything is properly up to date and migrated.
Lucio C avatar
fr flag
I use the bundled package loaded with synaptic. I just repointed datadir elsewhere and put there all my old databases.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.