Re: Question about MDB2 Schema and why it does not work

From: Date: Thu, 10 Jan 2008 01:34:46 +0000
Subject: Re: Question about MDB2 Schema and why it does not work
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28424@lists.php.net to get a copy of this message
Ryan Sims wrote:
That error message corresponds to MDB2_ERROR_ACCESS_VIOLATION, which is thrown whenever MySQL raises a 1044 or 1142 error message. In either case, it sounds like your MySQL user has privileges for CREATE, but not ALTER. Grant ALTER permissions on your MySQL user and the updateDatabase() method should work. No, when I created user I used grant all privileges on table.*
I don't want the user to have any privileges on the other databases or a 'create database' privilege Anyway, I think I found the problem, which is pretty obvious now, but easy to miss for anyone who is trying to do what I wanted to do: dump an existing database and then re-create all tables in another empty database. Here is the problem: in schema.xml in the very beginnig, before the first <table> tag I had <?xml version="1.0" encoding="ISO-8859-1" ?> <database> <name>olddatabase</name> <create>true</create> <overwrite>false</overwrite> The name of the database in schema.xml is 'olddatabase' , sure because data was dumped from the 'olddatabase' When I changed it by hand to 'newdatabase', then i was able to load the data from this xml file into the new database and no funny errors like insufficient permissions or 'unknown error' -- Open Source ALL content management with streaming video http://wiki.sharedlog.com

« previous php.pear.general (#28424) next »