title: How can I change mysql port from 0 to 3306?
body: <p>I find it hard to establish a link between JDBC and MySQL. I think one of the reasons is the mysql port. I checked the port with the statement: <code>show variables like 'port';</code> in mysql. And the response is:</p>
  <pre><code>+---------------+-------+
  | Variable_name | Value |
  +---------------+-------+
  | port          | 0     |
  +---------------+-------+
  1 row in set (0.07 sec)
  </code></pre>
  <p>My operating system is archlinux.
  How can I change mysql port from 0 to 3306?</p>
  <p>I have changed the port number in both /etc/my.cnf and /etc/mysql/my.cnf. But it didn't work.</p>