Wilkins White
Wilkins White

Reputation: 151

mysqld ignoring my.cnf (mysql 5.6 on Ubuntu 16.04 Server)

I installed mysql 5.6 on Ubuntu Server 16.04 using this method: https://askubuntu.com/questions/762384/install-mysql-5-6-on-ubuntu-16-04

But i'm having trouble getting mysqld to read /etc/mysql/my.cnf

Specifically i'm trying to set it up for an Atlassian Confluence installation where I have to add in these settings:

[mysqld]
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2G

I've checked mysqld --help --verbose and it has the my.cnf in its path. Here's the relevant output:

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf The following
groups are read: mysqld server mysqld-5.6

I know that mysql is reading the file because if I change [mysqld] to [mysql] the arguments are correctly printed when I run mysql --print-defaults also if I put a wrong line in the file mysql will fail to start and tell me where the syntax error is. However mysqld does not report any arguments for mysqld --print-defaults or tell me about syntax errors in the file.

What else can I try?

Solved:

my.cnf was a symbolic link. I deleted it and made it an actual file. Now mysqld --show-defaults is working! So apparently mysql will follow the symlink but mysqld will not. Good to know.

Upvotes: 7

Views: 2627

Answers (2)

Sasa Bajic
Sasa Bajic

Reputation: 113

For mysqld as I know only hard links works. Or maybe you just had wrong permission, on original my.cnf file to which you put symbolic link.

Upvotes: 0

Wilkins White
Wilkins White

Reputation: 151

my.cnf was a symbolic link. I deleted it and made it an actual file. Now mysqld --show-defaults is working. So apparently mysql will follow the symlink but mysqld will not.

Upvotes: 8

Related Questions