title: why mysql just listen on ipv6's port 3306 , not a ipv4's port 3306
body: <p>I just got a mysql  problem .<br>
  when I start the mysql service with command</p>
  
  <pre><code># service mysqld start 
  </code></pre>
  
  <p>and the mysql service just listen on a IPv6's port 3306 which I though would be a IPv4's  port 3306.  </p>
  
  <pre><code>➜  ~ netstat -ntpl | grep 3306
  tcp6       0      0 :::3306                 :::*                    LISTEN      1897/mysqld
  ➜  ~
  </code></pre>
  
  <p>the my.cnf is follows:</p>
  
  <pre><code>[mysqld]
  datadir=/var/lib/mysql
  socket=/var/lib/mysql/mysql.sock
  symbolic-links=0
  
  # Recommended in standard MySQL setup
  sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
  
  [mysqld_safe]
  log-error=/var/log/mysqld.log
  pid-file=/var/run/mysqld/mysqld.pid
  </code></pre>
  
  <p>system : CentOS Linux release 7.2.1511 (Core)
  mysql version: mysqld  Ver 5.6.35 for Linux on x86_64 (MySQL Community Server (GPL))</p>
  
  <p>would someone do me a favor and find out how I can change it to listen on IPv4's 3306, thanks a lot . </p>