From: Joel Nelson Date: June 5 2001 3:45pm Subject: Re: Connexion from one user profil List-Archive: http://lists.mysql.com/win32/6344 Message-Id: <004301c0edd6$8e730220$0101000a@cx228424a> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit ----- Original Message ----- > Hi people, > > It's for a web app. > My provider provides me only one user profil in the User table. I suppose > it's the super-user profil. That should be correct as a provider will usually only give you ONE user on only ONE database. > In order to permit a client to access the database with the right of select, > update, insert and delete for the front office (the real web site) and in > order to food the database, modify a state for a command... for each person > who works in the society (back office), I create two tables: PROFIL + > UTILISATEUR (user). I think this is where you may be confused. Since you don't have access to the real USER table you cannot create any new users with specific right to the database. You can create your on UTILISATEUR table that your code checks and then your code must decide what database actions are allowed. But you will always access your data base with the one user your provider gave you and none other. > In the UTILISATEUR tables I intend to create a user 'Visitor', password: > Visitor, a user Administrator with all privileges, a user operator with the > privilege only on the ARTICLE products... As I stated above, all priveleges will have to be handled in your own code. > But I don't see the way to assign the rights. I know the command: > "GRANT SELECT, INSERT, UPDATE, DELETE ON DB_Install.CLIENT TO > Visitor@localhost IDENTIFIED BY password" As I stated above, I think you'll be understanding by now. > This instruction is entered from mysql client, but how must I grant a > specific profil inner the code ? > I repete that I dispose just one user profil into my provider. > I maybe don't understand the way a database is built. Hope this help!! Joel