[英]Install phpMyAdmin in Cloud Foundry
Is it possible to install phpMaAdmin in Cloud Foundry without MySQL/MariaDB Service?是否可以在没有 MySQL/MariaDB 服务的情况下在 Cloud Foundry 中安装 phpMaAdmin? I want to connect from CF phpMyAdmin to a remote MariaDB.我想从 CF phpMyAdmin 连接到远程 MariaDB。 I use the PHP-Buildpack in CF.我在 CF 中使用 PHP-Buildpack。
Yes.是的。
Follow the instructions from this sample .按照此示例中的说明进行操作。
Instead of running cf create-service
for step #2, run cf cups
.不为步骤 #2 运行cf create-service
,而是运行cf cups
。 This will create a user-provided service, which allows you to manually populate the service info.这将创建一个用户提供的服务,允许您手动填充服务信息。
Make sure that the name of your user-provided service contains the string "mysql", this is a trigger for the code added to the sample to configure your service .确保您的用户提供的服务的名称包含字符串“mysql”,这是添加到示例中以配置您的服务的代码的触发器。 The full name is going to be populated as the description of the server in PHP MyAdmin.全名将填充为 PHP MyAdmin 中的服务器描述。
Your user-provided service needs to have the following properties, which should reference your external server.您的用户提供的服务需要具有以下属性,这些属性应该引用您的外部服务器。
Ex: cf create-user-provided-service mysql -p "hostname, port"
(the command will prompt you for the hostname and port)例如: cf create-user-provided-service mysql -p "hostname, port"
(该命令将提示您输入主机名和端口)
Then complete the rest of the instructions as documented.然后按照文档中的说明完成 rest。
Thank you Daniel.谢谢丹尼尔。 It works.有用。
I tried another way too.我也尝试了另一种方法。 I dowloaded the actually Version of phpMyAdmin here我在这里下载了 phpMyAdmin 的实际版本
And configured the config.inc.php File like this:并像这样配置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
After that i pushed it to CloudFoundry into my Space using php_buildpack之后,我使用php_buildpack将它推送到 CloudFoundry 到我的空间中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.