title: MySQL Galera cluster can't initiate first node
body: <p>I'm using Ubuntu 16.04 and installed MySQL version 5.7 via <code>apt-get</code> in AWS.</p>
  
  <p>After that, I've managed to upgrade the MySQL to Galera Cluster by following the Documentation from the <a href="http://galeracluster.com/documentation-webpages/installmysql.html" rel="nofollow noreferrer">official website</a> using <code>apt-get install galera-3 galera-arbitrator-3 mysql-wsrep-5.6</code></p>
  
  <p>After that I've configured the file <code>/etc/mysql/conf.d/galera.cnf</code> to be:</p>
  
  <pre><code>[mysqld]
  binlog_format=ROW
  default-storage-engine=innodb
  innodb_autoinc_lock_mode=2
  bind-address=0.0.0.0
  
  # Galera Provider Configuration
  wsrep_on=ON
  wsrep_provider=/usr/lib/galera/libgalera_smm.so
  
  # Galera Cluster Configuration
  wsrep_cluster_name="test_cluster"
  wsrep_cluster_address="gcomm://this_node_ip,second_ip,third_ip"
  
  # Galera Synchronization Configuration
  wsrep_sst_method=rsync
  
  # Galera Node Configuration
  wsrep_node_address="this_node_ip"
  wsrep_node_name="this_node_name"
  </code></pre>
  
  <p>The step above is repeated for the other 2 nodes (with it's own IP address). And stop the mysql with the following command <code>sudo service mysql stop</code> for each of the node.</p>
  
  <p>And in the first node, I'm trying to start with the following command:</p>
  
  <pre><code>sudo service mysql start --wsrep-new-cluster
  </code></pre>
  
  <p>But it returns: <code>Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.</code></p>
  
  <p>In the <code>systemctl status mysql.service</code>, it says:</p>
  
  <pre><code>● mysql.service - LSB: start and stop MySQL
     Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2018-02-09 15:53:16 +08; 33s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 6264 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
  
  Feb 09 15:53:15 systemd[1]: Starting LSB: start and stop MySQL...
  Feb 09 15:53:15 mysql[6264]: Starting MySQL
  Feb 09 15:53:15 mysql[6264]: .180209 15:53:15 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
  Feb 09 15:53:15 mysql[6264]: 180209 15:53:15 mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
  Feb 09 15:53:16 mysql[6264]:  * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
  Feb 09 15:53:16 systemd[1]: mysql.service: Control process exited, code=exited status=1
  Feb 09 15:53:16 systemd[1]: Failed to start LSB: start and stop MySQL.
  Feb 09 15:53:16 systemd[1]: mysql.service: Unit entered failed state.
  Feb 09 15:53:16 systemd[1]: mysql.service: Failed with result 'exit-code'.
  </code></pre>
  
  <p>Hope these information helps.</p>