LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   MySQL, MariaDB, Perconal Server, what else?! (https://www.linuxquestions.org/questions/slackware-14/mysql-mariadb-perconal-server-what-else-4175476942/)

lpallard 09-12-2013 10:25 PM

MySQL, MariaDB, Perconal Server, what else?!
 
Hi fellow Slackers! I have been using Mysql with satisfactory results for about 2 years now, but I'd like to upgrade to a database server than can benefit from multicore CPU's and lots of RAM. Mysql, even with fine tuning seems not able to extract all the juice from modern hardware such as hexa core CPU's or SSD's... I have spent several hours trying to improve the performance but Im hitting a wall as we speak.

Anyways, I did some research and came up with two possible upgrades:

Move to the new MariaDB as Slackware has already done, or

Move to Percona's MYsql server.

I read good things about both in terms of scalability and performance with SSD's or RAID-0 arrays.

I took a leap forward and decided to try percona. Having not found a Slackware package anywhere, I decided to download the sources and compile myself.

Sources from: http://www.percona.com/downloads/Per...3-31.1/source/

Roughly following the tutorial at http://docs.1h.com/Percona_MySQL_installation_tutorial I uninstalled mysql with

Code:

slackpkg remove mysql
(backed upo my DB's before and my.cnf!!)

and then I proceeded to cd to the Percona's sources directory, and run:

Code:

cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF

make

make install

All went like a breeze, no errors whatsoever (rare!!)

The problem is that Im not sure how to start it, Im not sure how to integrate it in Slackware, and Im not even sure if its the right way to install/integrate it in Slackware.. The RC script is now useless. I think the install command i ran didnt install the files & binaries in the right locations to fully integrate with Slackware..

Their documentation is not so good, and I couldnt find anybody using Slack & percona which leaves me in the dark.

I could always delete the percona's folder and files, and reinstall mysql.

What next!?

mattgriffin 09-13-2013 08:53 AM

Hi lpallard,

I'd recommend trying Percona's instructions in their docs [1].

Best,
Matt

[1] http://www.percona.com/doc/percona-s...source-tarball

lpallard 09-13-2013 11:24 AM

Thanks Matt for your reply,

I have read and followed their instructions at the link you mentioned, and it built/installed well, but their documentation is Hmmm not so great. Do I need to keep the initial mysql installed? Does Percona use Mysql as its backbone? Is it completely safe to remove Mysql after percona is built/installed?

Some websites recommended to install a percona of the same release number than the mysql install... Why's that?

My Mysql was 5.2.29-rc1 while percona's latest release is 5.5.33-31.1 quite different...

I wonder is a slacker can help with properly integrating percona in Slackware to be the default database engine? By integrate, I mean to transparently use the rc scripts, the same CLI commands and otherwise be totally transparent to my current setup and databases..???

Percona seems to install itself in /usr/local/mysql.... Thats differnt than stock Slackware's mysql.

santaslilslacker 09-14-2013 06:09 AM

1 Attachment(s)
Hi,

In order to use percona the same way as you're using mysql, try this.
Pick your favorite slack mirror. Locate MariaDB sources and download slackbuild, doinst.sh and slack-desc. Edit slackbuild to correspond with percona version you've downloaded previously. Fire-up slackbuild script, go grab a snack and when it's done, simply installpkg or upgradepkg. In this uber lazy mode, if you edited only pkg name from slackbuild, your package will be called mysql.something.
Worked for me :)

tronayne 09-14-2013 10:02 AM

You may want to give some thought to PostgreSQL (I have switched nearly all my data base work to PostgreSQL from MySQL and I'll tell you what -- it's a better platform). The switch wasn't difficult (minor syntax problems but certainly no show-stoppers) and performance is better. The C-API in PostgresSQL is much, much more sensible and easy to use than the MySQL API.

I've been doing SQL data base design, engineering, programming, administering, using, whatevering for over 35 years. I have always found MySQL to be... well, messy -- useful, of course, but a little messy when compared with other DBMS offerings (both commercial and FOSS). I got real comfortable with PostgreSQL real fast where I have never been completely comfortable with MySQL (always have to go look something up, dang it, convoluted syntax!).

MySQL and MariaDB (identical as far as I know) are rock-solid and dependable and have been for a long time. I think that PosgreSQL is too (perhaps not for such a long time, hasn't been around that long). There are utilities for unloading MySQL data bases and loading them into PostgreSQL (I've used 'em, they're good). PHP is fully supported.

The mess created by Oracle's buy of Sun Microsystems has really thrown a monkey wrench into too many important products/projects: Java, OpenOffice, MySQL to name just a few. MariaDB is a direct result of the Oracle take-over (so's LibreOffice). Apache has taken OpenOffice (thankfully). Who knows what's going to happen with Java (actually, I hope Apache takes that, too). Lots of folks have abandoned MySQL in favor of other DBMS offerings, many of them to PostgreSQL (the best of bunch in my opinion).

You might want to take a look and see what you think.

Hope this helps some.

lpallard 09-15-2013 09:37 AM

santaslilslacker, that worked!! I modified the slackbuild script for the percona filetree and it compiled/installed & integrated into Slackware perfectly!!!

I wonder if someone with better authority than me look at the modified package to include it in Slackbuilds.org ?? SO far, the percona variant has enabled my applications to use more cores out of the 12 cores and use all assigned RAM for InnoDB pool. The performance went up dramatically. I see around 7.7M commits per hour while before I had seen only 5.8 to 6.0M.

Im not a SQL expert At all! but I believe there are definitely some performance tweaks in Percona's MYsql variant.

tronayne, thank you for your suggestion to move to ProgresSQL. Not being a DB master myself, I'd have to recode my current applications to use ProgresSQL right?

Im far from having time & expertise to do so. At the moment at least... I will eventually look into benchmarking both platforms and see which ones offer the best overall performance. I have in mind some traffic intensive applications that could use ProgresSQL instead of Mysql or Percona's MySQL, so maybe I could use these apps to benchmark. What you are saying about the Merge Oracle/Sun is interesting and answered some of my questions.

EDIT: Disable embedded server in the slackbuilds script of it will throw errors during compilation.

xj25vm 09-15-2013 10:14 AM

Quote:

Originally Posted by tronayne (Post 5027614)
MySQL and MariaDB (identical as far as I know) are rock-solid and dependable and have been for a long time. I think that PosgreSQL is too (perhaps not for such a long time, hasn't been around that long).

Not really useful to the OP - but with reference to your statement above: according to Wikipedia, PostgreSQL version 1 was released in 1989 - which seems like a pretty long time to me. And certainly longer than 1995, when the first version of MySQL was released. The "trouble" with PostgreSQL - if one can call it that - is that it never seems to have spent much time in the lime light - so a lot of people didn't even realise that it was there for so long. It just does its job - and the developers seem more concerned with software quality than propaganda. Which is a good thing, as far as I'm concerned.

tronayne 09-15-2013 11:29 AM

I probably misspoke (or miswrote?). Yeah, PostgreSQL was around earlier but it just never got on my horizon (probably because of some bad experiences with Ingres). I was aware of it but MySQL turned out to be a more "popular" platform for Linux systems both for personal and professional use given the LAMP model (great propaganda, that) and the relative ease of developing useful applications with that model.

PostgreSQL came up over the horizon a few years ago when I started looking at it and discovering that it's a darned good DBMS; I started poring MySQL to PostgreSQL and have been really impressed by PostgreSQL over MySQL. The Sun/Oracle mess has just been the final deciding factor. It's kind of decision time, I think -- you stay with MariaDB or you switch to something else for the long term (I'm pretty sure that Oracle will kill MySQL sooner rather than later; it is a direct competitor with Oracle's own DBMS products) and MariaDB is probably going to be the survivor. Just my opinion, but it sure looks that way.

Personally, I'm happier with PostgreSQL than I have been with MySQL. It was easy to port, it "works better" (although I can't put a finger on exactly what that means -- they both work just fine -- but PostgreSQL is pleasant to work with and I've not found that to be the case with MySQL in some annoying ways).

Skaperen 09-15-2013 02:14 PM

Quote:

Originally Posted by tronayne (Post 5028028)
Personally, I'm happier with PostgreSQL than I have been with MySQL. It was easy to port, it "works better" (although I can't put a finger on exactly what that means -- they both work just fine -- but PostgreSQL is pleasant to work with and I've not found that to be the case with MySQL in some annoying ways).

I have never encountered a loss of data in PostgreSQL as a result of "sudden power off". But I have a couple times with MySQL. For me this translates to how I can make trivial backups in AWS EC2 using the EBS snapshot facility. While more testing is still needed, I have now twice made a point-in-time snapshot of the data volume of a DB instance while PostgreSQL was running (and of course that data volume being mounted) and it loads up just fine in a test restore (made in a separate region). The way PostgreSQL handles these WAL files might be part of that success.


All times are GMT -5. The time now is 03:28 PM.