PHPMYADMIN出现“连接sock失败”等,数据库无密码,密码登陆
无法连接解决:
phpmyadmin/config.inc.php里:
$cfg[‘Servers’][$i][‘host’] = ‘127.0.0.1’;
为数据库加密码:
进入/opt/lampp/bin,运行mysql,无需密码进入
然后找到mysql数据库里的user表:
mysql>UPDATE user SET password = ‘444444’ WHERE User = ‘root’;
mysql>flush privileges;
密码登陆解决:
$cfg[‘Servers’][$i][‘auth_type’] = ‘config’; ==> $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;