I've been tasked with importing an SQL database to setup up with a local mediawiki website (v1.14). We were sent a SQL file with an image file to upload to the local site. After setting up mediawiki using MAMP, when importing the files through phpadmin, my root user gets iced every time and I can no longer log in and/or connect to mysql. I'm not the most pro efficient at SQL (I'm actually very noobish to it), but I think that the SQL file I'm importing has its own root user/password combo that's conflicting with the current one. I'm not sure if that is the cause or not.

The only way around this that I've found, is by following the instructions here to recreate the root user: http://blog.connexeon.com/sysadmin/linux/recreating-deleted-mysql-root-user/ or staying logged in as root before importing via mysql and then changing the password to root.

Does anyone have anything that can help me get through this? I'm really looking for assistance with importing a SQL dump for an older version of MediaWiki.

I've been using the following commands before installing mediawiki v1.14 using MAMP (I place the file within htdocs, access the index, and go through the setup process). I setup a database in MAMP, use this command to import the database handed to me via the client:

mysql --silent --local --password=barbaz newdb < dbdump.sql

I've been attempting to follow the instructions here: restoring mediawiki backup without success. After the sql has been imported, when accessing the wiki I'm either prompted with a message on the index.php stating that user "database_user_name@localhost" does not have sufficient rights which I granted full access and can access the database via mysql -uuser -ppassword just fine.

Or I get to the index.php but the information doesn't load. The instructions note I must use update.php to ensure the data carries over, but the script doesn't work and prompts me with more permission errors stating that it could not connect to the database (although everything seems correct and I can connect the the database using the same credentials being used in the update.php file via the terminal).

I am using PHP5.3 when running the update.php script in the maintenance folder. I also attempted hard coding the credentials in the update.php script.... with the same results.

  • did you flush the privileges after granting the user the rights? Some error messages (not all, but a representative) selection would help here too Jul 20 '13 at 2:38
  • Yep. First thing I tried. Jul 21 '13 at 3:39

I believe the end problem ended up being a combination of the MAMP configuration for mysql was interfering with another instance of mysql on OSX and that the dump file contained SOMETHING (I'm not 100% sure what) that was interfering with permissions for my instance of mysql. I ended up using the local instance of mysql and importing one specific db from the dump.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.