Reply to Re: Allow friend to access MySQL db from my host

Your name:

Reply:


Posted by J.O. Aho on 05/31/06 15:53

Frankly wrote:
> dont mind me. I am a total newbie to this.
> I thought sharing databases was a pretty easy thing to do.

It depends much on how you share it, say phpMySQLAdmin would allow people to
access ones database as long as they do have the login and password.

Direct access to a mysql server depends on how the grant command was used

GRANT ALL ON *.* TO 'evilbill'@'localhost' IDENTIFIED BY 'mypass';
This allows user evilbill to login with the password mypass as long as he does
this from the same computer as the database is running on.
This is how the grant is used on webhotels, to only allow access to the
database from the webserver.

GRANT ALL ON *.* TO 'evilbill'@'example.net' IDENTIFIED BY 'mypass';
This would allow user evilbill to login with the password mypass as long as he
does this from the computer with the ip-name example.net.

If you want to allow one user to access the database from two different
places, say from localhost and example.net, then you issue both the GRANT
statements.
GRANT ALL ON *.* TO 'evilbill'@'localhost' IDENTIFIED BY 'mypass';
GRANT ALL ON *.* TO 'evilbill'@'example.net' IDENTIFIED BY 'mypass';


> I am surprised that you couldnt just create the database for him and let him
> populate it.

The OP has a database on a webhotel, a webhotel allows only access from the
webserver to the sql-server, so they have issued

GRANT ALTER, CREATE, DELETE, DROP, INDEX, INSERT, SELECT, UPDATE ON
userdatabase.* TO 'evilbill'@'localhost' IDENTIFIED BY 'mypass';

this limits the things the user can do with the database, which would prevent
them from giving access for someone else from a remote location, which would
be needed for the OPs friend.


> I was thinking that my wife would be able to access the complete database
> from her moble device.

This will be possible, but I think she wants a frontend that is easy to use
for her (easier than phpMySQLAdmin) and as the frontend will be a number of
php pages, the webserver will access the page and you don't need to GRANT for
anyone remotely on your MySQL.



//Aho

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация