Solved

Where is the Synology mySQL server configuration file?

Posted on 2014-01-31
6
5,261 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:FKoutchouk
  • 4
  • 2
6 Comments
 
LVL 34

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 1

Author Comment

by:FKoutchouk
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 34

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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 1

Author Comment

by:FKoutchouk
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 1

Accepted Solution

by:
FKoutchouk 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 1

Author Closing Comment

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

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

825 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