473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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 6838
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
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
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...

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.