mysqldump: Got error: 1045: Access denied for user ‘root’@’localhost’ (using pas sword: YES) when trying to connect

优质老薛主机推荐:15%终身付款折扣:xwseo15 25%首次付款折扣 : xwseo115 点击下图进入购买

相信大家在服务器上都会放多个网站,那么如果一个一个数据导出的话,那假如存放n个数据库,那不是很浪费时间,所以可以导出所有数据库,于是小魏想导出所有的数据库,但是小魏在使用命令行导出mysql数据库中的多个数据库文件,在使用mysqldump导出mysql所有数据库数据时,出现了如下错误:mysqldump: Got error: 1045: Access denied for user ‘root’@’localhost’ (using password: YES) when trying to connect那么这个问题该怎么解决呢?看下图:

1.在导出所有数据库时发现了报错

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using pas sword: YES) when trying to connect

2.解决方法,在命令上加-hlocalhost 或 -h172.30.204.23,小魏经过测试解决了该问题。

赞 (12)
分享到:更多 ()