zoukankan      html  css  js  c++  java
  • MySQL登录报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    [root@pisphkdcbsql01 mysql3307]# /opt/mysql3307/bin/mysql -upisp -ppisp@123
    mysql: [Warning] Using a password on the command line interface can be insecure.
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    解决办法

    [root@pisphkdcbsql01 tmp]# ln -s /opt/mysql3307new/mysql-3307.sock mysql.sock
    [root@pisphkdcbsql01 tmp]# ll -thr
    total 4.9M
    -rw------- 1 root  root   783 May 26  2017 yum_save_tx-2017-05-26-09-23etoC8C.yumtx
    -rw-r--r-- 1 root  root    42 Jan  8  2018 network.bak
    -rw------- 1 root  root   248 Jan  9  2018 yum_save_tx-2018-01-09-11-33Y0mCc_.yumtx
    -rw------- 1 root  root  1.7K Jan  9  2018 yum_save_tx-2018-01-09-11-48cbmJd8.yumtx
    -rw------- 1 root  root   513 Jan  9  2018 yum_save_tx-2018-01-09-12-047IB4sD.yumtx
    -rw-r--r-- 1 root  root   521 Jan  9  2018 centos6_haikou_nanshu.repo
    -rw-r--r-- 1 root  root  4.5M Jan 30  2018 zabbixagent_for_linux.tar.gz
    -rw-r--r-- 1 root  root  2.5K Jan 30  2018 zabbix_install.bash
    -rw-rw-rw- 1 mysql mysql  708 Mar 16  2018 sql.csv
    -rw-r--r-- 1 root  root    32 Oct 25 10:39 lock.txt
    drwxr-xr-x 2 root  root  4.0K Oct 25 12:31 yum-bak
    -rw-r--r-- 1 root  root     0 Oct 27 09:19 mysql-3307.pid.shutdown
    -rw------- 1 mysql mysql    5 Oct 27 09:27 mysql-3307.sock.lock
    -rw-r--r-- 1 root  root  299K Oct 28 14:20 connect.log
    lrwxrwxrwx 1 root  root    33 Oct 28 14:20 mysql.sock -> /opt/mysql3307new/mysql-3307.soc
  • 相关阅读:
    UWP取出图片主色调
    UWP上可用的GB2312编码
    嵌入的资源 和 Resource
    WPF 斜角border
    .net core初试 --- 控制台程序
    Python初学手记----在window系统中安装环境
    我的第一个网络爬虫 C#版 福利 程序员专车
    使用FFMpeg命令行录屏推rtmp流
    WPF制作表示透明区域的马赛克画刷
    WPF之坑——surface触控失灵之谜
  • 原文地址:https://www.cnblogs.com/paul8339/p/9865518.html
Copyright © 2011-2022 走看看