View previous topic :: View next topic |
Author |
Message |
mahdi1234 Guru

Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Fri Jan 25, 2013 4:15 pm Post subject: MySQL --> MariaDB howto? |
|
|
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 |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5937 Location: Dallas area
|
Posted: Fri Jan 25, 2013 10:03 pm Post subject: |
|
|
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 _________________ PRIME x570-pro, 3700x, 5.17 zen kernel
gcc 11.2.0/12.2.0, profile 17.1 amd64-no-multilib, openrc, wayland
copy of my local repo |
|
Back to top |
|
 |
mahdi1234 Guru

Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Sat Jan 26, 2013 12:19 pm Post subject: |
|
|
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 |
|
 |
Herring42 Guru


Joined: 10 Mar 2004 Posts: 373 Location: Buckinghamshire
|
|
Back to top |
|
 |
acidrums4 Tux's lil' helper


Joined: 05 Feb 2009 Posts: 147 Location: Al otro lado del monitor
|
Posted: Wed Mar 27, 2013 10:43 pm Post subject: |
|
|
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 |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Thu Mar 28, 2013 12:46 pm Post subject: |
|
|
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 |
|
 |
acidrums4 Tux's lil' helper


Joined: 05 Feb 2009 Posts: 147 Location: Al otro lado del monitor
|
Posted: Thu Mar 28, 2013 4:11 pm Post subject: |
|
|
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 |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Thu Mar 28, 2013 4:33 pm Post subject: |
|
|
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 |
|
 |
stmiller Tux's lil' helper

Joined: 28 Feb 2006 Posts: 119
|
Posted: Fri Mar 29, 2013 3:10 am Post subject: |
|
|
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 |
|
 |
xtx Tux's lil' helper

Joined: 27 Dec 2011 Posts: 129
|
Posted: Fri Mar 29, 2013 5:52 pm Post subject: |
|
|
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 |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Fri Mar 29, 2013 6:01 pm Post subject: |
|
|
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 |
|
 |
xtx Tux's lil' helper

Joined: 27 Dec 2011 Posts: 129
|
Posted: Wed Apr 17, 2013 12:36 am Post subject: Digikam |
|
|
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 |
|
 |
Randy Andy Veteran


Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Thu Apr 18, 2013 5:25 pm Post subject: |
|
|
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:
and
or if you're not using eix, alternatively:
Andy. _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
 |
gustafson Guru


Joined: 12 Aug 2004 Posts: 430
|
Posted: Sat Jul 13, 2013 4:15 am Post subject: |
|
|
Try this:
Code: | emerge -av1 dev-qt/qtsql |
|
|
Back to top |
|
 |
gluon n00b

Joined: 29 Aug 2013 Posts: 2
|
Posted: Thu Aug 29, 2013 9:42 pm Post subject: |
|
|
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 |
|
 |
gluon n00b

Joined: 29 Aug 2013 Posts: 2
|
Posted: Fri Aug 30, 2013 7:55 am Post subject: |
|
|
For other noobs , 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 |
|
 |
jagdpanther l33t

Joined: 22 Nov 2003 Posts: 700
|
Posted: Sun Sep 29, 2013 7:51 pm Post subject: |
|
|
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 |
|
 |
jagdpanther l33t

Joined: 22 Nov 2003 Posts: 700
|
Posted: Wed Oct 02, 2013 12:46 pm Post subject: |
|
|
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 |
|
 |
|