Fatal error: A database...

Fatal error: A database...

Tuesday 26 February 2008 1:07:13 pm - 5 replies

Author Message

Stéphane Bullier

Tuesday 26 February 2008 2:01:08 pm

Hello,

Have you applied this command on your database :

GRANT CREATE,DROP,ALTER,INDEX,DELETE,INSERT,SELECT,
      UPDATE,CREATE TEMPORARY TABLES,LOCK TABLES
    ON my_database_ez.*
    TO 'my_user_ez'@'localhost'
    IDENTIFIED BY 'super_password';
 
FLUSH PRIVILEGES;

Stéphane

maarten velde

Wednesday 27 February 2008 10:37:18 am

Hey!

Thanks for your answer. No, I didn't try it. Honestly, I don't know much about databases. I hoped I could install eZPublish without having to work my way through a book on mySQL.

Anyway, I tried after your suggestion, but I still don't succeed.

I try to ruyn your command as an SQL-query on phpMyAdmin, but I get an syntax error. I tried checking the command in the MySQL documentation, but as far as I can see, the syntax ought to be OK.

Again, I don't have this on a computer I can access freely. It's all on a host I pay for, so I can't tweak things.

Would you mind helping me furhter? I list the error-message from phpMyAdmin, everything is the same, apart from the password:

SQL query: 

GRANT CREATE , DROP , ALTER , INDEX , DELETE , INSERT , SELECT ,
UPDATE , CREATE TEMPORARY TABLES , LOCK TABLES ON mplusplus - nl . *
TO 'mplusplus_nl'@'mysql6.hostingdiscounter.nl'
IDENTIFIED BY '########';

MySQL said: Documentation
#1064 - 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 '-nl.*
   TO 'mplusplus_nl'@'mysql6.hostingdiscounter.nl'
   I

This suggest to me that the name of the database is illegal, but that sure can't be right?

Thanks in advance for help,

Maarten

Piotrek Karaś

Wednesday 27 February 2008 10:50:16 am

You don't have to learn SQL to solve that, provided that you have some sort of MySQL management frontend (for example PHPMyAdmin). In lamer terms, the user thought which you're trying to connect to the database doesn't have enough privileges to perform all the operations that are necessary. You have to grant all the basic privileges to the user, so that he can CREATE, DROP, ALTER, INDEX, DELETE... You may need root access to the DB, though.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

maarten velde

Wednesday 27 February 2008 1:35:26 pm

Thanks for clearing that out to me... That MySQL book might come one day,... I like more to learn by doing.

Is it correct that I enter these commands as an SQL query? That's what I'm trying to do and where I'm getting these error-messages.

I wonder if the cause could be the NAME of the database: it's supposed to be mplusplus-nl but the 'syntax error'-message point the name out as the cause. When I remove the dash "-", it doesn't throw this syntax-error message anymore. (Although it ofcourse DOES complain that the database doesn't exist)

Further, I found this on the internet, suggesting that the "-" is a illigal name in a table,...

<i>
Identifier characters - can be any alphanumeric character (as long as it’s in the default character set) plus ‘_’ and ‘$’. They can also start with any legal character (legal to be included in the identifier), even a digit. Identifiers can be quoted within ‘`’ (backtick or `), which allows the use of any character except the backtick .
</i>
http://www.idig.za.net/mysql-naming-rules/2006/11/17/

If this is the problem indeed, how come Ez came so far as actually creating tables in the database...?

Eh, * confused *,... :(

Thanks so far for your help, both!

Maarten

Dearg OBartuin

Thursday 11 December 2008 4:37:47 pm

Just in case anyone else has this issue:

The correct sql query to run is

GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX , ALTER , CREATE TEMPORARY TABLES , LOCK TABLES ON `database_name` . * TO 'user_name'@'%'IDENTIFIED BY 'super_password';
WITH GRANT OPTION; FLUSH PRIVILEGES; 

This works on databases with localhost as the database location. if your database is hosted remotely use the following sql query

 GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX , ALTER , CREATE TEMPORARY TABLES , LOCK TABLES ON `database_name` . * TO 'user_name'@'database_address'IDENTIFIED BY 'super_password';
WITH GRANT OPTION; FLUSH PRIVILEGES;

notice the replaced '%'

database_name = Name of your ez publish database
user_name = User name with privalages to set permissions
super_password = password associated to said username
database_address = location of database in most cases thsi is localhost

hope that helps,

Dearg

ps. if you have a web host you may find they do not allow Create Temporary Tables, if this is the case ask tech support very nicely and they may accept when telling them its related to ex publish.

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.