我一直在努力只是为了在我的Linux服务器帐户中连接MySQL。但是当我运行时mysqladmin -u root -p
,它会生成以下提示:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
然后,当我尝试这个:
mkdir /var/run/mysqld
touch /var/run/mysqld/mysql.sock
它会提示
touch: cannot touch `/var/run/mysqld/mysql.sock': Permission denied
如果有任何解决方法或解决方案可以帮助我吗?
你确定MySQL服务器正在运行吗?您是否尝试过以root身份编辑文件?
—
马修威廉姆斯