LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 11:10 AM   #1
robertoneto123
Member
 
Registered: Sep 2003
Distribution: Red Hat, Conectiva Linux
Posts: 38

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, 01: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, 07:33 AM   #3
robertoneto123
Member
 
Registered: Sep 2003
Distribution: Red Hat, Conectiva Linux
Posts: 38

Original Poster
Rep: Reputation: 15
Thumbs up

The second GRANT works fine.

Tks
 
  


Reply



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 02:00 AM
Updating MySQL grant tables... sigep739 Linux - Newbie 2 01-03-2004 11:57 PM
mysql grant issues Robin01 Linux - Newbie 1 10-29-2003 09:56 PM
MYSQL GRANT etc etc markopolox Programming 8 09-23-2003 02:58 AM
Mysql User grant problems ubers0ldat Linux - Software 7 07-30-2003 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:16 AM.

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
Open Source Consulting | Domain Registration