Forums / Install & configuration / Fatal error: A database...

Fatal error: A database...

Author Message

maarten velde

Tuesday 26 February 2008 1:07:13 pm

Hey People,

I'm new to this forum. I couldn't find another topic considering this problem in the forum, I hope I'm right in starting a new topic on this problem.

eZ Publishing looks realy promisng, and I try to install it on my own server, but when installing I get the following error at the very last step:

<i>Fatal error: A database transaction in eZ Publish failed (...)</i>

Looking into the error log, I read the following error

<i>
[ Feb 26 2008 20:46:48 ] [80.202.211.60] eZMySQLDB:
Query error: Access denied for user: 'mplusplus_nl@%' to database 'mplusplus-nl'. Query: LOCK TABLES ezurlalias_ml WRITE
[ Feb 26 2008 20:46:48 ] [80.202.211.60] eZDBInterface::commit TRANSID-382f864d49bbc75ce444aa630bce9868:
Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-382f864d49bbc75ce444aa630bce9868.
</i>

Those are actually two messages. The first is strange, because eZPublish DOES manage to create a series of tables in the database.
The second worried me the most, and I tried to investigate that. I found a couple of bug-reports (issue #007394, #007394, and #008163) that dealt with the problem, suggesting that I'd change the STRICT_TRANS_TABLES mode.

Here I'm lost: how do I do that? I'm running it on a hosted server, so I seem to have no access over MySQL 'running modes', or is there yet something else going on?

The server is running Linux (Debian) with MySQL and PHP5

Has anybody any tips?

I'd greatly appreciate it...

Maarten

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.

eZ debug

Timing: Jan 18 2025 16:09:38
Script start
Timing: Jan 18 2025 16:09:38
Module start 'content'
Timing: Jan 18 2025 16:09:39
Module end 'content'
Timing: Jan 18 2025 16:09:39
Script end

Main resources:

Total runtime0.7775 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0101 588.8516180.8359
Module start 'content' 0.01010.6513 769.6875665.5000
Module end 'content' 0.66140.1160 1,435.1875341.0859
Script end 0.7775  1,776.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5583210.0002
Check MTime0.00160.1999210.0001
Mysql Total
Database connection0.00130.173110.0013
Mysqli_queries0.683687.91652070.0033
Looping result0.00210.27002050.0000
Template Total0.744795.820.3724
Template load0.00240.309220.0012
Template processing0.742395.472620.3712
Template load and register function0.00020.032010.0002
states
state_id_array0.00070.088210.0007
state_identifier_array0.00100.131620.0005
Override
Cache load0.00210.2669670.0000
Sytem overhead
Fetch class attribute can translate value0.00200.251650.0004
Fetch class attribute name0.00160.207980.0002
XML
Image XML parsing0.00160.211350.0003
class_abstraction
Instantiating content class attribute0.00000.001980.0000
General
dbfile0.00410.5289340.0001
String conversion0.00000.001030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs