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

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.

×
2 answers

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

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

Submit an Answer