所以,今天我第一次在Ubuntu 15.10上安装了XAMPP/LAMPP.Apache服务器工作正常,但当我尝试去'localhost/phpmyadmin'时,我收到以下错误:

并相信我,我搜索了整个互联网,堆栈溢出,apache朋友等等,并没有给定的解决方案为我工作...所以这是我的config.inc.php文件:
<?php
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Storage database and tables */
$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]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
Run Code Online (Sandbox Code Playgroud)
所以你可以看到我的user = root和密码为空.但它根本不起作用,我试图改变用户/通行证,试图改变controluser和controlpass,但似乎没有任何工作.你对我如何解决这个问题有任何想法吗?
小智 15
重新安装phpmyadmin并尝试
码:
sudo dpkg-reconfigure phpmyadmin
如果这不起作用然后尝试代码:
sudo apt-get --purge remove phpmyadmin
然后重新安装,如果这不起作用我愿意打赌它没关系,并做代码:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
并重启apache代码:
##sudo /etc/init.d/apache reload
sudo service apache2 reload
小智 6
根据config.inc.php您发布的消息,您的root用户密码是1234(正如我在行中看到的那样 $cfg['Servers'][$i]['password'] ='1234';),但是当您定义controluser时,文件稍后会使用空白密码.
我建议设置一个比root具有更少权限的实际控制用户,但快速修复将是编辑并进行此更改: $cfg['Servers'][$i]['controlpass'] = '1234';
要创建controluser帐户,请使用与此类似的SQL命令:
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
Run Code Online (Sandbox Code Playgroud)
替换您的phpMyAdmin配置存储数据库的名称(可能是'phpmyadmin')<pma_db>和自定义密码pmapass.
取消注释:...
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost'; //<--UNCOMMENT THIS
$cfg['Servers'][$i]['connect_type'] = 'tcp'; //<--UNCOMMENT THIS
Run Code Online (Sandbox Code Playgroud)
...
因为您需要它通过本地主机连接。
| 归档时间: |
|
| 查看次数: |
70659 次 |
| 最近记录: |