You are here: Re: User Access to MySQL Database « PHP Programming Language « IT news, forums, messages
Re: User Access to MySQL Database

Posted by Paul Lautman on 06/02/06 18:12

Tim wrote:
> Bob Sanderson wrote:
>> I have created a MySQL database for my company which is accessed by
>> PHP pages. I would like to permit some users to edit the records but
>> allow others read-only access. However, I don't want to have to
>> enter a password every time I want to edit a record. Is there a way
>> to use our network login to do this? If not, what is the easiest way
>> to accomplish this? The database is running on our server and is not
>> accessible via the net.
>>
>> Any help will be greatly appreciated.
>
> This is one way to do it
>
> In mysql use CREATE USER and GRANT to set up a user account with read
> only permissions, you probably have a user account with full
> permissions to use but you may want to setup another user account with
> limited write permissions to give to others.
>
> In the php script call a system command to get the login name of the
> current user. On *nix systems its 'whoami', on windows I think its
> whoami.exe but don't quote me on that..

But wouldn't the whoami run on the server, whilst the user is logged on to
the client?

 

Navigation:

[Reply to this 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

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