linux远程登录maridb,linux – 无法使用phpMyAdmin登录到远程MariaDB服务器,但在shell中工作...

我最近配置了两台服务器.第一个使用Apache和PHPMyAdmin.在另一台服务器上,我正确配置了maria-DB服务器.

PHPMyAdmin它正在读取配置文件,但我无法连接到MariaDB服务器并且PMA正在抛出

#2002 Cannot log in to the MysqL server

使用MysqL命令从Web服务器连接到数据库服务器并使用相同的用户/密码,我可以成功连接到数据库服务器.

在MysqL中没有错误,MysqL的所有端口都在防火墙中打开,没有PHP错误.我没有找到问题的运气.

编辑:

通过Shell访问服务器

[root@pw000i rafael]# MysqL -h [IP ADRESS TO THE REMOTE SERVER] -u rafael -p

Enter password:

Welcome to the MariaDB monitor. Commands end with ; or \g.

Your MariaDB connection id is 4

Server version: 5.5.36-MariaDB-log MariaDB Server

Copyright (c) 2000,2014,Oracle,Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

来自PHPMyAdmin的config.inc.PHP

/**

* PHPMyAdmin configuration file,you can use it as base for the manual

* configuration. For easier setup you can use "setup/".

*

* All directives are explained in Documentation.html and on PHPMyAdmin

* wiki .

*/

/*

* This is needed for cookie based authentication to encrypt password in

* cookie

*/

$cfg['blowfish_secret'] = 'MY SECRET PASSPHRASE IS HIDDEN'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/**

* 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 ''. If you want more than one server,just copy following section

// (including $i incrementation) serveral times. There is no need to define

// full server array,just define values you need to change.

$i++;

$cfg['Servers'][$i]['host'] = '10.XX.X.XXX'; // MysqL hostname or IP ad dress

$cfg['Servers'][$i]['port'] = ''; // MysqL port - leave blank for default port

$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leav e blank for default socket

$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MysqL s erver ('tcp' or 'socket')

$cfg['Servers'][$i]['extension'] = 'MysqLi'; // The PHP MysqL extension t o use ('MysqL' or 'MysqLi')

$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol f or the MysqL connection

// (requires PHP >= 4.3.0)

$cfg['Servers'][$i]['controluser'] = ''; // MysqL control user settin gs

// (this user must have read -only

$cfg['Servers'][$i]['controlpass'] = ''; // access to the "MysqL/user "

// and "MysqL/db" tables).

// The controluser is also

// used for all relational

// features (pmadb)

$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method ( config,http or cookie based)?

$cfg['Servers'][$i]['user'] = 'rafael'; // MysqL user

$cfg['Servers'][$i]['password'] = ''; // MysqL password (only need ed

// with 'config' auth_type)

$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name,only

// this db is displayed in l eft frame

// It may also be an array o f db-names,where sorting order is relevant.

$cfg['Servers'][$i]['hide_db'] = ''; // Database name to be hidde n from listings

$cfg['Servers'][$i]['verbose'] = 'new-db-mariaDB'; // Verbose nam e for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relatio n,Bookmark and PDF Features

// (see scripts/create_table s.sql)

// - leave blank for no su pport

// DEFAULT: 'PHPmyadmin'

$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table

// - leave blank for no bo okmark support

// DEFAULT: 'pma_bookmar k'

$cfg['Servers'][$i]['relation'] = ''; // table to describe the rel ation between links (see doc)

// - leave blank for no re lation-links support

// DEFAULT: 'pma_relatio n'

$cfg['Servers'][$i]['table_info'] = ''; // table to describe the dis play fields

// - leave blank for no di splay fields support

// DEFAULT: 'pma_table_i nfo'

$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tab les position for the PDF schema

// - leave blank for no PD F schema support

// DEFAULT: 'pma_table_c oords'

$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages o f relationpdf

// - leave blank if you do n't want to use this

// DEFAULT: 'pma_pdf_pag es'

$cfg['Servers'][$i]['column_info'] = ''; // table to store column inf ormation

// - leave blank for no co lumn comments/mime types

// DEFAULT: 'pma_column_ info'

$cfg['Servers'][$i]['history'] = ''; // table to store sql histor y

// - leave blank for no SQ L query history

// DEFAULT: 'pma_history '

$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables

// are up to date. This prev ents compatibility

// checks and thereby increa ses performance.

$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root log in

$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order,leave blank to not use

= '';

$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules,leave blank for defaults

= array();

$cfg['Servers'][$i]['AllowNoPassword'] // Allow logins without a pa ssword. Do not change the FALSE

= FALSE; // default unless you're run ning a passwordless MysqL server

$cfg['Servers'][$i]['designer_coords'] // Leave blank (default) for no Designer support,otherwise

= ''; // set to suggested 'pma_des igner_coords' if really needed

$cfg['Servers'][$i]['bs_garbage_threshold'] // Blobstreaming: Recommente d default value from upstream

= 50; // DEFAULT: '50'

$cfg['Servers'][$i]['bs_repository_threshold'] // Blobstreaming: Recommente d default value from upstream

= '32M'; // DEFAULT: '32M'

$cfg['Servers'][$i]['bs_temp_blob_timeout'] // Blobstreaming: Recommente d default value from upstream

= 600; // DEFAULT: '600'

$cfg['Servers'][$i]['bs_temp_log_threshold'] // Blobstreaming: Recommente d default value from upstream

= '32M'; // DEFAULT: '32M'

/*

* End of servers configuration

*/

/*

* Directories for saving/loading files from server

*/

$cfg['UploadDir'] = '/var/lib/PHPMyAdmin/upload';

$cfg['SaveDir'] = '/var/lib/PHPMyAdmin/save';

/*

* Disable the default warning that is displayed on the DB Details Structure

* page if any of the required Tables for the relation features is not found

*/

$cfg['PmaNoRelation_DisableWarning'] = TRUE;

?>

我在两台服务器上都使用Fedora 20.有任何想法吗?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值