例如 xampp 安装路径为 /opt/lampp/, copy 一份默认的配置
cp /opt/lampp/phpmyadmin/libraries/config.default.php /opt/lampp/phpmyadmin/conf.inc.php
修改 phpmyadmin/conf.inc.php
/* Authentication type and info */ $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['Lang'] = ''; /* Bind to the localhost ipv4 address and tcp */ $cfg['Servers'][$i]['host'] = '127.0.0.1'; $cfg['Servers'][$i]['connect_type'] = 'tcp';
/** * MySQL user * * @global string $cfg['Servers'][$i]['user'] */ $cfg['Servers'][$i]['user'] = 'root'; /** * MySQL password (only needed with 'config' auth_type) * * @global string $cfg['Servers'][$i]['password'] */ $cfg['Servers'][$i]['password'] = 'root';