数据库安装后无法访问,mysql重启报错: 或报错:MySQL is running but PID file could not be found 解决方法: 第一种方法:看磁盘是否已满:df –h 若已满,清理下垃圾文件 第二种方法:查看数据库运行状态 /etc/init.d/mysql status 提示ERROR! MySQL is running but PID file could not be found 1.ps aux |grep mysql 查看mysql进程 若看到如上内容
错误代码: client does not support authentication 解决办法: 1 使用命令行进入数据库 2 选着数据库 mysql --> user mysql 3 alter user 'root'@'localhost' identified with mysql_native_password by '123456'; 4 flush privileges; 这样就可以连接了
先看连接错误 连接失败:2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: .... 解决方法: 进入MySQL控制台,执行如下命令: use mysql; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; 注意:'是英文的单引号这里的localhost对应本地,如果是远程访问 mysql的话