2

I've been stuck on this for a while, and was hoping you could provide some insight into what I'm doing wrong.

I have a fresh amazon EC2 (Ubuntu 16.04) instance connected to an RDS (mysql) database, and am trying to install phpmyadmin on the amazon EC2 instance in order to administrate the RDS database.

What I'm having trouble with is how to configure phpmyadmin so that it doesn't install a local database, and instead simply connects to the RDS instance. (I selected no when asked if I wanted phpmyadmin to setup a db for me.)

First Attempt:

I've tried adding the following to my /etc/phpmyadmin/config.header.inc.php:

$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '*************';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

where ************* is the writer endpoint for my RDS instance.

However, doing so simply produces the following unusable login page: Borked Login Page

Second Attempt:

I also tried changing $dbserver in /etc/phpmyadmin/config-db.php to the writer endpoint for my RDS instance, which produced the following warnings on the login page:

Warning 1:

Notice in ./index.php#603
Use of undefined constant PMA_DRIZZLE - assumed 'PMA_DRIZZLE'

Backtrace

Warning 2:

Notice in ./libraries/DatabaseInterface.class.php#2665
Use of undefined constant PMA_DRIZZLE - assumed 'PMA_DRIZZLE'

Backtrace

./libraries/db_common.inc.php#24: PMA_DatabaseInterface->isSystemSchema(string '')
./db_structure.php#14: require_once(./libraries/db_common.inc.php)

Warning 3:

Notice in ./libraries/DatabaseInterface.class.php#2666
Use of undefined constant PMA_DRIZZLE - assumed 'PMA_DRIZZLE'

Backtrace

./libraries/db_common.inc.php#24: PMA_DatabaseInterface->isSystemSchema(string '')
./db_structure.php#14: require_once(./libraries/db_common.inc.php)

Warning 4:

Notice in ./libraries/DatabaseInterface.class.php#2667
Use of undefined constant PMA_DRIZZLE - assumed 'PMA_DRIZZLE'

Backtrace

./libraries/db_common.inc.php#24: PMA_DatabaseInterface->isSystemSchema(string '')
./db_structure.php#14: require_once(./libraries/db_common.inc.php)

Warning 5:

Notice in ./libraries/DatabaseInterface.class.php#2668
Use of undefined constant PMA_DRIZZLE - assumed 'PMA_DRIZZLE'

Backtrace

./libraries/db_common.inc.php#24: PMA_DatabaseInterface->isSystemSchema(string '')
./db_structure.php#14: require_once(./libraries/db_common.inc.php)

Ignoring these and attempting to login anyway, I get the following:

Error on Login Attempt:

#2002 - No such file or directory<br />The server is not responding (or the local server's socket is not correctly configured).

Is what I'm trying to do even possible, or is it an absolute requirement that phpmyadmin have a local database in order to function, even though the database I want to access is on a remote machine?

0

Make sure you run the phpmyadmin database SQL file on the remote host:

-- --------------------------------------------------------
-- SQL Commands to set up the pmadb as described in the documentation.
--
-- This file is meant for use with MySQL 5 and above!
--
-- This script expects the user pma to already be existing. If we would put a
-- line here to create him too many users might just use this script and end
-- up with having the same password for the controluser.
--
-- This user "pma" must be defined in config.inc.php (controluser/controlpass)
--
-- Please don't forget to set up the tablenames in config.inc.php
--

-- --------------------------------------------------------
[...]

See whole file:https://github.com/phpmyadmin/phpmyadmin/blob/master/sql/create_tables.sql

  • 1
    For those of you following at home, you will also need to create a phpmyadmin user that has access to the phpmyadmin database created by this script, as well as add this database and credentials to your config-db.php. You can find the instructions for doing so here: foundationphp.com/tutorials/pma_config.php – Justin Huffman Oct 28 '16 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.