zoukankan      html  css  js  c++  java
  • mysql 安装,创建用户

    sudo apt install mysql-client-core-5.7

    问题1:

            ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

       That error means the file /var/run/mysqld/mysqld.sock doesn't exists, if you didn't install mysql-server, then the file would not exist. So in that case, install it with

    sudo apt-get install mysql-server

    But if the mysql-server is already installed and is running, then you need to check the config files.

    The config files are:

    /etc/my.cnf
    /etc/mysql/my.cnf
    /var/lib/mysql/my.cnf

    In /etc/my.cnf, the socket file config may be /tmp/mysql.sock and in /etc/mysql/my.cnf the socket file config may be /var/run/mysqld/mysqld.sock. So, remove or rename /etc/mysql/my.cnf, let mysql use /etc/my.cnf, then the problem may solved.

  • 相关阅读:
    Spring----Day03
    Spring----Day02
    python
    python
    python
    python
    python
    python
    python
    python
  • 原文地址:https://www.cnblogs.com/ting152/p/13644593.html
Copyright © 2011-2022 走看看