FreeBSD下FAMP5.1.0与远程数据库连接(3)

内容如下:
?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki .
*
* @version $Id: config.sample.inc.php 12304 2009-03-24 12:56:58Z nijel $
*/

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ‘cookies’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! *

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$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’;

/* rajk – for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = ‘32M’;
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = ‘32M’;

/* User for advanced features */
//$cfg['Servers'][$i]['controluser'] = ’sherry’;
//$cfg['Servers'][$i]['controlpass'] = ‘891028′;
/* 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’;
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = ‘/etc/swekey-pma.conf’;

/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = ”;
$cfg['SaveDir'] = ”;

?>
把上面的localhost改成你的数据库服务器IP地址就行了。
现在我们就可以用phpMyAdmin打开你的数据库了。
在浏览器地址栏输入你装famp5.1.0的服务器地址加端口号8888和phpMyAdmin的目录phpMyAdmin,即:
你的IP地址:8888/phpMyAdmin/
现在到了数据库的登录界面,输入刚才建立的sherry用户名与密码进入数据库管理界面,然后导入刚才导出的famp数据库,导入成功后就可以使用famp5.1.0了。
在浏览器地址栏输入你装famp5.1.0的服务器地址加端口号8888,即:
你的IP地址:8888/
现在就可以使用famp了,里面的数据库连接也可以使用。
至此,让famp5.1.0与远程数据库连接就做好了。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyjgxw.html