Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

MySQL --> MariaDB howto?

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
mahdi1234
Guru
Guru
Posts: 559
Joined: Sat Feb 19, 2005 6:40 pm
Location: Being There

MySQL --> MariaDB howto?

  • Quote

Post by mahdi1234 » Fri Jan 25, 2013 4:15 pm

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 ...
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Fri Jan 25, 2013 10:03 pm

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
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
mahdi1234
Guru
Guru
Posts: 559
Joined: Sat Feb 19, 2005 6:40 pm
Location: Being There

  • Quote

Post by mahdi1234 » Sat Jan 26, 2013 12:19 pm

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
Top
Herring42
Guru
Guru
User avatar
Posts: 373
Joined: Wed Mar 10, 2004 10:26 am
Location: Buckinghamshire
Contact:
Contact Herring42
Website

  • Quote

Post by Herring42 » Tue Feb 05, 2013 9:31 am

As described here:

https://kb.askmonty.org/en/upgrading-to ... rom-mysql/
"The problem with quotes on the internet is that it is difficult
to determine whether or not they are genuine." -- Abraham Lincoln
Top
acidrums4
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 148
Joined: Thu Feb 05, 2009 11:22 pm
Location: Al otro lado del monitor

  • Quote

Post by acidrums4 » Wed Mar 27, 2013 10:43 pm

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: Select all

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).
Top
Randy Andy
Veteran
Veteran
User avatar
Posts: 1152
Joined: Tue Jun 19, 2007 7:39 pm
Location: /dev/koelsch

  • Quote

Post by Randy Andy » Thu Mar 28, 2013 12:46 pm

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: Select all

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!
Top
acidrums4
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 148
Joined: Thu Feb 05, 2009 11:22 pm
Location: Al otro lado del monitor

  • Quote

Post by acidrums4 » Thu Mar 28, 2013 4:11 pm

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...
Top
Randy Andy
Veteran
Veteran
User avatar
Posts: 1152
Joined: Tue Jun 19, 2007 7:39 pm
Location: /dev/koelsch

  • Quote

Post by Randy Andy » Thu Mar 28, 2013 4:33 pm

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!
Top
stmiller
Tux's lil' helper
Tux's lil' helper
Posts: 119
Joined: Tue Feb 28, 2006 3:44 pm

  • Quote

Post by stmiller » Fri Mar 29, 2013 3:10 am

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,
Top
xtx
Tux's lil' helper
Tux's lil' helper
Posts: 129
Joined: Tue Dec 27, 2011 5:49 pm

  • Quote

Post by xtx » Fri Mar 29, 2013 5:52 pm

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
Top
Randy Andy
Veteran
Veteran
User avatar
Posts: 1152
Joined: Tue Jun 19, 2007 7:39 pm
Location: /dev/koelsch

  • Quote

Post by Randy Andy » Fri Mar 29, 2013 6:01 pm

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!
Top
xtx
Tux's lil' helper
Tux's lil' helper
Posts: 129
Joined: Tue Dec 27, 2011 5:49 pm

Digikam

  • Quote

Post by xtx » Wed Apr 17, 2013 12:36 am

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: Select all

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: Select all

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?
Top
Randy Andy
Veteran
Veteran
User avatar
Posts: 1152
Joined: Tue Jun 19, 2007 7:39 pm
Location: /dev/koelsch

  • Quote

Post by Randy Andy » Thu Apr 18, 2013 5:25 pm

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: Select all

rc-status
and

Code: Select all

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

Code: Select all

equery u digikam
Andy.
If you want to see a Distro done right, compile it yourself!
Top
gustafson
Guru
Guru
User avatar
Posts: 430
Joined: Thu Aug 12, 2004 7:16 am

  • Quote

Post by gustafson » Sat Jul 13, 2013 4:15 am

Try this:

Code: Select all

emerge -av1 dev-qt/qtsql
Top
gluon
n00b
n00b
Posts: 2
Joined: Thu Aug 29, 2013 9:35 pm

  • Quote

Post by gluon » Thu Aug 29, 2013 9:42 pm

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.
Top
gluon
n00b
n00b
Posts: 2
Joined: Thu Aug 29, 2013 9:35 pm

  • Quote

Post by gluon » Fri Aug 30, 2013 7:55 am

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

Code: Select all

echo "dev-db/mariadb ~amd64" >> /etc/portage/package.keywords
echo "virtual/mysql ~amd64" >> /etc/portage/package.keywords
emerge -av mariadb
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Sun Sep 29, 2013 7:51 pm

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: Select all

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?
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Wed Oct 02, 2013 12:46 pm

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.
Top
Post Reply

18 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic