LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2009, 10:38 AM   #1
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Rep: Reputation: 15
Moodle Installation - grant all priveleges in MySql


hi,

Am trying to install Moodle on Ubuntu 8.10 as per http://docs.moodle.org/en/Step-by-st...ide_for_Ubuntu

After installing MySqlServer version: 5.0.67-0ubuntu6 (Ubuntu),I created database 'moodle'. But when I try 'grant all priveleges', I get the following error saying Syntax is wrong.

Code:
mysql> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Query OK, 1 row affected (0.01 sec)

mysql> GRANT ALL PRIVELEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'xxxx';
ERROR 1064 (42000): 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 'PRIVELEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'xxxx'' at line 1
'xxxx' is the password I have set as per instructions on the link. I tried going thru the man commands, I get something like

Code:
 GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
           ON DATABASE dbname [, ...]
           TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]
I am very new to Linux and SQL programming,really appreciate if anyone cud help.

Thanks
 
Old 02-08-2009, 07:05 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
If you look at the examples here http://dev.mysql.com/doc/refman/5.0/en/grant.html, you'll see you need single-quotes around the username & hostname.
 
  


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
Why mysql GRANT does not work? robertoneto123 Linux - Software 2 01-23-2004 08:33 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: how to see my priveleges? mikeshn Programming 9 06-25-2003 12:30 PM


All times are GMT -5. The time now is 08:33 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