MariaDB 10

Questions about hosting a Website, using MySQL, PhP or MariaDB may be posted here.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
Akirainblack
I'm New!
I'm New!
Posts: 7
Joined: Mon Feb 02, 2015 4:03 pm

Re: MariaDB 10

Unread post by Akirainblack » Thu Jul 27, 2017 3:42 pm

wags1 wrote:Glad it finally forked for you. One question, had you upgraded PHPMyAdmin to the latest release before you did the export/import?
Yes, I'd updated it to the latest version.

wags1
Trainee
Trainee
Posts: 15
Joined: Tue Sep 10, 2013 6:43 pm

Re: MariaDB 10

Unread post by wags1 » Thu Jul 27, 2017 5:52 pm

That was my last idea as to why it didn't just work for you... :D
Oh well, at least you found a way to get it to work.

Yearofthegoat
Rookie
Rookie
Posts: 35
Joined: Mon Jul 04, 2016 4:55 pm

Re: MariaDB 10

Unread post by Yearofthegoat » Thu Sep 14, 2017 10:18 am

wags1 wrote:For Kodi Users -

If you are using MariaDB 5.5 for your Kodi database and are trying to figure out how to migrate your database to MariaDB 10 here is what I did to get it migrated and working. There are, I'm sure, easier and quicker ways to do this but this is what worked for me. I hope it helps someone.

1 - Using the Synology package center install MariaDB 10 and then upgrade PHPMyAdmin.
2 - Using PHPMyAdmin login to MariaDB 5.5 (if both 10 and 5.5 are running you should have a selection box at the bottom of the PHPMyAdmin login screen).
3 - On the home screen click on Export, accept the defaults and click on Go. This will export your existing databases to your browsers download folder.
4 - Click on the logoff icon.
5 - Using PHPMyAdmin login to MariaDB 10. Note - the default login is root with no password. After your first login you should change it for security.
6 - If your Kodi databases were using a userid and password complete the following step, if not skip it - Click on User Accounts and create an account with the exact same username, password, and privileges as your were using with MariaDB5.5.
7 - Click on Import and point to the file you exported in step 3 and accept the defaults. Once the import competes you should see your Kodi databases in the left pane.
8 - If you created a username and password in step 6 click on Databases and then click on Privileges next to each of your Kodi databases to ensure that the user that you created is there and has the correct privileges.
9 - Click on the logoff icon.
10 - Using the Synology Package Center stop MariaDB 5.5.
11 - For each of your Kodi systems you will need to edit your advancedsettings xml file and change the port setting from 3306 to 3307.
12 - Run each of your Kodi systems to test and ensure they are working correctly.
13 - If everything is working you can uninstall MariaDB 5.5 and delete the databases associated with that server.

That's it, at that point you should be good to go.
Fantastic - worked fine for me, using Kodi Jarvis 16.1 at present.

In step 7 I unticked the 'interrupt...if near timeout' option, but all went well.

If this isn't in the Kodi Wiki, it should be!

Thanks again.
DS212J, DS916+

Joffer
I'm New!
I'm New!
Posts: 2
Joined: Thu Dec 20, 2012 1:35 am

Re: MariaDB 10

Unread post by Joffer » Tue Sep 19, 2017 1:48 pm

If you want to run MariaDB10 on 3306, put the following into /var/packages/MariaDB10/etc/my.cnf :

Code: Select all

[client]
port = 3306

[mysqld]
port = 3306
Then (re)start MariaDB10. MariaDB5 should be uninstalled, as it will create a collision on port 3306 if you start MariaDB5

Ltek
Enlightened
Enlightened
Posts: 425
Joined: Sat Dec 10, 2011 9:21 pm

Re: MariaDB 10

Unread post by Ltek » Fri Oct 20, 2017 5:51 am

Is there a major performance benefit to running Kodi's DB on 10 vs 5.5?

User avatar
Freeco
Experienced
Experienced
Posts: 113
Joined: Wed Dec 24, 2008 12:11 pm
Location: Belgium
Contact:

Re: MariaDB 10

Unread post by Freeco » Fri Oct 20, 2017 2:28 pm

Ltek wrote:Is there a major performance benefit to running Kodi's DB on 10 vs 5.5?
Not that I've noticed...
Is your Kodi slow with v5.5?

Model: DS414 (1.33GHz dualcore - 1GB RAM)
Firmware: DSM 6.1
RAID1: 3 x WD Red 4TB (WD40EFRX)
Network: Netgear GS724T-300
Backup: Sharkoon SATA QuickDeck Pro USB3 + Seagate Barracuda 7200.14 3TB (ST3000DM001)

Sold: DS212 & DS209+

Ltek
Enlightened
Enlightened
Posts: 425
Joined: Sat Dec 10, 2011 9:21 pm

Re: MariaDB 10

Unread post by Ltek » Fri Oct 20, 2017 4:57 pm

Is there a major performance benefit to running Kodi's DB on 10 vs 5.5?

romu
Novice
Novice
Posts: 56
Joined: Wed Nov 26, 2014 10:12 am

Re: MariaDB 10

Unread post by romu » Mon Dec 04, 2017 9:57 pm

Hello,
I'm in the upgrade process to convert my DBs from MariaDB 5.5 to 10. I'm facing a strange issue.

If I run this command:

Code: Select all

mysql --user=root -p
I get:

Code: Select all

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
I've to run this to make it work:

Code: Select all

mysql --user=root --socket=/run/mysqld/mysqld10.sock -p
Currently, because of this strange problem, I can't get software "MariaDB client" to work. Any idea? Thanks.

DarkLite1
Trainee
Trainee
Posts: 13
Joined: Sun Oct 13, 2013 10:01 am

MariaDB10 ERROR 2002 (HY000)

Unread post by DarkLite1 » Wed Dec 13, 2017 4:37 pm

After an upgrade from MariaDB10 to a newer package on DSM today the database became inaccessible, even-though it has been running perfectly fine with MariaDB10 for months now. It seems like I'm not the only one with this problem https://forum.synology.com/enu/viewtopi ... 07#p510107.

Code: Select all

mysql --user=bob --password=P@ssw0rd --port=3307
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")

Code: Select all

cat /var/packages/MariaDB10/etc/.mariadb.conf 
vol=/volume1/@database/mariadb10

Code: Select all

ls -al /var/packages/MariaDB10/etc
lrwxrwxrwx 1 root root 32 Dec 13 13:14 /var/packages/MariaDB10/etc -> /usr/syno/etc/packages/MariaDB10

Code: Select all

cat /volume1/@appstore/MariaDB10/config/MariaDB10.sc
[MariaDB10]
title="MySQL"
desc="MariaDB 10"
port_forward="no"
dst.ports="3307/tcp"


I can't seem to connect to the DB anymore. PHPMyAdmin has no problems so I guess the DB is running but I can't connect to it. Anyone tips?

DarkLite1
Trainee
Trainee
Posts: 13
Joined: Sun Oct 13, 2013 10:01 am

Re: MariaDB10 ERROR 2002 (HY000)

Unread post by DarkLite1 » Wed Dec 13, 2017 4:52 pm

So, I finally figured it out. It appears that with the previous update of MariaDB10 the default port was reset to 0 (previously 3307). That's why I changed my Kodi advancedconfiguration.xml file to use port 0. Today, after updating the package again, it seems they have changed the default port back to 3307.

As a bonus I forgot to use the -h parameter to define the hostname/IP of my NAS that is running the MariaDB.

Check here https://mariadb.com/kb/en/library/troub ... on-issues/ for more info.

Code: Select all

mysql -h xxx.xxx.xxx.xxx --user=bob --password=P@ssw0rd --port=3307
I've also stopped and started the MariaDB10 service from the package center within DSM. This requested me to open the correct firewall port. I hope this might help you guys too.

tehnoinstyle
Rookie
Rookie
Posts: 37
Joined: Wed May 27, 2015 8:21 am

Re: MariaDB10 ERROR 2002 (HY000)

Unread post by tehnoinstyle » Sat Dec 16, 2017 8:47 am

DarkLite1 wrote:So, I finally figured it out. It appears that with the previous update of MariaDB10 the default port was reset to 0 (previously 3307). That's why I changed my Kodi advancedconfiguration.xml file to use port 0. Today, after updating the package again, it seems they have changed the default port back to 3307.

As a bonus I forgot to use the -h parameter to define the hostname/IP of my NAS that is running the MariaDB.

Check here https://mariadb.com/kb/en/library/troub ... on-issues/ for more info.

Code: Select all

mysql -h xxx.xxx.xxx.xxx --user=bob --password=P@ssw0rd --port=3307
I've also stopped and started the MariaDB10 service from the package center within DSM. This requested me to open the correct firewall port. I hope this might help you guys too.
Hi.

Yes, it works. Now I can get a dump of the MariaDB10 database.

Code: Select all

mysqldump db_name -h 192.168.1.4 --user=db_user --password=db_password --port=3307 > /volume1/public/tehnoinstyle_backup_long/db_nameDB10_`date +%Y-%m-%d_%H_%M`.sql
Thankyou.

DarkLite1
Trainee
Trainee
Posts: 13
Joined: Sun Oct 13, 2013 10:01 am

Re: MariaDB 10

Unread post by DarkLite1 » Sun Dec 17, 2017 2:11 pm

You're welcome, glad you got it sorted. Thumbs up.

DarkLite1
Trainee
Trainee
Posts: 13
Joined: Sun Oct 13, 2013 10:01 am

Re: MariaDB 10

Unread post by DarkLite1 » Fri Dec 22, 2017 6:17 pm

For one reason or another after a couple of reboots from the NAS the port of MariaDB10 went back to 0 instead of 3307. Does anyone else have this problem? It's not consistent and changes once in a while.

NielsE
I'm New!
I'm New!
Posts: 3
Joined: Sat Oct 21, 2017 9:27 am

Re: MariaDB 10

Unread post by NielsE » Wed Apr 11, 2018 7:00 pm

gtyler wrote:I tried with the full path to mysqldump inside of the exec() command in my php file and it worked.
I didn't need to specify the path before, but this is what is working now:
exec("/volume1/@appstore/MariaDB10/usr/local/mariadb10/bin/mysqldump my_dbname --user=root --password=NotMyPassword >logs/my_dbname.sql");
Did you already managed to run MariaDB10 scripts like mysqldump without need to specifiy full path to mysqldump?

So only mysqldump.... instead of /volume1/@appstore/MariaDB10/usr/local/mariadb10/bin/mysqldump.....

I think the default bin folder should be changed somewhere.

BBloke
Novice
Novice
Posts: 47
Joined: Wed Jun 11, 2014 12:30 am

Re: MariaDB 10

Unread post by BBloke » Thu Apr 12, 2018 4:55 pm

I've been running 5 and 10 side by side for some time. I've done a few reboots and the port has never changed.

This is just to help others. I found using MySQL Workbench a pretty easy tool for migrating from 5 to 10 rather the CLI. It's just another option if you have a PC to hand.
DS414 - 4 x 4TB WD Reds (SHR)

Post Reply

Return to “Web Server + PHP / MySQL + MariaDB”