patternsqlMinor
MySQL ignoring some params from my.cnf
Viewed 0 times
paramscnfmysqlsomeignoringfrom
Problem
I have a virtual box with 2 installed instances of MySQL.
First instance:
Second instance:
I can connect to both. The first instance is fine. The second is not.
MySQL doesn't ignoring some params from
I need to make MySQL read all params from my.cnf.
I tried:
Could someone guide me?
First instance:
- /etc/mysql/my.cnf
- /var/lib/mysql
- port = 3306Second instance:
- /etc/mysql2/my.cnf
- /var/lib/mysql2
- port = 3307I can connect to both. The first instance is fine. The second is not.
MySQL doesn't ignoring some params from
my.cnf file (socket, port, pid-file, data-dir...). But if I'm trying to change something else: cache, buffers, log files it completely ignores changes after restarting.I need to make MySQL read all params from my.cnf.
I tried:
- to move
my.cnffrom/etc/mysqlto/var/lib/mysql; - commenting out
!includeir /etc/mysql/conf.d.
Could someone guide me?
Solution
I had a similar problem with a box I was diagnosing for performance issues, it turned out that there was an incorrect / misplaced heading entry within the my.cnf for that server, so MySQL was ignoring all the settings within that section...
For example, if you had the following;
Then the buffer tuning section is ignored as it is within the
Hopefully, it is as simple as this for you!
For example, if you had the following;
[mysqld]
######################################################
# First, the generic server configuration items
port = 3306
socket = /var/lib/mysql/mysql.sock
datadir = /mysql/data
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
key_buffer_size = 256M
table_open_cache = 1024
query_cache_size = 32MThen the buffer tuning section is ignored as it is within the
client section and not the mysqld section... Re-arrange the sections, and all works as intended.Hopefully, it is as simple as this for you!
Code Snippets
[mysqld]
######################################################
# First, the generic server configuration items
port = 3306
socket = /var/lib/mysql/mysql.sock
datadir = /mysql/data
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
key_buffer_size = 256M
table_open_cache = 1024
query_cache_size = 32MContext
StackExchange Database Administrators Q#27080, answer score: 2
Revisions (0)
No revisions yet.