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: 485
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
Advocate
Advocate


Joined: 23 May 2008
Posts: 2086
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, FX 8320 - amd64-multilib, 3.9.1-zen, eudev
glibc-2.17, gcc-4.7.3-r1, xorg-server-1.15, lxde, nouveau, oss4
Back to top
View user's profile Send private message
mahdi1234
Guru
Guru


Joined: 19 Feb 2005
Posts: 485
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: 366
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: 115
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
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1009
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: 115
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
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1009
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: 114

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: 112

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
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1009
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: 112

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
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1009
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
gustafson
Guru
Guru


Joined: 12 Aug 2004
Posts: 408

PostPosted: Sat Jul 13, 2013 4:15 am    Post subject: Reply with quote

Try this:
Code:
emerge -av1 dev-qt/qtsql
Back to top
View user's profile Send private message
gluon
n00b
n00b


Joined: 29 Aug 2013
Posts: 2

PostPosted: Thu Aug 29, 2013 9:42 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 am a newbie in gentoo, how you exactly step by steps you make the other packages dependencies for mysql changed by mariadb?, and how to install mariadb 5.5 ?, when i do emerge -av mariadb, it gives mariadb 5.1 or 5.2 instead.
Back to top
View user's profile Send private message
gluon
n00b
n00b


Joined: 29 Aug 2013
Posts: 2

PostPosted: Fri Aug 30, 2013 7:55 am    Post subject: Reply with quote

For other noobs :oops: , here is the fix :
Code:

echo "dev-db/mariadb ~amd64" >> /etc/portage/package.keywords
echo "virtual/mysql ~amd64" >> /etc/portage/package.keywords
emerge -av mariadb
Back to top
View user's profile Send private message
jagdpanther
Apprentice
Apprentice


Joined: 22 Nov 2003
Posts: 219

PostPosted: Sun Sep 29, 2013 7:51 pm    Post subject: Reply with quote

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)


I also am doing a MySQL 5.1 to MariaDB 5.5 upgrade.
In mysql_upgrade in phase 3/3 I get:
Code:
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir, errno: 13


I checked and user mysql (who owns all the contents of /var/lib/mysql) does have permission to write in /var/lib/mysql. Any ideas on fixing this?
Back to top
View user's profile Send private message
jagdpanther
Apprentice
Apprentice


Joined: 22 Nov 2003
Posts: 219

PostPosted: Wed Oct 02, 2013 12:46 pm    Post subject: Reply with quote

Quote:
I checked and user mysql (who owns all the contents of /var/lib/mysql) does have permission to write in /var/lib/mysql. Any ideas on fixing this?

Fixed: Although I was passing mysql_upgrade my mysql root username and password, the mysql_upgrade program itself writes a file to the MariaDB data area, so I needed to run mysql_upgrade as a user that has permission to write to that area.
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