LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2004, 12:10 PM   #1
robertoneto123
Member
 
Registered: Sep 2003
Distribution: Red Hat, Conectiva Linux
Posts: 32

Rep: Reputation: 15
Why mysql GRANT does not work?


Hello,

I'm trying to create a database 'x' for user 'y' with password 'z'. The user does not exist also.

So, I did:

GRANT ALL PRIVILEGES ON x TO y@"%" IDENTIFIED
BY 'z' WITH GRANT OPTION;
(this line was directly from the mysql manual)

and I got:

Query OK, 0 rows affected (0.00 sec)

But nothing happens! I believe that "o rows affected" isn't good, right?

The user exists, but only can see the test and mysql databases.

The database was created also.

Does anyone know what is going on?
 
Old 01-22-2004, 02:13 PM   #2
ricstirato
Member
 
Registered: Jan 2004
Location: Gießen, Germany
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Posts: 174

Rep: Reputation: 24
The "0 rows affected" is OK, this is normal for GRANT and REVOKE.

You granted access to the user at "%" - which is all hosts except localhost (!).

If you use the mysql command line client (or phpmyadmin or similar) on the same machine as the server runs on, the user in fact is at localhost.

You will have to do a second GRANT, replacing % with localhost.
 
Old 01-23-2004, 08:33 AM   #3
robertoneto123
Member
 
Registered: Sep 2003
Distribution: Red Hat, Conectiva Linux
Posts: 32

Original Poster
Rep: Reputation: 15
Thumbs up

The second GRANT works fine.

Tks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grant Privileges - MySQL Jannyno Linux - General 2 06-23-2012 03:00 AM
Updating MySQL grant tables... sigep739 Linux - Newbie 2 01-04-2004 12:57 AM
mysql grant issues Robin01 Linux - Newbie 1 10-29-2003 10:56 PM
MYSQL GRANT etc etc markopolox Programming 8 09-23-2003 03:58 AM
Mysql User grant problems ubers0ldat Linux - Software 7 07-30-2003 01:33 AM


All times are GMT -5. The time now is 03:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration