Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)

后端 未结 30 2938
再見小時候
再見小時候 2020-11-22 04:23

I am having a big problem trying to connect to mysql. When I run:

/usr/local/mysql/bin/mysql start

I have the following error :

<         


        
30条回答
  •  面向向阳花
    2020-11-22 04:38

    are you sure you installed mysql as well as mysql server..

    For example to install mySql server I'll use yum or apt to install both mysql command line tool and the server:

    yum -y install mysql mysql-server (or apt-get install mysql mysql-server)
    

    Enable the MySQL service:

    /sbin/chkconfig mysqld on
    

    Start the MySQL server:

    /sbin/service mysqld start
    

    afterwards set the MySQL root password:

    mysqladmin -u root password 'new-password' (with the quotes)
    

    I hope it helps.

提交回复
热议问题