Notifications
Clear all

Setup - Issue installing phpMyAdmin following guide

(@skymeson)
Active Member Registered

The issue I'm having is setting up the phpmyadmin. I followed the instructions for "Combu Online Sever Tutorial" for aws setup from the forum. Instructions are very clear until I get to the phpmyadmin section. I am getting an error when setting it up regarding password. I've purged install and tried a few times with few different passwords and always get the same message. Any ideas what could be going wrong?

 

* EDITED BY THE STAFF FOR SECURITY REASON *

ReplyQuote
Topic starter Posted : 12/01/2021 9:47 am
Topic Tags
(@skaredcreations)
Prominent Member Admin

I don't know what are the default policy requirements for the password but I use this link to generate quite strong random 18-length passwords (if the requirements ask also for a special character then I add a @ ! # or another character at beginning or end of the generated string): RANDOM.ORG - Password Generator

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 12/01/2021 10:41 am
(@skymeson)
Active Member Registered

I was able to get past that screen by changing my password settings to low. 

mysql> SET GLOBAL validate_password.policy=LOW;

But I still don't see my phpMyAdmin page.

http://<YourPublicDNS>/phpMyAdmin

gives me a 404

I've tried restarting apache.

sudo service apache2 restart

 

http://<YourPublicDNS>/combu/

and

http://<YourPublicDNS>/combu/_setup/

Are both working. 

So I'm just stuck at the last stage, trying to get phpMyAdmin working. 

 

ReplyQuote
Topic starter Posted : 12/01/2021 10:53 am
(@skymeson)
Active Member Registered

I was able to follow a different tutorial and get the phpMyAdmin working. 

 

I'm now on the step of creating the database. But I run into 'Access denied' error. 

 

I've attached a screenshot below. Most likely there is an issue with username and password. I generated a secure password, so I'm not sure why it is not working. I'm able to log into mysql just fine with my password. 

 

https://drive.google.com/file/d/1GAh2gR-F8Iz36ZTUn43lqBZlJQZFy5of/view?usp=sharing

 

ReplyQuote
Topic starter Posted : 13/01/2021 6:01 am
(@skaredcreations)
Prominent Member Admin

That's because you accessed with a user (phpmyadmin) that apparently has no access permission to the combu database, you should login to phpMyAdmin with the same user that you have specified in Combu config.php

If you have used the user root in config.php then I would say that is a bad practice for security reasons, you should create a MySql user specific for Combu.

Here is the command to create for example a user named 'usr_combu' (I assume that your Combu database is named 'combu'), you can run it in your mysql console:

GRANT ALL PRIVILEGES ON combu.* TO 'usr_combu'@'localhost' IDENTIFIED BY 'replace_this_with_a_password';

Of course you have to replace replace_this_with_a_password with a random strong password, then you should be able to access with this new user in phpMyAdmin and replace username/password in your Combu config.php

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 13/01/2021 11:33 am
(@skymeson)
Active Member Registered

@skaredcreations

 

When I try that command I get the following message.

GRANT ALL PRIVILEGES ON combu.* TO 'usr_combu'@'localhost' IDENTIFIED BY 'replace_this_with_a_password';
ERROR 1064 (42000): 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 'replace_this_with_a_password'' at line 1

 

mysql version is 

sudo mysql -V
mysql Ver 8.0.22-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))

 

Next I tried completely reinstalling mysql

sudo apt-get remove --purge mysql*
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql
sudo apt-get dist-upgrade
sudo apt-get install mysql-server -y
sudo mysql_secure_installation

 

However, I still see my old databases in there, before I've done anything. 

 

mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| combu |
| information_schema |
| mysql |
| performance_schema |
| sys |
| usr_combu |
+--------------------+

 

* I see a database called usr_combu. I don't recall creating that, but perhaps I did on accident. Maybe that is creating issues? 

 

The next thing I tried, after some google searching, 

 

service mysql restart

 

==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'mysql.service'.
Authenticating as: Ubuntu (ubuntu)
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to restart mysql.service: Access denied

 

So mysql password does not work to restart mysql? 

sudo vim /etc/mysql/debian.cnf

[client]
host = localhost
user = debian-sys-maint
password = ****************
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password =
*******
socket = /var/run/mysqld/mysqld.sock

 

The password listed in debian.cnf is totally different from what was set in mysql, so perhaps that's why I can't restart? 

 

I'm total newbie at mysql. 

 

I'm not able to finish the phpmyadmin setup until I have the mysql stuff figured out. 

 

Not sure what I'm missing? 

 

Are there any tutorials on this? The guide pinned on this forum fails me on the phpmyadmin stage. 

 

ReplyQuote
Topic starter Posted : 14/01/2021 12:10 pm
(@skaredcreations)
Prominent Member Admin

Linux root's password is required to execute system commands (like 'service *** restart'), mysql password is only to access the database. Anyway we will schedule a chat on Discord/Skype/Google Chat to help you configuring the server (N.B.: the Linux-Windows-AnyOtherOS and Mysql installation and configuration are not covered in Combu tutorials because that's not part of the product itself).

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 14/01/2021 12:50 pm
(@skymeson)
Active Member Registered

Thanks for the help! 🙂

As a follow up, I just wanted to post the tutorial I used to get phpmyadmin working with mysql. I think the issue for me was the guide on the forum was written for an older version of ubuntu, and I was getting errors with permissions. 

This is the guide I used for Ubuntu 20.04 and it worked perfectly! 🙂

https://www.rosehosting.com/blog/how-to-install-phpmyadmin-on-ubuntu-20-04/

 

Very excited to have user accounts creation in Unity! 

Thanks again!

 

ReplyQuote
Topic starter Posted : 14/01/2021 2:33 pm
Share: