Upgrade MariaDB Error

Hello, everyone. First post. If you need more information, feel free to ask.
I ran:

sudo pacman -Syyu

During the upgrade this showed up:

( 87/114) upgrading mariadb                                      [###################################] 100%
:: MariaDB was updated to a new feature release. To update the data run:
   systemctl restart mariadb.service && mariadb-upgrade -u root -p

So I did:

systemctl restart mariadb.service && mariadb-upgrade -u root -p
Enter password: 
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed

I put in the password I use for sudo.
If I turn my PC off, will it mess it up unless I upgrade?
What do I do?
Thanks.

You need to provide the password of the root user of your mariadb database instead.

No. You can run mariadb-upgrade at any later time.

Don’t panic. :slight_smile:

How do I find it? I don’t remember messing with mariaDB during the install? It was a while ago.

Thanks :+1:

It’s nowhere to be found - if you do not remember it, it’s lost.
Perhaps you set an empty password?
You can try resetting the root password.

1 Like

Miraculously, I’ve managed to find the password written down in my notes. So, I was able to successfully upgrade.
I have decided to follow the guide in your link to change it.

sudo systemctl stop mariadb
sudo mysqld_safe --skip-grant-tables --skip-networking &

In a seperate tab:

sudo mysql -u root
MariaDB [(none)]> use mysql
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> ALTER USER 'root'@'localhost' IDENTIFIED BY 'the_password_i_want';
MariaDB [mysql]> exit

The command:

kill $(cat /var/lib/mysql/$HOSTNAME.pid)

didn’t work for me and I had to run:

ps -aux | grep my

Then:

kill -9 <PID>

for every PID number on the list (I screwed up opening the server and there were three instances running and it wouldn’t allow me to restart mariaDB).
Finally,

sudo systemctl start mariadb

Thank you so much for your help.

Sometimes you just can’t function if you’re afraid to screw up something, that’s why it’s good to ask. :+1: :slightly_smiling_face:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.