473,739 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grant Privileges

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 mySQL Web Development" by Luke Welling and Laura
Thomson, and have been working through the examples there.

The question I have is about the GRANT command, and the apparent results
there. I don't know if my problem is one of understanding what the results
should be, or if I have another problem.

I am attempting to set up an administrative user, that has the same
privileges as root. I have been able to set up a user that appears to have
all privileges, with the exception of GRANT privileges to other users. This
user can create new database tables, insert records, modify them, delete
them and so on.

But, when this user tries to GRANT privileges on any database, even ones it
has created, an 'access denied' error is generated. I have pasted a session
below. (I hope that wrapping does not make this difficult to read.)

mysql> show grants for chc;
+---------------------------------------------------------------------------
-------------------------------------------------------+
| Grants for chc@%
|
+---------------------------------------------------------------------------
-------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'chc|
| GRANT ALL PRIVILEGES ON `mysql`.`aec200 3` TO 'chc'@'%' WITH GRANT OPTION
|
| GRANT ALL PRIVILEGES ON `mysql`.`mysql` TO 'chc'@'%' WITH GRANT OPTION
|
+---------------------------------------------------------------------------
-------------------------------------------------------+
3 rows in set (0.01 sec)

mysql> GRANT ALL
-> ON *.*
-> TO fred IDENTIFIED BY 'classy'
-> WITH GRANT OPTION;
ERROR 1045: Access denied for user: 'chc@localhost' (Using password: YES)
mysql>

Now, if I change this GRANT command as follows:

mysql> GRANT ALL
-> ON aec2003
-> TO fred IDENTIFIED BY 'classy'
-> WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

Then, as shown in the results, the query appears to function as desired.

However, when I then attempt to log in as fred, again access is denied:

[chc@secure chc]$
[chc@secure chc]$ mysql -u fred -p
Enter password: ******
ERROR 1045: Access denied for user: 'fred@localhost ' (Using password: YES)
[chc@secure chc]$

even though when we check the GRANT table, the results are:

mysql> show grants for fred;
+---------------------------------------------------------------------------
-+
| Grants for fred@%
|
+---------------------------------------------------------------------------
-+
| GRANT USAGE ON *.* TO 'fred'@'%' IDENTIFIED BY PASSWORD '677e059523c257 eb'
|
| GRANT ALL PRIVILEGES ON `mysql`.`aec200 3` TO 'fred'@'%' WITH GRANT OPTION
|
+---------------------------------------------------------------------------
-+
2 rows in set (0.00 sec)

I am obviously missing some part of the process, but I am not sure what it
is. Can you explain the piece I am missing? I would appreciate it very much.
Thanks.

Charles Cantrell


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 10582

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

Similar topics

12
3923
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.
3
3854
by: Bruce A. Julseth | last post by:
I am doing something wrong or have something set up wrong. When I issue mysql> grant all on * to mike identified by 'joented' with grant option; Query OK, 0 rows affected (0.69 sec) It looks like the grant worked. Here is what the mysql.user table looks like.
3
2721
by: Marc | last post by:
Hello, I have 3 users in my MySQL server. One of them has Grant access (actually: all privileges). I cannot login as this user using phpMyAdmin - my password is not accepted (though I' m sure it must be the right one). I CAN login as any of the other users. When I do this and choose 'privileges' I get the overview: User - Host - Password - Global Privileges - Grant - Action I can see the user with all privileges, but the cell under...
4
99020
by: Amardeep Verma | last post by:
Hi, I have a quick question. Which role/privileges are required before a user can give the statement "GRANT ALL PRIVILEGES"? Thanking you in Advance Have a nice day
0
2024
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 mySQL Web Development" by Luke Welling and Laura Thomson, and have been working through the examples...
6
129866
by: maxwell | last post by:
mysql Ver 3.23.54 Having read, as best I could, the docs at http://www.mysql.com/documentation ..., on host (Linux from scratch, kernel 2.4.20) "mysql.here.com" I enter: mysql> GRANT ALL PRIVILEGES ON db.* TO root@'max.here.com'; Query OK, 0 rows affected (0.00 sec) but ...
6
6858
by: Xerxes | last post by:
When I use the following GRANT statement GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO sassisc@localhost IDENTIFIED BY 'dodge3' it came back with an error message: SQL-query : GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
0
1993
by: Marc | last post by:
Hello, I have 3 users in my MySQL server. One of them has Grant access (actually: all privileges). I cannot login as this user using phpMyAdmin - my password is not accepted (though I' m sure it must be the right one). I CAN login as any of the other users. When I do this and choose 'privileges' I get the overview: User - Host - Password - Global Privileges - Grant - Action I can see the user with all privileges, but the cell under...
2
2791
nomad
by: nomad | last post by:
Hello Everyone. I need some help in create Privileges for a new db. I'm using a host call addr.com and I hate them for there cpanel sucks. any I hav to write a MySQL to Grant All Privileges for a user to use a db. Here is my code GRANT ALL on allyson.blog //allyson is the db and blog is the table TO nomad@adc.com // trying to make a new user IDENTIFIED BY "12345";
0
8969
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9337
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9266
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9209
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8215
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6054
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.