• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7385
  • Last Modified:

Where is the Synology mySQL server configuration file?

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?
Francois Koutchouk
Francois Koutchouk
  • 4
  • 2
1 Solution
Dan CraciunIT ConsultantCommented:
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.

Francois KoutchoukCTOAuthor Commented:
looking at /usr/syno/etc/rc.d/Syn21mysql.sh I see

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)

same problem... where in the world is the Synology box reading its configuration from?!
Dan CraciunIT ConsultantCommented:
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?
Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Francois KoutchoukCTOAuthor Commented:
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.
Francois KoutchoukCTOAuthor Commented:
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...
Francois KoutchoukCTOAuthor Commented:
Resolved as a workaround, cause of the initial problem unbeknownst...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now