Just started out with MySQL 5.5 on Ubuntu Server 14.04 and ran into a strange issue.
I always show the settings of the variables by typing mysql --help
.
Just to get familiar with MySQL-Server I wanted to change local-infile
to true. So I went to my.conf
of MySQL and under mysqld
I added local-infile = true
.
After restarting MySQL-Server
I typed again mysql --help
getting:
local-infile FALSE
By changing the client and server port from 3306 to 3305 I checked if the output of mysql --help
is just a list of default setting but it is not.
The list now showed that the server is listening on 3305.
So I went into mysql
typing
SHOW GLOBAL VARIABLES LIKE 'local_infile'
getting following output
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | ON |
+---------------+-------+
1 row in set (0.00 sec)
So why is the variable output inconsistent?
I hope this question is related to the database mysql and database administrators is the right place to ask this kind of question. I hope it is not directly related with Ubuntu. If so please bear with me.
1 Answer 1
client (mysql) and server (mysqld) are different applications with different parameters
- "mysql" = your mysql-client 'mysql' ... and that FALSE is the client parameter
- "/etc/init.d/mysql" = name of the service that starts your mysql-server 'mysqld' that uses my.cfg for it's parameters
-
Ah you seem to be right.
mysql --help
seems to output the client-configuration and not the mysqld-service configuration. That is why it does not show up. And I am always using the client to interact with the server. I always thought I am on the server when fetching global variableinline-file
, but I am using the client. Is this correct?Mike– Mike2015年06月17日 09:11:43 +00:00Commented Jun 17, 2015 at 9:11
[mysqld]
section of my.cnf?