Mysql – thesql variables are inconsistent

MySQL

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.

Best Answer

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