Solved

Where is the Synology mySQL server configuration file?

Posted on 2014-01-31
6
4,852 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Backup Your Microsoft Windows Server®

Backup 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.

Join & Write a Comment

A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now