0

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.

David Spillett
32.7k3 gold badges51 silver badges92 bronze badges
asked Jun 17, 2015 at 8:44
2
  • Dit you put it in the [mysqld] section of my.cnf? Commented Jun 17, 2015 at 16:08
  • @Rick James yes, as mentioned in my question! Commented Jun 17, 2015 at 16:41

1 Answer 1

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
answered Jun 17, 2015 at 9:04
1
  • 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 variable inline-file, but I am using the client. Is this correct? Commented Jun 17, 2015 at 9:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.