繁体   English   中英

在 Cloud Foundry 中安装 phpMyAdmin

[英]Install phpMyAdmin in Cloud Foundry

是否可以在没有 MySQL/MariaDB 服务的情况下在 Cloud Foundry 中安装 phpMaAdmin? 我想从 CF phpMyAdmin 连接到远程 MariaDB。 我在 CF 中使用 PHP-Buildpack。

是的。

按照此示例中的说明进行操作。

不为步骤 #2 运行cf create-service ,而是运行cf cups 这将创建一个用户提供的服务,允许您手动填充服务信息。

确保您的用户提供的服务的名称包含字符串“mysql”,这是添加到示例中以配置您的服务的代码的触发器。 全名将填充为 PHP MyAdmin 中的服务器描述。

您的用户提供的服务需要具有以下属性,这些属性应该引用您的外部服务器。

  • 主机名
  • 港口

例如: cf create-user-provided-service mysql -p "hostname, port" (该命令将提示您输入主机名和端口)

然后按照文档中的说明完成 rest。

谢谢丹尼尔。 有用。

我也尝试了另一种方法。 我在这里下载了 phpMyAdmin 的实际版本

并像这样配置config.inc.php文件:

/* Authentication type and info */
$cfg['Servers'][$i]['verbose'] = 'MariaDB-DEV';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'xx.xx.xx.xx';            //* IP of your MariaDB
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['port'] = 'xxx';                    //* Port of your MariaDB

之后,我使用php_buildpack将它推送到 CloudFoundry 到我的空间中

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM