Question

How to install phpmyadmin that connects remote to managed db cluster

I am having trouble to install, and therefore connect, a phpmyadmin in a Ubuntu 18 droplet, to my managed mysql db cluster.

Somehow during phpmyadmin installation, through instructions given in this DO tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-18-04

I cannot finish installation. Its some trouble with mysql users

I have tried everything, also using command: dpkg-reconfigure phpmyadmin

It always fail because some error from mysql rejecting the user and password.

I am creating two new users under DO control panel, using instructions given in: https://www.digitalocean.com/docs/databases/mysql/how-to/modify-user-privileges/

Therefore I have created a new database for phpmyadmin, created one user with all privieleges and grant option (as superadmin for that database), and a second user with all privileges (as a user for that database), but always ends failing the installation.

Both users can access mysql through command line from ssh from the Ubuntu 18 droplet, which means I am missing something in the config file for phpmyadmin, but dont know what


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi,

Our below community article can guide you in setting up and connecting to MySQL Managed database via phpMyAdmin with SSL.

https://www.digitalocean.com/community/tutorials/how-to-connect-to-mysql-managed-database-via-phpmyadmin

I hope this helps!

Regards, Rajkishore

Hi, thanks for your help.

Server A has Ubuntu 18, and I did the apt update in order to install phpmyadmin.

Server B is DO managed DB cluster, running mysql.

Through ssh from Server A terminal, I am able to access Server B databases with the new useres I have created through DO managed DB control panel.

But, when running dpkg-reconfigure phpmyadmin, using TCP/IP connection, the following error shows up when starting installation under Apache2 option:

An error occurred while installing the database: │ │ │ │ mysql said: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the │ │ manual that corresponds to your MySQL server version for the right syntax to use near │ │ ‘IDENTIFIED BY ‘testpassword’’ at line 1 .

where testpassword, is the password asked by installer for the phpmyadmin user, not the root user

Thanks

Hello, @guidomazzanti

Could you please let me know which is the exact error you’re receiving when installing phpMyAdmin?

You can make sure that you system is up to date first by running:

sudo apt update

Looking forward to hearing from you.

Regards, Alex