phpadmin文件夹下的config.inc.php中修改
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
需要修改密码解决此问题
首先 关掉mysql服务
再在Terminal执行如下: 进入到文件夹内, 跳过验证, 自动重启mysql服务. 再进入到mysql命令
cd /usr/local/mysql/bin/ ./mysqld./mysqld_safe --skip-grant-tables & ./mysqld/usr/local/mysql/bin/mysql
mysql> update mysql.user set password=password('root') where user='root'; mysql> flush privileges mysql> quit
./mysqld_safe &