网站连接错误,近期出现的mysql连接问题

Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111) in /usr/www/wordpress/wp-includes/wp-db.php on line 1568 Error establishing a database connection This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down. […]

mariadb/mysql登录报错提示:ERROR 1045 (28000)的解决方法

本文分析了mysql登录报错提示:ERROR 1045 (28000)的解决方法。分享给大家供大家参考,具体如下: # mysql -uroot -p Enter password: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES) 一、问题: 公司linux系统的mysql数据库root用户设置过密码,但常常用命令’mysql -u root -p’登录报错,有时又能登录。登录报错信息为: [root@localhost ~]# mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES) 二、原因:数据库中存在空用户所致