If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > SQL Syntax problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-29-04, 14:59
MrCrud MrCrud is offline
Registered User
 
Join Date: Nov 2003
Posts: 150
SQL Syntax problem

I have a query that looks like this:

GRANT select, insert, update, delete
ON content.*
TO audio-occasion_qc_ca_-_content@localhost identified by 'password';

And it keeps crashing on the first '-' character it hits.... it there a way to use another character or enclose the words somehow to fix this?

I cannot unfortunately rename my db prefix .

Thanks!
__________________
Cheers!

Mr.Crud

There are 10 kinds of people, ones that understand digital, others that dont
Reply With Quote
  #2 (permalink)  
Old 10-29-04, 16:48
cristiu cristiu is offline
Registered User
 
Join Date: Sep 2004
Posts: 46
this: "audio-occasion_qc_ca_-_content" must be user not dbname
Reply With Quote
  #3 (permalink)  
Old 10-29-04, 16:59
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
Check the MySQL GRANT documentation. I think what you want is:
Code:
GRANT select, insert, update, delete
   ON content.*
   TO 'audio-occasion_qc_ca_-_content'@'localhost' identified by 'password';
-PatP

Last edited by Pat Phelan; 10-29-04 at 17:03.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On