Easy Hosting Control Panel (EHCP) :: Force Edition
EHCP Force Support => Technical Help => Topic started by: NukeSter on November 05, 2014, 11:12:26 am
-
After doing the most recent update root password no longer works in phpmyadmin could you please lookin to fixing this as i have gone to zpanel for till this problem can be fixed
-
After doing the most recent update root password no longer works in phpmyadmin could you please lookin to fixing this as i have gone to zpanel for till this problem can be fixed
This is a new security feature to make it harder for your server to be hacked. You need to whitelist your IP address by doing the following:
sudo -i
sed -i "s#^include_once 'rootip_whitelist_functions.php';#include_once '/usr/share/phpmyadmin/rootip_whitelist_functions.php';#g" "/etc/phpmyadmin/config.inc.php"
sed -i "s#^include 'rootip_whitelist.php';#include '/usr/share/phpmyadmin/rootip_whitelist.php';#g" "/etc/phpmyadmin/config.inc.php"
cd /usr/share/phpmyadmin/
nano rootip_whitelist.php
From the computer you are using to access PHPMyAdmin, browse to www.grabip.tk (http://www.grabip.tk) to get your IP address. Write it down.
Now, while editing the rootip_whitelist.php file, find the line of:
// IP Addresses that are allowed to login via the root MySQL account through PHPMyAdmin
$allowedIPs = array("127.0.0.1");
Add your IP address to the array. It should look something like this:
// IP Addresses that are allowed to login via the root MySQL account through PHPMyAdmin
$allowedIPs = array("127.0.0.1", "1.1.1.1");
In the example above, the IP address of 1.1.1.1 was used. Replace that value with the one you found from http://www.grabip.tk.
Save the file. You can now login as the root user from that machine.
In general, you should not login as the root user from an insecure connection. The root mysql user account is very important to keep secure.
To DISABLE this Feature Completely and Allow root Logins via PHPMyAdmin:
If you want to allow the MySQL root user to login via PHPMyAdmin, simply run the following command:
sudo sh -c "echo \"<?php \\\$cfg['Servers'][1]['AllowRoot'] = TRUE; ?>\" >/usr/share/phpmyadmin/rootip_whitelist.php"
If you DO NOT want the root user to login using PHPMyAdmin from any IP address, simply clear the file by running this command:
sudo sh -c ">/usr/share/phpmyadmin/rootip_whitelist.php"
Updates and upgrades will not overwrite the rootip_whitelist.php file even if it's empty.
-
Thank you very much for your response, I need to be able to access root so I can setup remote database for my game servers.
-
I updated my previous response with a command you can run to enable logging in as the root user in PHPMyAdmin.
-
worked perfectly thank you :)
-
Cool, thanks for letting me know that it worked.
-
I do not thing the above works anymore having issues with logging in now as root on a fresh install of EHCPforce
-
I do not thing the above works anymore having issues with logging in now as root on a fresh install of EHCPforce
Which version of Ubuntu? Did you run the script posted above?
What are the file contents of /usr/share/phpmyadmin/rootip_whitelist.php?
sudo cat /usr/share/phpmyadmin/rootip_whitelist.php
-
I can't log into MySQL root either after fresh install of Ubuntu 18.04 and EHCP Force (Latest) with or without unattended install.
I can log in to the database in terminal so the password is correct, i can create and delete databases withing EHCP Console
so it seams EHCP is set up correctly but what ever i do including instructions on this thread MySQL root can not be logged into.
I need to beable to log into root as some DB's i have need to be set up within root.
Another strange thing: If i set up a second root password... ie admin then i can log in to MySQL and do as i need BUT
then i can NOT create and delete databases withing EHCP Console.
Any assistance please, i really need to get on and build my databases back up to as they where.
-
I'll see if I can reproduce this issue on Ubuntu 18.04.
-
Fix has been implemented.
In addition to the commands in the first post, you need to run these as well if you're having problems:
sudo -i
sed -i "s#^include_once 'rootip_whitelist_functions.php';#include_once '/usr/share/phpmyadmin/rootip_whitelist_functions.php';#g" "/etc/phpmyadmin/config.inc.php"
sed -i "s#^include 'rootip_whitelist.php';#include '/usr/share/phpmyadmin/rootip_whitelist.php';#g" "/etc/phpmyadmin/config.inc.php"
https://github.com/earnolmartin/EHCP-Force-Edition/commit/7509e193cc16dbe9757739d16ec1465009230dd8
To have the fix implemented automatically via an update, follow these instructions:
http://ehcpforce.tk/download.php#svn-version under the "Update to Latest Code (Developer Version)"