PDA

View Full Version : Giving remote access to MySQL to a 3rd party



ochado
09-26-2008, 07:46 PM
Hi,

I've installed a test database (an exact copy of my original database) so that the programmer I hired could do his modifications without touching my main database.

I've added his IP to the remote list and it's been whitelisted too.
I've given him the information about the database (hostname, db name, db username & password).

I don't want him to give him my cpanel information to access myphpAdmin and I'm pretty new at all this so I don't know how to proceed... Is there another way for him to access phpmyAdmin remotely and having access only to the test database? What are the steps?

Thanks :),

ochado

hollenback
09-26-2008, 08:51 PM
They can access phpMyAdmin without going through cpanel. First you can open phpMyAdmin then copy the address. Mine is at http://IPAddress:2082/3rdparty/phpMyAdmin/index.php.
Give him this address and when it opens it will ask for a username and password.

Bill

ochado
09-26-2008, 09:08 PM
But... won't I have to give him my cpanel username and password for that to work?

Or do I just give the database username and password instead?:confused:

Thanks for your help!

ochado

ochado
09-28-2008, 03:34 PM
Has anybody else been in this situation? What info did you give to let them access your phpMyadmin? :confused:

all comments are greatly appreciated!

ochado

n2rga
09-28-2008, 08:28 PM
Has anybody else been in this situation? What info did you give to let them access your phpMyadmin? :confused:

all comments are greatly appreciated!

ochado

I have and I changed the password to everything after the programmer was finished with his work.

If you are comfortable with the programmer working with your files and database why not with your cpanel passwords it can be changed after the programmer is done.
Also if you got the programmer from a bid site for programmers then read there reviews from other work they have done.


MAKE SURE YOU BACK UP THE FULL SITE BEFORE DOING ANYTHING WITH THE PROGRAMMER AS FAR AS WITH PASSWORDS.

you can do this in cpanel

gatekeeper
09-29-2008, 04:11 PM
Has anybody else been in this situation? What info did you give to let them access your phpMyadmin? :confused:

all comments are greatly appreciated!

ochado

If you already granted access in your mysql remote administration and added the IP of the connecting party (your programmer's host), he should be able to connect to your database (via his application/program). But if he needs to do more than just connecting like database administration remotely, you might consider installing an phpMyAdmin client in your server's doc root which can be accessed publicly e.g. http://serverdomain.com/phpMyAdmin/ ... If you go that route, you may need to secure access to it (read Documentation.txt that goes with the phpMyAdmin installer or see the link provided below), so that if anybody accessed http://serverdomain.com/phpMyAdmin/, they will be prompted with a user/password. The user/password here is the db user/password you created specific for your programmer, so he has limited access only to that specific database (and not see/modify other databases).

Useful Resources
PhpMyAdmin Download Site: http://www.phpmyadmin.net/home_page/downloads.php
PhpMyAdmin Documentation: http://www.phpmyadmin.net/documentation/

regards.

--gatekeeper (net.gatekeeper@gmail.com) ;)

charlesp
09-29-2008, 10:16 PM
Not that it is usable information but I had a site owner grant me full access to his two sites and the last time I checked the access was still active. I can't remember the pw but I have it configured in Dreamweaver so when I test the connection it connects. :D

ochado
09-30-2008, 11:43 AM
Thank you all for your suggestions! :)

I followed Gatekeeper's idea and installed phpMyAdmin in a subfolder www.serverdomain.ca/store/myad

However, I hit another snag; I wrote the test database username and password in the config file with a config authorization scenario. But, when I tested it I got an error message that said the information was incorrect and to make sure I had the right login - the cpanel login worked, but then I could access all the databases. Then I tried with the cookie authorization and I still had to input my cpanel username and password for it to work.

Am I missing something?

ochado

gatekeeper
10-01-2008, 03:06 PM
Thank you all for your suggestions! :)

I followed Gatekeeper's idea and installed phpMyAdmin in a subfolder www.serverdomain.ca/store/myad

However, I hit another snag; I wrote the test database username and password in the config file with a config authorization scenario. But, when I tested it I got an error message that said the information was incorrect and to make sure I had the right login - the cpanel login worked, but then I could access all the databases. Then I tried with the cookie authorization and I still had to input my cpanel username and password for it to work.

Am I missing something?

ochado

You only need to rename "config.sample.inc.php" to "config.inc.php" ... edit one of the lines that says ...

$cfg['blowfish_secret'] = ''; // use here a value of your choice

... and put some value like so "ba17c1ec07d65003" ...
... I've used an cookie authentication scheme, so I didn't have to add or change anything other than the blowfish secret above.

$cfg['Servers'][$i]['auth_type'] = 'cookie'; // should be set

... you don't need to put in other credentials if you'll be using cookie authentication.

Now, after that save your config and test. Using the test database user/password you created. You should be able to login successfully. Make sure you've granted appropriate privileges for the test user (in your cpanel's mysql databases section) so your programmer can "create/alter tables" (or just check All privileges) when he wants to, otherwise he is limited to doing selects/inserts.

You can also login using your cpanel user/password.

regards.

timekeeper

ochado
10-03-2008, 06:06 PM
Thank you Thank you Thank you! :)

It finally worked! Actually it was working before but the login window was appearing twice so I thought that it didn't take the info I was giving it; I don't understand why it does that but I have a feeling it has to do with the attribution of a token for the session so phpMyAdmin seems to "refresh" with the token abd asks again to enter the login.

After the second time it worked and I could see the test database only! I'm so glad!

Thanks again for you help :)

ochado