不能以root身份登录,没有密码到phpmyadmin
发布时间:2020-12-13 18:35:00 所属栏目:Linux 来源:网络整理
导读:这是我的config.inc.php文件,因为我升级到11.10突然之间,我无法以root用户身份登录,没有密码.我已经正确地设置了这些指令,所以这是令人困惑的,为什么它不会允许这个了.任何帮助? $i = 0;$i++;if (is_readable('/etc/phpmyadmin/config-db.php')) { require(
这是我的config.inc.php文件,因为我升级到11.10突然之间,我无法以root用户身份登录,没有密码.我已经正确地设置了这些指令,所以这是令人困惑的,为什么它不会允许这个了.任何帮助?
$i = 0; $i++; if (is_readable('/etc/phpmyadmin/config-db.php')) { require('/etc/phpmyadmin/config-db.php'); } else { error_log('phpmyadmin: Failed to load /etc/phpmyadmin/config-db.php.' . ' Check group www-data has read access.'); } /* Configure according to dbconfig-common if enabled */ if (!empty($dbname)) { /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; /* Server parameters */ if (empty($dbserver)) $dbserver = 'localhost'; $cfg['Servers'][$i]['host'] = $dbserver; if (!empty($dbport) || $dbserver != 'localhost') { $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['port'] = $dbport; } //$cfg['Servers'][$i]['compress'] = false; /* Select mysqli if your server has it */ $cfg['Servers'][$i]['extension'] = 'mysqli'; /* Optional: User for advanced features */ $cfg['Servers'][$i]['controluser'] = $dbuser; $cfg['Servers'][$i]['controlpass'] = $dbpass; /* Optional: Advanced phpMyAdmin features */ $cfg['Servers'][$i]['pmadb'] = $dbname; $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; $cfg['Servers'][$i]['relation'] = 'pma_relation'; $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; $cfg['Servers'][$i]['column_info'] = 'pma_column_info'; $cfg['Servers'][$i]['history'] = 'pma_history'; $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; $cfg['Servers'][$i]['tracking'] = 'pma_tracking'; /* Uncomment the following to enable logging in to passwordless accounts,* after taking note of the associated security risks. */ $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; /* Advance to next server for rest of config */ $i++; } /* Authentication type */ //$cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ //$cfg['Servers'][$i]['host'] = 'localhost'; //$cfg['Servers'][$i]['connect_type'] = 'tcp'; //$cfg['Servers'][$i]['compress'] = false; /* Select mysqli if your server has it */ //$cfg['Servers'][$i]['extension'] = 'mysql'; /* Optional: User for advanced features */ // $cfg['Servers'][$i]['controluser'] = 'pma'; // $cfg['Servers'][$i]['controlpass'] = 'pmapass'; /* Optional: Advanced phpMyAdmin features */ // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; // $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; // $cfg['Servers'][$i]['relation'] = 'pma_relation'; // $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; // $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; // $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; // $cfg['Servers'][$i]['column_info'] = 'pma_column_info'; // $cfg['Servers'][$i]['history'] = 'pma_history'; // $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; /* Uncomment the following to enable logging in to passwordless accounts,* after taking note of the associated security risks. */ // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; /* * End of servers configuration */ /* * Directories for saving/loading files from server */ $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; 解决方法
靠近底部的第二行:
/* Uncomment the following to enable logging in to passwordless accounts,* after taking note of the associated security risks. */ // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; 这条线,也需要注释. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |