Project:Support desk/Archives/Database/002

(OUTDATED) Error 1062: Duplicate entry '305' for key 1 (localhost)

 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

Hi,

Please note that while I am trying to save some content in a wiki page I am getting this error:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "RecentChange::save". MySQL returned error "1062: Duplicate entry '305' for key 1 (localhost)".

The error appears when I try to save the page for the first time. If I press the Back button of browser and retry it works.

Can you pls shed some lights on whats the error may be?

Regards, —Jagbir 14:06, 4 November 2008 (UTC)

(OUTDATED) Oracle Support?

 * MediaWiki version: in general
 * PHP version:      5.2
 * MySQL version:    5.0.22
 * URL:

I'm interested in Mediawiki support of Oracle as a DBMS. I've read this support is discontinued some time ago but at the same time I didnot find any comments why this happened, what is the way to get the latest source, what were the bugs and so on. If anyone can help finding a documentation and the way i may use Oracle with Mediawiki, please write to velislav.bg at gmail dot com

—79.110.116.161 07:37, 13 November 2008 (UTC)

(RESOLVED) 1048: Column 'old_id' cannot be null

 * Product 	Version
 * MediaWiki 	1.13.2
 * PHP 	5.2.4-2ubuntu5.3 (apache2handler)
 * MySQL 	5.0.51a-3ubuntu5.3

I have upgraded from one machine running 1.13.0 to a different machine with the latest 1.13.2.

'Old' machine:


 * Product 	Version
 * MediaWiki 	1.13.0
 * PHP 	5.1.2 (apache2handler)
 * MySQL 	5.0.18

I have maintained the old LocalSettings.php and updated the MySQL database from a mysqldump. At a glance things appear to be in order (page histories, images, user accounts, page contents etc.). However, when I try to perform a 'Save page' I get:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "Revision::insertOn". MySQL returned error "1048: Column 'old_id' cannot be null (localhost)".

Any advice?

—147.96.5.37 17:41, 13 November 2008 (UTC)


 * Did you run update.php? I wouldn't expect a schema change between 1.13.0 and 1.13.2, but it's usually a good idea to run the update script even after minor upgrades (especially if something stops working!). —Emufarmers(T 19:58, 13 November 2008 (UTC)


 * Yep, I did run it, with no apparent problems (it did seem a bit *fast*, but then again my new machine is much more powerful). Is there anything in the database that is host specific? Has there been any minor change in LocalSettings.php between 1.13.0 and 1.13.2? Like I said, superficially everthing appears to be in place. It is only on 'Save page' that things go egg-shaped. Could it be a matter of incorrect passwords or usernames that have permission to query the db, but not write to it? Any suggestions are obviously most welcome! All the best --147.96.5.37 10:55, 14 November 2008 (UTC)

Solved: For some reason my daily backup script invoking mysqldump had the flag --skip-opt. Removing this flag and loading this new dump (efectivley with the flag --opt) resolved the situation (dont ask me why I used --skip-opt...). All the best --147.96.5.37 13:07, 14 November 2008 (UTC)
 * Hi, this was very helpful. I was checking to install a copy of a Wiki to another server. In principle that worked, but I had your problem and simultaneously some trouble with the character sets. Canging --skip-opt by --opt solved both problems.
 * 82.135.89.216 20:56, 12 December 2008 (UTC)