Solved

Where is the Synology mySQL server configuration file?

Posted on 2014-01-31
6
5,765 Views
Last Modified: 2014-03-19
Synology DSM213j with the latest DSM software update.

I need to change the max_allowed_packet from its current default value of 8388608 to 500M in order to import a SQL file.
On the Synology, I see a directory called /usr/syno/mysql/share/mysql that contains
my-small.cnf, my-medium.cnf, my-large.cnf, my-huge.cnf and my-innodb-heavy-4G.cnf
I edited the max_allowed_packet=500M on all the files.
For good measure, I copied my-small.cnf to my.cnf
and I also put a copy in /etc/my.cnf
I also restarted the mySQL server with
/usr/syno/etc/rc.d/S21mysql.sh restart
--> it makes no difference, SHOW VARIABLES still displays the original 8388608

? What configuration file is mySQL using on that device?
0
Comment
Question by:Francois Koutchouk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39826218
Try running, using ssh:
mysqld --help --verbose

Open in new window

It should tell you from where it tries to load the my.cnf file.

Please note that on Unix platforms, MySQL ignores configuration files that are world-writable. (https://dev.mysql.com/doc/refman/5.5/en/option-files.html)
So you might want to check permissions on your my.cnf.

HTH,
Dan
0
 
LVL 2

Author Comment

by:Francois Koutchouk
ID: 39826284
looking at /usr/syno/etc/rc.d/Syn21mysql.sh I see
MYSQL_DIR=/usr/syno/mysql

but when I restart, it says:
MYSQL data dir = /volume1/@database/mysql...

For good measure, I put a copy of my.cnf and set the security to -rw-r--r--   (644)
/etc/
/volume1/@database/
/volume1/@database/mysql/
/usr/syno/mysql/
/usr/syno/mysql/share/mysql/

same problem... where in the world is the Synology box reading its configuration from?!
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39826302
BTW, I just looked at my Synology 213+ with DSM 4.3 and it runs pgsql not mysql.
Did you install mysql on your NAS?
0
Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

 
LVL 2

Author Comment

by:Francois Koutchouk
ID: 39826596
Yes, it is mysql -- under Control Panel-->Web Services it says "enable mySQL" and the /usr/syno/etc/rc.d/Syn21mysql.sh reports stopping and restarting mySQL.
0
 
LVL 2

Accepted Solution

by:
Francois Koutchouk earned 0 total points
ID: 39929045
Here is the answer from Synology support:

He can confirm that the proper file is /etc/my.cnf.  But he also said that it has no effect if it's the [mysqld] section of my.cnf.

Please use phpMyAdmin to adjust the variables.


So I never really figured it out.  Lesson learnt: install and use phpMyAdmin, it works.  Why the manual changes don't is besides me...
0
 
LVL 2

Author Closing Comment

by:Francois Koutchouk
ID: 39939084
Resolved as a workaround, cause of the initial problem unbeknownst...
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question