473,549 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grant Command Syntax

I've got a MySQL database which contains users and their passwords. I have
a PHP script that allows me to add new users and passwords to the database
via a web form.

What is the syntax to grant those newly added users select, insert, delete,
and update access to the database? I know how to do this from the command
line, but I want the PHP script to do it automatically when a user is added
to the database.

In other words, the users that I am adding will have the ability to query,
update, and delete themselves from the database as well as other users.

Jul 17 '05 #1
0 1986

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3904
by: | last post by:
I issued the mysql command Grant all on *.* to myid@localhost identified as "mypw"; and recieved the error message ERROR 1045: Access denied for user" '@localhost' (Using password: NO) I am running mysql on my own machine which is not networked.
0
10573
by: Charles Cantrell | last post by:
I have recently set up mySQL on a Mandrake release of Linux (Version 7 of Mandrake, I believe), using the binary 4.0.13 standard release. The set up and start up all were normal, as far as I could tell, with no warnings or error messages. In nearly all respects, the database appears to be running as expected. I have the book "PHP and...
0
1069
by: david walcroft | last post by:
I'm trying to use a grant command on a redhat 9 v:3.23.56-1.9 :- " grant create temporary tables on iptables.* to iptables_user@localhost identified by 'xxx' " And I get this syntax error, to which I cannot find the answer. ERROR 1064: You have an error in your SQL syntax near 'temporary tables on iptables.* to iptables_user@localhost...
0
1913
by: Xerxes | last post by:
I am having a problem with accessing MySQL database from my PHP code. I tested accessing MySQL db locally and once things worked I created the same DB on my web hosting's server. No problem creating database and tables and populating it. My database is called "sassisc". However, my code dies when it tries to connect to DB: $result =...
0
1794
by: Xerxes | last post by:
I get an error message with this: GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO sassisc@localhost IDENTIFIED BY 'dodge3' It comes back with an error message: SQL-query : GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
0
857
by: Terrac | last post by:
Hello, What is wrong with my syntax here GRANT ALL ON `user\_`'%'.* TO user@localhost ; The Mysql Page says... <--snip--> "the `_' and `%' wildcards are allowed when specifying database names in GRANT commands. This means that if you wish to use for instance a
2
4469
by: Eric | last post by:
Hi, I am pretty new to DB2 (and SQL as well), and run into a few questions: 1) Is there anybody that knows if there is a way to write the following in one SQL statement?: grant select on table agent to user a, user b, user c; grant select on table customer to user a, user b, user c; grant select on table product to user a, user b,...
1
3665
by: everymn | last post by:
Hi, Supposedly the Alter Routine privilege can be granted at the level of a single routine but I haven't been able to get that to work. I've tried it a number of different ways like: GRANT ALTER ROUTINE ON test.'routine-name' TO 'alt-routine'@'localhost' IDENTIFIED BY 'alt-routine'; and
0
4418
by: unixNAB | last post by:
MySQL 5.0.x Hello, I'm trying to work out but the MySQL reference guide to the grant syntax is a little off, it says... so i wanted to do something like grant all on %_log.* to .......; and also tried
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1941
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1059
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.