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> 
  • 相关阅读:
    vue 组件的简单使用01
    vue 绑定 class 和 内联样式(style)
    input select 值得绑定与获取
    computed 计算属性
    v-for 循环 绑定对象 和数组
    过滤器 filter
    v-model 双向数据绑定以及修饰符
    v-on 绑定单个或多个事件
    v-bin:href 绑定链接
    .net core自动发送后台请求写法
  • 原文地址:https://www.cnblogs.com/arcer/p/3702590.html
Copyright © 2011-2022 走看看