473,503 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with MySQL's GRANT

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
sassisc@localhostIDENTIFIEDBY 'dodge3'

MySQL said:

You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'BY 'dodge3'' at line 1

For some reason, the words "localhost", "identified" and "by" were
stuck to each other.
I removed the "identified by 'dodge3'" and it worked fine.

Does anyone know why this is the case? Is it OK to grant these
privileges without a password required?
I was told that the problem is with "localhost". I checked the MySQL
documentation on their site and can't see what I am doing wrong.

Frpm documentation:

mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
-> IDENTIFIED BY 'some_pass'

I have:
GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO
sassisc@localhost IDENTIFIED BY 'dodge3'

Please HELP!
Jul 19 '05 #1
6 6842
Xerxes wrote:
When I use the following GRANT statement

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO
sassisc@localhost IDENTIFIED BY 'dodge3'


mysql> create database sassisc;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO
-> sassisc@localhost IDENTIFIED BY 'dodge3';
Query OK, 0 rows affected (0.12 sec)

So the query is okay AFAIK. What version of MySQL are you using and how
did you provide this query to MySQL? Have you tried using mysql console
program?

Jul 19 '05 #2
Xerxes wrote:
When I use the following GRANT statement

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO
sassisc@localhost IDENTIFIED BY 'dodge3'


mysql> create database sassisc;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc.* TO
-> sassisc@localhost IDENTIFIED BY 'dodge3';
Query OK, 0 rows affected (0.12 sec)

So the query is okay AFAIK. What version of MySQL are you using and how
did you provide this query to MySQL? Have you tried using mysql console
program?

Jul 19 '05 #3
Xerxes wrote:
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
sassisc@localhostIDENTIFIEDBY 'dodge3'

MySQL said:

You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'BY 'dodge3'' at line 1

For some reason, the words "localhost", "identified" and "by" were
stuck to each other.
I removed the "identified by 'dodge3'" and it worked fine.

Does anyone know why this is the case? Is it OK to grant these
privileges without a password required?
I was told that the problem is with "localhost". I checked the MySQL
documentation on their site and can't see what I am doing wrong.


I'm not speaking from experience, just other messages I've read here, so
take this for what it's worth (a try, perhaps?)...

I'm guessing your doing this through a PHP admin interface.

The problem is that your space between the host name and the "IDENTIFIED
BY" is going away.

The "solution" that I've seen used here, although never explictly stated is:

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
sassisc@'localhost' IDENTIFIED BY 'dodge3'

Note the additional apostrophes around the host name.

Good luck.
- Mark

Jul 19 '05 #4
Xerxes wrote:
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
sassisc@localhostIDENTIFIEDBY 'dodge3'

MySQL said:

You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'BY 'dodge3'' at line 1

For some reason, the words "localhost", "identified" and "by" were
stuck to each other.
I removed the "identified by 'dodge3'" and it worked fine.

Does anyone know why this is the case? Is it OK to grant these
privileges without a password required?
I was told that the problem is with "localhost". I checked the MySQL
documentation on their site and can't see what I am doing wrong.


I'm not speaking from experience, just other messages I've read here, so
take this for what it's worth (a try, perhaps?)...

I'm guessing your doing this through a PHP admin interface.

The problem is that your space between the host name and the "IDENTIFIED
BY" is going away.

The "solution" that I've seen used here, although never explictly stated is:

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
sassisc@'localhost' IDENTIFIED BY 'dodge3'

Note the additional apostrophes around the host name.

Good luck.
- Mark

Jul 19 '05 #5
Mark Sizer <gc*@15grant.com> wrote in message news:<3F**************@15grant.com>...
Xerxes wrote:
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
sassisc@localhostIDENTIFIEDBY 'dodge3'

MySQL said:

You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'BY 'dodge3'' at line 1

For some reason, the words "localhost", "identified" and "by" were
stuck to each other.
I removed the "identified by 'dodge3'" and it worked fine.

Does anyone know why this is the case? Is it OK to grant these
privileges without a password required?
I was told that the problem is with "localhost". I checked the MySQL
documentation on their site and can't see what I am doing wrong.


I'm not speaking from experience, just other messages I've read here, so
take this for what it's worth (a try, perhaps?)...

I'm guessing your doing this through a PHP admin interface.

The problem is that your space between the host name and the "IDENTIFIED
BY" is going away.

The "solution" that I've seen used here, although never explictly stated is:

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
sassisc@'localhost' IDENTIFIED BY 'dodge3'

Note the additional apostrophes around the host name.

Good luck.
- Mark

Hi Mark,
thanks a lot for the info.
I tried that but still had the same problem. And you are right, I
tried it using pma (phpMyAdmin). However, the first time I noticed it
was through my php program (part of a shopping cart application.) I
then tried to test it on pma and found that it, for some reason, gets
rid of the space between 'localhost' and 'IDENTIFIED'. I noticed that
it also adds an extra space between 'sassisc' and '*'. It works fine
with 'sassisc@localhost' if I remove the 'IDENTIFIED BY ...'

Regards.
Jul 19 '05 #6
Mark Sizer <gc*@15grant.com> wrote in message news:<3F**************@15grant.com>...
Xerxes wrote:
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
sassisc@localhostIDENTIFIEDBY 'dodge3'

MySQL said:

You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'BY 'dodge3'' at line 1

For some reason, the words "localhost", "identified" and "by" were
stuck to each other.
I removed the "identified by 'dodge3'" and it worked fine.

Does anyone know why this is the case? Is it OK to grant these
privileges without a password required?
I was told that the problem is with "localhost". I checked the MySQL
documentation on their site and can't see what I am doing wrong.


I'm not speaking from experience, just other messages I've read here, so
take this for what it's worth (a try, perhaps?)...

I'm guessing your doing this through a PHP admin interface.

The problem is that your space between the host name and the "IDENTIFIED
BY" is going away.

The "solution" that I've seen used here, although never explictly stated is:

GRANT SELECT , INSERT , UPDATE , DELETE ON sassisc. * TO
sassisc@'localhost' IDENTIFIED BY 'dodge3'

Note the additional apostrophes around the host name.

Good luck.
- Mark

Hi Mark,
thanks a lot for the info.
I tried that but still had the same problem. And you are right, I
tried it using pma (phpMyAdmin). However, the first time I noticed it
was through my php program (part of a shopping cart application.) I
then tried to test it on pma and found that it, for some reason, gets
rid of the space between 'localhost' and 'IDENTIFIED'. I noticed that
it also adds an extra space between 'sassisc' and '*'. It works fine
with 'sassisc@localhost' if I remove the 'IDENTIFIED BY ...'

Regards.
Jul 19 '05 #7

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

Similar topics

0
8398
by: Didier ROS | last post by:
Hi, I am a newbie I want to create a temporary table and I get the following error message : mysql> CREATE TEMPORARY TABLE tempemp AS SELECT * FROM emp; ERROR 1044: Access denied for user:...
0
1537
by: Tiffany Wilkes | last post by:
I solved the problem--I needed ( ) around the column list. I think the manual should make that more clear. -------- Original Message -------- Subject: column privilege problem Date: Tue, 05...
0
2238
by: Anil Garg | last post by:
Hi, I am trying to install myql on redhat. mysql package used: mysql-3.23.52-unknown-freebsdelf4.6-i386.tar.gz While following the instructions in install document..when i run the follwing...
0
624
by: Gary Cote | last post by:
>Description: I've recently compiled mysql 4.0.14 on redhat 8.0. The installation fails, however, when running mysql_install_db. I've attached a transcript below. I gather from searching the...
0
1325
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to...
3
863
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to...
0
5824
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to...
0
2305
by: Mark Adams | last post by:
I really need some help with this. MySQL will not start on boot despite everything I've done to make sure that it is set to do so. When I start it as root from a terminal with...
6
38451
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
0
7199
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,...
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7322
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...
1
6982
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...
0
5572
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,...
0
4667
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...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
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 ...

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.