簡體   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