【问题标题】:i install phpmyadmin on my ubuntu but its not working我在我的 ubuntu 上安装了 phpmyadmin 但它不起作用
【发布时间】:2011-05-19 08:14:29
【问题描述】:

我在我的 ubuntu 10.4 上安装了 phpmyadmin,但它无法登录

这是/etc/phpmyadmin/config.inc.php文件的内容

如果我们输入密码#2002 无法登录 MySQL 服务器

如果我们不输入密码配置禁止无密码登录(参见 AllowNoPassword)

你能帮我吗



/** * Debian local configuration file * * This file overrides the settings made by phpMyAdmin interactive setup * utility. * * For example configuration see /usr/share/doc/phpmyadmin/examples/config.default.php.gz * * NOTE: do not add security sensitive data to this file (like passwords) * unless you really know what you're doing. If you do, any user that can * run PHP or CGI on your webserver will be able to read them. If you still * want to do this, make sure to properly secure the access to this file * (also on the filesystem level). */

/** * Server(s) configuration */ $i = 0; // The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. // You can disable a server config entry by setting host to ''. $i++;

/** * Read configuration from dbconfig-common * You can regenerate it using: dpkg-reconfigure -plow phpmyadmin */ if (is_readable('/etc/phpmyadmin/config-db.php')) { require('/etc/phpmyadmin/config-db.php'); }

/* Configure according to dbconfig-common if enabled / if (!empty($dbname)) { / Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ if (empty($dbserver)) $dbserver = 'localhost'; $cfg['Servers'][$i]['host'] = $dbserver;

if (!empty($dbport)) {
    $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';

/* 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'] = '';

【问题讨论】:

  • 您收到什么错误信息?
  • 请更具体地说明它是如何不起作用的。 PMA Web 控制台是否未加载?不能连接mysql吗?
  • 有时将主机从“localhost”更改为“127.0.0.1”可以解决问题,但这完全取决于您得到的错误。
  • 如果我们输入密码 #2002 无法登录 MySQL 服务器
  • 如果我们不输入密码,配置禁止无密码登录(参见AllowNoPassword)

标签: php mysql linux phpmyadmin ubuntu-10.04


【解决方案1】:

如果您使用的是空白密码,请取消注释:

// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

如果你在一个独立的开发虚拟机里面是安全的,否则设置一个密码。

【讨论】:

【解决方案2】:

我也遇到了同样的问题,但我想我可能已经解决了..

解决方案: 假设您使用 setup.php 文件来设置 phpMyAdmin,一旦您完成了 mysql 服务器的配置并保存了更改,请将在 config/ 文件夹中自动创建的 config.inc.php 文件复制到phpMyAdmin 文件夹..确保它被写保护并删除 config/ 文件夹..然后刷新你的浏览器..

为我工作..希望它也适合你。

干杯。

【讨论】:

  • 谢谢,但我已经自己解决了这个问题,方法是全部删除并安装新副本
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-10-28
  • 2021-06-22
  • 2012-08-21
  • 2018-09-23
  • 2020-11-07
  • 1970-01-01
  • 2019-09-24
相关资源
最近更新 更多