Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not connect to remote server without manual modification in codebase #14065

Closed
mirzazeyrek opened this issue Mar 7, 2018 · 3 comments
Closed
Assignees
Labels

Comments

@mirzazeyrek
Copy link

@mirzazeyrek mirzazeyrek commented Mar 7, 2018

Steps to reproduce

  1. Install phpmyadmin via latest release.zip file on a server without mysql-server and mysql-client package installations -> /var/www/html/dev.yourdomain.com/phpmyadmin

  2. Create a config.inc.php points a remote host:

<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 4.7.9 setup script
 * Date: Wed, 07 Mar 2018 08:09:19 +0000
 */
/* Servers configuration */
$i = 0;

/* Server: dev-staging [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'dev-staging';
$cfg['Servers'][$i]['host'] = '192.168.100.100';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['compress'] = true;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'dev_user';
$cfg['Servers'][$i]['password'] = 'yourpass';

/* End of servers configuration */
$cfg['Server']['user'] = 'dev_user'
$cfg['Server']['password'] = 'yourpass';
$cfg['Server']['host'] = '192.168.100.100';
$cfg['Server']['controlhost'] = '192.168.100.100';

$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['ServerDefault'] = 1;
$cfg['blowfish_secret'] = 'z{<F1!k=CjIVTpg)^wJq;StO?sL{F-^E';
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['connect_type'] = 'tcp';
  1. Go to dev.yourdomain.com/phpmyadmin and try to login with remote mysql user and pass.

Expected behaviour

Login should work.

Actual behaviour

Getting an mysql socket error. But it works without any issues after adding this line $cfg['Server']['host'] = '192.168.100.100'; into getConnectionParams method in libraries/DatabaseInterface.php file.

image

Server configuration

Operating system: Ubuntu

Web server: nginx

Database: mysql

PHP version: 7.2

phpMyAdmin version: latest stable

Client configuration

Browser: chrome

Operating system: mac os high sierra

@nijel
Copy link
Contributor

@nijel nijel commented Mar 9, 2018

Are you sure the configuration you've posted here is actually used? The auth_type = config should not ask for credentials, your setup rather uses cookie auth, what might indicate that your configuration is not being used...

@nijel nijel self-assigned this Mar 9, 2018
@nijel nijel added the question label Mar 9, 2018
@mirzazeyrek
Copy link
Author

@mirzazeyrek mirzazeyrek commented Mar 9, 2018

🤦‍♂️ yes turns out it was a permission issue. Previously www-data:user was working for wp installation on the same server but looks like user:user must be used for phpmyadmin installation 🤔

after you mentioned auth type config setting, finally realized blowfish notification even it's already set in config file .

thank you for pointing out right direction @nijel

@mirzazeyrek mirzazeyrek closed this Mar 9, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants