Is it possible to install phpMaAdmin in Cloud Foundry without MySQL/MariaDB Service? I want to connect from CF phpMyAdmin to a remote MariaDB. I use the PHP-Buildpack in CF.
Yes.
Follow the instructions from this sample .
Instead of running cf create-service
for step #2, run 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 . The full name is going to be populated as the description of the server in 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)
Then complete the rest of the instructions as documented.
Thank you Daniel. It works.
I tried another way too. I dowloaded the actually Version of phpMyAdmin here
And configured the config.inc.php File like this:
/* 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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.