Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MySQL --> MariaDB howto?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mahdi1234
Guru
Guru


Joined: 19 Feb 2005
Posts: 470
Location: far from new world orderia

PostPosted: Fri Jan 25, 2013 4:15 pm    Post subject: MySQL --> MariaDB howto? Reply with quote

hi there,

I'm considering move from mysql to maridb, but could not find any relevant information about switch. Is there any how-to available?

What I understood not related to Gentoo, I should first probably go dev-db/mysql-5.1.67 --> dev-db/mariadb-5.1.66 and only then --> dev-db/mariadb-5.5.28a right?

Anyone here done this and have some comments/suggestions /tips?

thanks & cheers ...
Back to top
View user's profile Send private message
Anon-E-moose
Veteran
Veteran


Joined: 23 May 2008
Posts: 1370
Location: Dallas area

PostPosted: Fri Jan 25, 2013 10:03 pm    Post subject: Reply with quote

I swapped over a while back, from mysql-5.1.62 to mariadb-5.1.62.

Plug and play replacement.

I don't remember everything, but I believe that I had to depclean (remove) mysql, mask it and then add mariadb.

Good luck
_________________
Asus m5a99fx, Phenom II X6 - X64-multilib, glibc-2.15-r3, 3.9.1-zen
xorg-server-1.14 - lxde - nouveau
wine-1.5.30, oss4
gcc-4.7.3 CFLAGS="-march=native -O2 -floop-interchange -floop-strip-mine -floop-block -pipe"
Back to top
View user's profile Send private message
mahdi1234
Guru
Guru


Joined: 19 Feb 2005
Posts: 470
Location: far from new world orderia

PostPosted: Sat Jan 26, 2013 12:19 pm    Post subject: Reply with quote

Thanks, at the end I did straight 5.1 --> 5.5

- keyworded dev-db/mariadb & virtual/mysql-5.5
- remove mysql
- emerge mariadb
- revdep-rebuil (in my case only php & qt-sql were rebuilt)
- mysql_upgrade
- etc-update (just minor changes)

et voila, that's it ... so far it looks everything works
Back to top
View user's profile Send private message
Herring42
Guru
Guru


Joined: 10 Mar 2004
Posts: 361
Location: Buckinghamshire

PostPosted: Tue Feb 05, 2013 9:31 am    Post subject: Reply with quote

As described here:

https://kb.askmonty.org/en/upgrading-to-mariadb-from-mysql/
_________________
"The problem with quotes on the internet is that it is difficult
to determine whether or not they are genuine." -- Abraham Lincoln
Back to top
View user's profile Send private message
acidrums4
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2009
Posts: 108
Location: Al otro lado del monitor

PostPosted: Wed Mar 27, 2013 10:43 pm    Post subject: Reply with quote

mahdi1234 wrote:
Thanks, at the end I did straight 5.1 --> 5.5

- keyworded dev-db/mariadb & virtual/mysql-5.5
- remove mysql
- emerge mariadb
- revdep-rebuil (in my case only php & qt-sql were rebuilt)
- mysql_upgrade
- etc-update (just minor changes)

et voila, that's it ... so far it looks everything works


I did that today, but when I reached for 'mysql_upgrade' it complains:
Code:

Phase 1/3: Fixing table and database names
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed


I've searching for a fix all day but I don't know what's happening. Even I don't know if it will cause a trouble on something (afaik, my system is using mysql for akonadi and things like that).
Back to top
View user's profile Send private message
Randy Andy
l33t
l33t


Joined: 19 Jun 2007
Posts: 872
Location: /dev/koelsch

PostPosted: Thu Mar 28, 2013 12:46 pm    Post subject: Reply with quote

acidrums4,

try to start the upgade command in a similar command to this one, but substitute it with your own path for user name and hostname (mine is big-server) as below.

Code:
mysql_upgrade --socket=/home/andy/.local/share/akonadi/socket-big-server/mysql.socket


You could find the right one also in your akonadi failure log.

Much success,

Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
acidrums4
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2009
Posts: 108
Location: Al otro lado del monitor

PostPosted: Thu Mar 28, 2013 4:11 pm    Post subject: Reply with quote

Well, I did that and the command ended succesfully. Is that enough? 'Cause I did 'mysql_upgrade' again and got the same result I told before. Also, I noticed that the file /var/run/mysqld/mysqld.sock doesn't exists, neither the /var/run/mysqld/ folder. I don't know if that will cause some sort of trouble in the future. Everything is working OK since I switched to MariaDB...
Back to top
View user's profile Send private message
Randy Andy
l33t
l33t


Joined: 19 Jun 2007
Posts: 872
Location: /dev/koelsch

PostPosted: Thu Mar 28, 2013 4:33 pm    Post subject: Reply with quote

acidrums4,

I have this kind of directory and socket.

Was your mysql service started when you checked this?

Please show us the output of your rc-status and also the output of ps ax | grep mysql

Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
stmiller
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2006
Posts: 108

PostPosted: Fri Mar 29, 2013 3:10 am    Post subject: Reply with quote

mahdi1234 wrote:
Thanks, at the end I did straight 5.1 --> 5.5

- keyworded dev-db/mariadb & virtual/mysql-5.5
- remove mysql
- emerge mariadb
- revdep-rebuil (in my case only php & qt-sql were rebuilt)
- mysql_upgrade
- etc-update (just minor changes)

et voila, that's it ... so far it looks everything works


Thank you for your post. This works great,
Back to top
View user's profile Send private message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 110

PostPosted: Fri Mar 29, 2013 5:52 pm    Post subject: Reply with quote

wow, perfect timing for me to research this. just did it, got an error while updating, but it fixed it when i restarted /etc/init.d/mysql and then ran mysql_upgrade as root.

so that's literally it? amarok and akonadi are now using mariadb instead of mysql? akonadi still says mysql but i assume that is normal
Back to top
View user's profile Send private message
Randy Andy
l33t
l33t


Joined: 19 Jun 2007
Posts: 872
Location: /dev/koelsch

PostPosted: Fri Mar 29, 2013 6:01 pm    Post subject: Reply with quote

Yes xtx,

that's normal and the same behaviour as on my machine, which works quite fine for weeks.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 110

PostPosted: Wed Apr 17, 2013 12:36 am    Post subject: Digikam Reply with quote

I can't get digikam to work for the life of me, not sure if it is related to me switching to mariadb or not.

When I first launch digikam it says "error while opening the database. digikam will try to automatically reconnect to the database." It does not connect. Meanwhile, my terminal says
Code:
QSqlDatabase: available drivers: QMYSQL3 QMYSQL
QSqlQuery::prepare: database not open
QSqlDatabase:  driver not loaded


I hit cancel, digikam opens without a database. Settings -> Configure digikam shows that it is trying to use sqlite, so I switch it to mysql and check"Internal Server." When I click "Check DB Connection" it says it is successful. I then click "OK" and I get the error "Failed to open the database. Error message from database: The driver 'SQLITE' for SQLITE3 databases is not available. digikam depends on drivers provided by the SQL module of Qt4"

Meanwhile, my terminal shows
Code:
QSqlDatabase: available drivers: QMYSQL3 QMYSQL
QSqlQuery::prepare: database not open
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
digikam(11749)/digikam (core): No SQLite3 driver available. List of QSqlDatabase drivers:  ("QMYSQL3", "QMYSQL")
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu


What is going on? Does digikam not work with mariadb?
Back to top
View user's profile Send private message
Randy Andy
l33t
l33t


Joined: 19 Jun 2007
Posts: 872
Location: /dev/koelsch

PostPosted: Thu Apr 18, 2013 5:25 pm    Post subject: Reply with quote

Hi xtx.

I'm actually using digikam with sqlite and have not tried to migrate to mysql/mariadb with the help of the gui menue.

But you could show us under your fault conditions the output of:

Code:
rc-status
and

Code:
eix digikam
or if you're not using eix, alternatively:

Code:
equery u digikam


Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum