zoukankan      html  css  js  c++  java
  • ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

    [root@gaosheng ~]# mysql -uarcerzhang -parcerzhang -hlocalhost
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
    [root@gaosheng ~]# ll /var/lib/mysql/
    total 20544
    drwx------ 2 mysql mysql     4096 Apr  1 04:01 arcerdb
    drwx------ 2 mysql mysql     4096 Mar 31 22:34 billy
    -rw-rw---- 1 mysql mysql 10485760 Apr  1 03:56 ibdata1
    -rw-rw---- 1 mysql mysql  5242880 Apr  1 03:56 ib_logfile0
    -rw-rw---- 1 mysql mysql  5242880 Mar 30 23:07 ib_logfile1
    drwx------ 2 mysql mysql     4096 Mar 31 23:32 meta
    drwx------ 2 mysql mysql     4096 Mar 30 23:07 mysql
    srwxrwxrwx 1 mysql mysql        0 Apr  1 03:56 mysql.sock
    drwx------ 2 mysql mysql     4096 Mar 30 23:07 test
    drwx------ 2 mysql mysql     4096 Mar 31 00:47 testdb
    [root@gaosheng ~]# /etc/init.d/mysqld start
    Starting MySQL:                                            [  OK  ]
    [root@gaosheng ~]# mysql -uarcerzhang -parcerzhang
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 2
    Server version: 5.0.77-log Source distribution
    
    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
    
    mysql> show databases;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema | 
    | arcerdb            | 
    | billy              | 
    | meta               | 
    | mysql              | 
    | test               | 
    | testdb             | 
    +--------------------+
    7 rows in set (0.07 sec)
    
    mysql> 
  • 相关阅读:
    位运算 & 网络序字节序
    TFTP & commons-net-3.3.jar
    存储过程
    poj1185-炮兵阵地(状态压缩dp)
    hdu4570-区间dp
    codevs1026-dp(记忆化搜索)
    hdu1494 跑跑卡丁车(动态规划)
    hdu5094-Maze
    hdu4403- A very hard Aoshu problem(搜索)
    hdu2510-符号三角形(dfs+打表)
  • 原文地址:https://www.cnblogs.com/arcer/p/3702590.html
Copyright © 2011-2022 走看看