LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Moodle Installation - grant all priveleges in MySql (https://www.linuxquestions.org/questions/linux-newbie-8/moodle-installation-grant-all-priveleges-in-mysql-702942/)

aarav2306 02-07-2009 10:38 AM

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

chrism01 02-08-2009 07:05 PM

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.


All times are GMT -5. The time now is 01:13 PM.