Help - Search - Members - Calendar
Full Version: HOWTO: Access phpMyAdmin without control panel -- IT WORKS!
The Planet Forums > Control Panels > Plesk > Plesk HOWTOs
nasos
Just leased a Plesk 7.5 Server and I'm very happy with my choice. It seems like a Ferrari to me in comparison with my old dedicated server in another provider. icon_smile.gif

It's running for a couple of days now, and I'm still testing its capabilities; I'm really impressed. While trying to setup a few domains to check how it works in "real-life", I had some problems. One of them was to setup my own DNS (ns1.mydomain.gr and ns2.mydomain.gr) and to have them work smoothly. Thanx to this forum, I managed to make it in a few minutes.

I found (thanx to this forum again) phpMyAdmin in my control panel, but I think you already know that this is not what we want. I was used to work with my previous dedicated server at phpMyAdmin as a root user, and you can imagine my disappointment. My disappointment grew bigger as I was browsing this forum, trying to find a way to run my own phpMyAdmin (www.mydomain.gr/phpMyAdmin), login as a root user, and also allow my clients to run it through their own domains without logging on to the control panel. As far as I searched the forum, I didn't find any help but I saw that a lot of people had the same problem. After a couple of hours of reading and searching, I finally made it and it works great! I'm sorry with the long prologue, but here are the steps:

1. Install your favourite distribution of phpMyAdmin in a directory you like. I installed mine at /usr/share/phpMyAdmin.
2. The privileges for the directory will be 755 with root user and group.
3. Go to /etc/httpd/conf.d directory and create a file with the name phpMyAdmin.conf (anything with the .conf extension will be parsed by Apache) and write a simple command: Alias /phpMyAdmin /usr/share/phpMyAdmin
4. Go to the directory you installed phpMyAdmin (/usr/share/phpMyAdmin), edit the config.inc.php file, and you are ready.
5. $cfg['Servers'][$i]['controluser'] and $cfg['Servers'][$i]['controlpass'] can be blank.
6. You or anybody can now login from ANY of your domains to phpMyAdmin, either as the root mySQL user (username: admin, password: the one you entered when you bought the server), or the specific user with priviledges only to his own databases, entering: www..com/phpMyAdmin

That's all!
mikeq
Excellent nasos, I was just searching on how to do this today.

couple of things I had to edit in config.inc.php to get it to work

$cfg['Servers'][$i]['auth_type'] = 'cookie';
had to set to cookie rather than config

$cfg['blowfish_secret'] = 'justtypedabunchofrandomcharactersinhere';

$cfg['PmaAbsoluteUri_DisableWarning'] = TRUE;
as the comment in the file says, do a test first

* $cfg['PmaAbsoluteUri'] = '';
* In most cases you can leave this variable empty, as the correct value
* will be detected automatically. However, we recommend that you do
* test to see that the auto-detection code works in your system. A good
* test is to browse a table, then edit a row and save it. There will be
* an error message if phpMyAdmin cannot auto-detect the correct value.
*
* If the auto-detection code does work properly, you can set to TRUE the
* $cfg['PmaAbsoluteUri_DisableWarning'] variable.
*/

Once this was changed I then had to restart the httpd service

# service httpd restart
londo
I thought it worth pointing back to this old thread to make sure phpmyadmin always runs under https...

http://forum.ev1servers.net/showthread.php?t=21077

there are a couple of methods there.

adding this at the top of index.php works for me:

// redirection to SSL added
if($HTTP_SERVER_VARS["HTTPS"] != "on") {
$newurl = "https://" . gethostbyname($_SERVER["SERVER_NAME"]) . $_SERVER["REQUEST_URI"];
header("location: $newurl");
}
Miss-NewYork
I have my virtual dedicated server for about five days, and I didn't even know what SSH is rolleyes.gif This forum has helped me so much - I was able to turn off safe_mode and install ImageMagick all by myself, which I am so proud of icon_razz.gif

As I have to get used to Plesk now, which I think is quite different from cPanel, I really wanna have my old phpMyAdmin back.
I followed all your above instructions precisely, but all I get is a 404 when I try to access /phpMyAdmin through one of my domains...

I will be using the server alone, so no one else will have access to anything. I was wondering if it is possible to install phpMyAdmin to any of the domains and just work from there ?!?
Also, why do I have to create new users for every database I create??? And they can't even have the same name... Is it possible to create a universal user, which I can use for all databases?

Thanks!
speritoffire
:confused: :confused:
I'm use Plesk for windows 7.5.3 Help me to use Phpmyadmin without Plesk
I want to use phpmyadmin on web

help me plese ?????
nasos
Wrong topic, sorry...icon_smile.gif
dave_lu
QUOTE (nasos @ May 31 2005, 03:26 PM) *
Just leased a Plesk 7.5 Server and I'm very happy with my choice. It seems like a Ferrari to me in comparison with my old dedicated server in another provider. icon_smile.gif

It's running for a couple of days now, and I'm still testing its capabilities; I'm really impressed. While trying to setup a few domains to check how it works in "real-life", I had some problems. One of them was to setup my own DNS (ns1.mydomain.gr and ns2.mydomain.gr) and to have them work smoothly. Thanx to this forum, I managed to make it in a few minutes.

I found (thanx to this forum again) phpMyAdmin in my control panel, but I think you already know that this is not what we want. I was used to work with my previous dedicated server at phpMyAdmin as a root user, and you can imagine my disappointment. My disappointment grew bigger as I was browsing this forum, trying to find a way to run my own phpMyAdmin (www.mydomain.gr/phpMyAdmin), login as a root user, and also allow my clients to run it through their own domains without logging on to the control panel. As far as I searched the forum, I didn't find any help but I saw that a lot of people had the same problem. After a couple of hours of reading and searching, I finally made it and it works great! I'm sorry with the long prologue, but here are the steps:

1. Install your favourite distribution of phpMyAdmin in a directory you like. I installed mine at /usr/share/phpMyAdmin.
2. The privileges for the directory will be 755 with root user and group.
3. Go to /etc/httpd/conf.d directory and create a file with the name phpMyAdmin.conf (anything with the .conf extension will be parsed by Apache) and write a simple command: Alias /phpMyAdmin /usr/share/phpMyAdmin
4. Go to the directory you installed phpMyAdmin (/usr/share/phpMyAdmin), edit the config.inc.php file, and you are ready.
5. $cfg['Servers'][$i]['controluser'] and $cfg['Servers'][$i]['controlpass'] can be blank.
6. You or anybody can now login from ANY of your domains to phpMyAdmin, either as the root mySQL user (username: admin, password: the one you entered when you bought the server), or the specific user with priviledges only to his own databases, entering: www.<any_domain_on_your_server>.com/phpMyAdmin

That's all!



hi..

i've bumped into this same problem as well.. but unfortunately i'm not ready for a dedicated server just yet. What i have on is a linux shared hosting package. usual stuff.. unlimited ftps,dbases,etc etc... but the real prob is when giving access to developers( but not root access of course) like above...

have been asking my hosting company, but they just keep telling me its not possible.. anyone have any ideas on how to make this work on a shared server?

thanks in advance,
Dave
Catalyst
On forcing SSL, you can just add "$cfg['ForceSSL'] = TRUE;" in config.inc.php ... Or if you wanna do it old-school without messing with PHP code, edit .htaccess:
CODE
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{SERVER_PORT} !443
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [NS,R,L]
...and it'll work brilliantly unless you've give PmaAbsoluteUri a value in config.inc.php --- it can be safely deleted with anything recent.

As for your problem, Dave, if you can't add MySQL users, you're kinda stuck.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.