CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

连接mysql出错:CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user ‘root‘@‘localhost‘ (using password: YES)

注意这里的 ‘root‘@‘localhost‘ ,当检查登录用户和登录密码均没有错误的情况下,可以到 mysql.user 表中查看,User列中是否有 root用户;同时还要注意Host列,注意,这个字段是用来限制连接mysql的来源主机地址。

意思就是:如果你用localhost连接的就需要在这里配置localhost;如果你是用本机的内网地址[例如 192.168.100.100],也需要在这里配置。

最后再执行: mysql> flush privileges;

CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

时间: 2024-08-21 18:12:26

CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)的相关文章

【zabbix】connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)

前面安装的我就不说了,度娘上的很多: 关键是这个问题,网上的比较多,但是没有发现有用的: 问题:zabbix server is runing No 日志:/tmp/zabbix_server.log connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO) 解决过程: 1)找到安装目录: [[email protected] init

django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")解决

Django错误又来了,数据库的连接问题......... 出现django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)"),说明自己设置的密码错误,在setting.py中改即可. 就是图中涂抹的位置,改为自己数据库的密码. django.db.utils.OperationalError: (1045, "Access

[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)

在配置了zabbix服务端后,发现:"zabbix server is running"的Value值是"no", 用:netstat -atnlp|grep 10051 发现没有出现zabbix_server的10051端口.在网上找了很多办法,发现都不管用. 通过查看日志看到如下错误提示: tail /tmp/zabbix_server.log 解决方法: 用root帐号登录mysql 然后执行: mysql> grant all on zabbix.*

mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'

就当作自己忘记Mysql密码把,忘记密码的解决方法 一.mysql登录错误mysqladmin: connect to server at 'localhost' failederror: 'Access denied for user 'root'@'localhost' (using password: YES)'无法修改密码用 service mysqld stopmysqld_safe --skip-grant-tables &输入 mysql -uroot -p 回车进入>use

Yii “CDbConnection failed to open the DB connection: could not find driver"解决办法

前言:用Yii框架做项目时,有时会遇到“CDbConnection failed to open the DB connection: could not find driver”这个问题,这个问题通常是因为没有加载pdo_mysql.dll扩展所致.查找问题和解决的方法如下: 一.在phpinfo中查看是否有pdo_mysql模块或者在cmd中输入php -m查看是否加载了pdo_mysql模块. 二.要是在第一步中没有找到pdo_mysql模块,接着就是在php.ini中把extension

安装Chive提示CDbConnection failed to open the DB connection.

最近初学PHP,看到Chive这个好玩的数据库管理工具,在登录时遇到这样的错误提示信息: CDbConnection failed to open the DB connection. 我的PHP版本是php-5.3.10 只需修改php安装目录下的php.ini中的 extension=php_pdo_mysql.dll 把前面的分号去掉即可 发现php还是挺有意思的,以前一直以为只学一门语言就可以了,外面的风景还是很精彩哒! 安装Chive提示CDbConnection failed to

yii框架:CDbConnection failed to open the DB connection: could not find driver的解决办法

这个问题是因为php中缺少pdo mysql造成的.解决方法是为php添加此扩展.前往你最早的php安装文件,进入ext/pdo_mysql/目录下,然后./configure --with-php-config=/home/work/service/php_for_apache2/bin/php-config --with-pdo-mysql=/home/work/service/mysql 然后make make install,然后屏幕上会提示pdo库安装到的路径,把此路径记下来然后添加到

yii框架:CDbConnection failed to open the DB connection: could not find driver的解决的方法

这个问题是由于php中缺少pdo mysql造成的. 解决方法是为php加入此扩展.前往你最早的php安装文件,进入ext/pdo_mysql/文件夹下,然后./configure --with-php-config=/home/work/service/php_for_apache2/bin/php-config --with-pdo-mysql=/home/work/service/mysql 然后make make install,然后屏幕上会提示pdo库安装到的路径,把此路径记下来然后加

mybatis connection error Cannot create PoolableConnectionFactory (Access denied for user 'root '@'local

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exc