title: zabbix can't connect to local MySQL server
body: <p>When I start zabbix server ,the log show below:</p>
  
  <pre><code># tail 300f /tmp/zabbix_server.log
  [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/usr/local/mysql/tmp/mysql.sock'
  </code></pre>
  
  <p>my mysql is working and mysql's acount(zabbix) is working;</p>
  
  <pre><code>  [root@localhost data]# ps aux |grep mysql
      root      49035  0.0  0.0 113264  1616 pts/2    S    17:00   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
      mysql     49170  0.0  5.5 1274804 215428 pts/2  Sl   17:00   0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/var/lib/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
      root      49628  0.0  0.0 112660   972 pts/2    S+   17:22   0:00 grep --color=auto mysql
  
  [root@localhost data]# /usr/local/mysql/bin/mysql -u zabbix -p123456
  mysql: [Warning] Using a password on the command line interface can be insecure.
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 4
  Server version: 5.7.20 MySQL Community Server (GPL)
  
  Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective
  owners.
  
  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  
  mysql&gt; show databases;
  +--------------------+
  | Database           |
  +--------------------+
  | information_schema |
  | zabbix             |
  +--------------------+
  2 rows in set (0.00 sec)
  
  mysql&gt; 
  </code></pre>
  
  <p>the sock is here:</p>
  
  <pre><code>[root@localhost data]# cd /var/lib/mysql/
  [root@localhost mysql]# ll
  total 188504
  drwxr-xr-x 2 mysql mysql     4096 Jan 24 12:30 mysql
  srwxrwxrwx 1 mysql mysql        0 Jan 24 17:00 mysql.sock
  -rw------- 1 mysql mysql        6 Jan 24 17:00 mysql.sock.lock
  drwxr-xr-x 2 mysql mysql     8192 Jan 24 12:30 performance_schema
  drwxr-xr-x 2 mysql mysql    12288 Jan 24 15:12 zabbix
  [root@localhost mysql]#  
  </code></pre>
  
  <p>my zabbix_server.conf</p>
  
  <pre><code>LogFile=/tmp/zabbix_server.log  
  DBName=zabbix                  
  DBUser=zabbix                    
  DBPassword=123456           
  </code></pre>
  
  <p>what something wrong,please help me.</p>
  
  <p>thank you so much at first</p>