Jump to content
  • 0

Not able to import prior mediawiki MySQL database into new new MySQL


Question

Please help so that I can export MySQL database from prior MediaWiki into a new Windows machine where I need to install Mediawiki and import the prior MySQL database. In other words, a new Windows machine needs to be used where Mediawiki will be installed, but I need to export the old MySQLdatabase from the old Windows machine to the new Windows machine.

I have installed XAmpp in the new Windows machine and I ahve configured Apache and MySQL in the new Windows machine. I also created a new database (with name newmediawiki) in MySQL. However, importing the old MySQL database into the new database is "not working". The old database is about 1.5GB and after zip it is about 250 MB. I have done the necessary settings to increse the timeout, file size etc in Xampp.

Following are the steps I took:

Downloaded and installed xampp-windows-x64-7.4.16-0-VC15-installer, as the latest mediaWiki can only support up to PhP 7.4

Created a new database using Xampp control panel with name newmediawiki

In C:\Xampp\php.ini, changed following to a higher limit:
max_execution_time = 
max_input_time = 
memory_limit = 
post_max_size = 
upload_max_filesize = 

In C:\Xampp\mysql\bin\my.ini changed:
max_allowed_packet=999M
max_allowed_packet=64M

In J:\Xampp\phpMyAdmin\libraries\config.default.php changed:
$cfg['ExecTimeLimit'] = 0;  (so that there is no time limit)

Restart Apache and MySQL in Xampp

 

I had the priormediawikidb (exported from prior media wiki) saved in my C:\mediawiki, and saved it as zip, and another copy as sql extension (as I tried with both the formats). The priormediawikidb is 1.5 GB.

I tried exporting priormediawikidb into the newmediawiki using both Control panel of Xampp and from the command line, but with no success.

When I try the control panel, I get an error shown on the Control panel as "Please be patient", so it was of no use and it probably gets stale.

I tried the following (tried with both sql extension and zip extension) from the command line as follows:

C:\Xampp\mysql\bin>mysql -u root newmediawikidb < "C:\mediaWiki\priormediawikidb.sql"

Also, tried (by changing the format of file from sql to zip) as:

C:\Xampp\mysql\bin>mysql -u root newmediawikidb < "C:\mediaWiki\priormediawikidb.zip"

By running from the command line (with both zip format and sql format) no error was thrown in the command line and I got the command line prompt back. I restarted Apache and MySQL, refreshed the PHP/MySQL browser (http://localhost:8082/phpmyadmin/), but I do NOT see the prior tables imported into newmediawiki.

The command prompt successfully returns but I do not see the tables into newmediawikidb.

The mysql_error.log does not give any information.

The prior MySQL was of version 5.0.27 if that matters.

I will appreciate any help. I do not see anything meaningful in any log file to troubleshoot.

-----------

Would you rather suggest that I install Apache and MySQL (without using Xampp) and try to export the old MySQL into the new MySQL?

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

If you still have access to your old database server (the server itself, not just backup files):

  1. Export it as a .sql file using the mysqldump program via the command line
  2. Copy the .sql file generated to the new computer
  3. Import the .sql file using the mysql program via the command line

If you no longer have access to the old database server, you are potentially out of luck if your existing .sql file did not import successfully.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.