PDA

View Full Version : Help with non-OPS phpmyadmin db access


jshireync
5-27-09, 06:55 PM
I have a Wordpress database installed and working. I can manage from OPS - mysqladmin just fine. But I have another blog admin to whom I wish to give admin rights to the database, so he can play around. I figured I might install phpmyadmin in that domain, so he could only touch the one database.

no dice.

Any advice?

I've installed phpmyadmin in a subdirectory. The program is working OK. I ran setup and put in the
servername myname.mysqlpowweb.com
tcp connection
default port
default socket (not used, right?)
cookie authentication

I get the login screen, but pma comes back and says "#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)"

I could write a quick php script to check db connections, but I figure my Wordpress setup is already proving that this is working, yes? no need. I'm using same login id/pw that I have in the wp-config file.

Appreciate thoughts. Is this even doable at powweb? Do they detect phpmyadmin connections and disallow them, except through the mysqladmin path? if so, boo!!:confused:

snowmaker
5-27-09, 07:23 PM
Is the domain hosted on Powweb? Connecting to the MySQL database remotely (http://www.powweb.com/knowledgebase/read_article.bml?kbid=1154)

Perhaps this helps instead.. Configuring: Connecting to a MySQL database using a language of your choice - Perl, PHP, or Python (http://www.powweb.com/knowledgebase/read_article.bml?kbid=7499)

YvetteKuhns
5-27-09, 09:22 PM
Dbrazzell from PowWeb staff has offered to install phpmyadmin on an account for another PowWeb member. If you private message him, he may do it for you. I haven't tried to install it on PowWeb but we recently had to do this on another web host that didn't offer phpmyadmin for database administration for customers. I couldn't believe it!

jshireync
5-28-09, 08:28 AM
Yes, all is on powweb - I have multiple domains. I had of course read the first link "connecting ... remotely" and hoped that it was a lie.

The second link is new information for me, and indeed is it not part of the "beta" mysql management configuration that's just now coming on-line? I believe this may do the trick for me. I will try it today or tonight when I have some time. Thanks for the pointer.

jshireync
5-28-09, 08:32 AM
I don't think that's going to do it. I know how to connect to the database. Been doing that for years. What I need/want is to ADMINISTER the database by someone who is not root in OPS - I don't want to give him OPS access, which is the only path I can find to date to phpmyadmin.

I was hoping I could install and run pma with a hard-wired connector to a single db - in other words, wrap PMA around the code snippet that is created for me!

So, I'm still looking.

YvetteKuhns
5-28-09, 10:15 AM
What I need/want is to ADMINISTER the database by someone who is not root in OPS - I don't want to give him OPS access, which is the only path I can find to date to phpmyadmin.

Installing PhpMyAdmin (http://www.installationwiki.org/Installing_PhpMyAdmin) has some information. When we did it on another host, the client only had one website, but it is possible to create an account that only has access to one database just as the web host does for us. The client can go to http://herdomainname.com/phpmyadmin to access her own database or I can manage it as I would in OPS here on PowWeb.

jshireync
5-28-09, 10:21 AM
Again - this looks promising, and I'll have time later today to read and follow the installation instructions carefully. Thanks for the pointer!

YvetteKuhns
5-28-09, 10:41 AM
I am fairly certain that it is possible to install phpmyadmin on your web host account as you describe. I didn't try it here, but I understand your reason for wanting to do it. Good luck with it. Please post updates here and don't be afraid to ask Dbrazzell for help.

Maybe someone can post a tutorial in the knowledge base. If you search Google for install phpmyadmin linux web host, you can find some information. We are not allowed to post links to other web hosts, but I can tell you what I searched to find them. PowWeb has a Linux/Debian/Apache environment.

Dbrazzell
5-28-09, 10:52 AM
Right. I have previously installed phpmyadmin in the hosting account of a customer before. It should be possible still. Just a little trial and error and following the installation instructions in the phpmyadmin wiki were all that I needed.

YvetteKuhns
5-28-09, 10:59 AM
There you are, Dbrazzell! Nice to have a helpful staff member who can testify that this is possible here. When people mess up with the installation, they know who to blame! :D

jshireync
5-28-09, 03:09 PM
Oh, the favorite words ever to escape my lips are , "But that's what the guy told me to do!":p

YvetteKuhns
5-28-09, 04:48 PM
Oh, the favorite words ever to escape my lips are , "But that's what the guy told me to do!"

My son says things like that. He seems to misquote his teachers, though. :D

jshireync
5-29-09, 12:38 AM
Well, I've got it working, and after all the failed attempts, it's almost anti-climactic.

The key lies in http://www.installationwiki.org/Installing_PhpMyAdmin, but it's sorta buried. I installed phpmyadmin in a subdirectory of my site - /mysql-admin. Then I ran the setup utility (@ /mysql-admin/setup). It creates the config.inc.php file, asking a bunch of questions that I really didn't know the answers to, just guessing.

Never mind that, but the setup script puts the config.inc.php file in the /mysql-admin/config subdirectory. But phpmyadmin is looking for it in its document root, in my case /mysql-admin. Moving it up to this directory, and bingo! It started working.

Here are the parameters that matter:

/* Server: myaccount.powwebmysql.com [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'myaccount.powwebmysql.com';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';

/* End of servers configuration */

It's cool because it works just like powweb's phpmyadmin - whatever login name you give it, it makes all databases for which that login has privileges accessible. Now I can let my colleague have db access.

Again, the key (besides getting the connection parameters right) is to have config.inc.php in the same directory as phpmyadmin's index.php file, not in the /config/ subdirectory.

Thanks for everyone's help!

YvetteKuhns
5-29-09, 10:22 AM
Again, the key (besides getting the connection parameters right) is to have config.inc.php in the same directory as phpmyadmin's index.php file, not in the /config/ subdirectory.

:D Nice job! Isn't it cool when you started out not knowing something and now you know it and can share that info with others?! :cool:

entrecon
5-29-09, 12:39 PM
Where are all the rep points for this post? jshireync was nice enough to post back a great answer, he deserves some credit!

YvetteKuhns
5-29-09, 01:24 PM
Maybe no one else read this thread or was interested in trying this yet. I'll give that rep a boost.