You are not logged in.

#1 2013-04-02 11:43:23

kuba_66
Member
Registered: 2012-12-07
Posts: 28

mysql to mariadb upgrade

Perhaps it's a newbie problem ...
I did as recommended in Arch news:

 # systemctl stop mysqld
# pacman -S mariadb libmariadbclient mariadb-clients
# systemctl start mysqld
# mysql_upgrade -p 

After the last command I received a prompt to enter password. I had never entered any mysql passwords before (or I don't remember), so I thought it should be a new password. On entering a new password I received an error message, so I did:

# mysql_upgrade

and no errors were reported.
Is that the right way of doing things?

Offline

#2 2013-04-02 11:48:06

Barthalion
Forum Fellow
From: Poland
Registered: 2010-02-26
Posts: 111

Re: mysql to mariadb upgrade

If you are sure that you didn't set any password before, everything went fine.

Offline

#3 2013-04-03 01:03:11

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: mysql to mariadb upgrade

If you can't remember the password, there is an admin tool that will allow you to recover it. I can't remember the exacts steps, but Google should help out!


Matt

"It is very difficult to educate the educated."

Offline

#4 2013-04-05 01:52:53

eerok
Member
From: Canada
Registered: 2005-03-20
Posts: 171

Re: mysql to mariadb upgrade

I wouldn't set a password for mysql that wasn't my root or main user password, but I still get this no matter what I try

# mysql_upgrade -p
Enter password: 
Phase 1/3: Fixing table and database names
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
FATAL ERROR: Upgrade failed

I tried resetting the password using these instructions and it didn't solve the problem.


noobus in perpetuus

Offline

#5 2013-04-07 01:08:20

sultanoswing
Member
Registered: 2008-07-23
Posts: 314

Re: mysql to mariadb upgrade

eerok wrote:

I wouldn't set a password for mysql that wasn't my root or main user password, but I still get this no matter what I try

# mysql_upgrade -p
Enter password: 
Phase 1/3: Fixing table and database names
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
FATAL ERROR: Upgrade failed

I tried resetting the password using these instructions and it didn't solve the problem.

Did you try 'sudo' before 'mysql_upgrade' ?


6.5.3.arch1-1(x86_64) w/Gnome 44.4
Arch on: ASUS Pro-PRIME x470, AMD 5800X3D, AMD 6800XT, 32GB, | Intel NUC 7i5RYK | ASUS ux303ua | Surface Laptop

Offline

#6 2013-04-07 01:37:30

eerok
Member
From: Canada
Registered: 2005-03-20
Posts: 171

Re: mysql to mariadb upgrade

sultanoswing wrote:

Did you try 'sudo' before 'mysql_upgrade' ?

Well, I executed it as root.

Anyway, it's not clear what didn't work, since there have been no adverse consequences.  Maybe I'm okay.


noobus in perpetuus

Offline

#7 2013-04-07 02:27:20

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: mysql to mariadb upgrade

Is there any disadvantage to having (or not having) a password set for mysql? Since upgrading seems to entail setting one...

I guess I'm not sure whether I should upgrade or not since I don't really know anything about mysql. (kde seems to be using it - I don't use it directly.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2013-04-08 03:37:02

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: mysql to mariadb upgrade

I read the wiki instructions for upgrading. These say to stop mysql before uninstalling it and replacing with mariadb. That makes sense. However, systemctl doesn't seem to know about mysqld on my system.

$ ps ax | grep mysql
 2312 ?        Sl     0:35 /usr/bin/mysqld --defaults-file=/home/username/.local/share/akonadi/mysql.conf --datadir=/home/username/.local/share/akonadi/db_data/ --socket=/home/username/.local/share/akonadi/socket-MyComputer/mysql.socket

So I guess that KDE starts it directly and it is running per user.

What is the correct way to stop mysqld in this case?

Also, I noticed that the systemd service file starts mysql with /usr/bin/mysqld. The very little I remember about mysql involved starting it only with mysql_safe (or safe_mysql or something similar). I was just curious why that was.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2013-04-08 04:11:14

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: mysql to mariadb upgrade

cfr wrote:

So I guess that KDE starts it directly and it is running per user.

What is the correct way to stop mysqld in this case?

Logout and use a root tty for the upgrade I suppose. Then login again.

Also, I noticed that the systemd service file starts mysql with /usr/bin/mysqld. The very little I remember about mysql involved starting it only with mysql_safe (or safe_mysql or something similar). I was just curious why that was.

mysql_safe implements restart on failure/crash which is unnecessary with systemd since it already has those capabilities.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#10 2013-05-11 17:57:41

papa6
Member
Registered: 2013-02-26
Posts: 26

Re: mysql to mariadb upgrade

Hi kuba_66,
There are 2 different passwords you need to type : first the one being root on your computer, and the last one is the mysql root password.

One way is to use sudo :

$ sudo systemctl stop mysqld
$ sudo pacman -S mariadb libmariadbclient mariadb-clients
$ sudo systemctl start mysqld
$ sudo mysql_upgrade -p 

At the last line, the password you should provide is the one for your DB account.

Offline

Board footer

Powered by FluxBB