how to use MediaWiki’s DumpBackup.php, if you need to connect through a socket or a port?

My web-space provider has a lot of MySQL servers running for customers like me.  All these servers answer to requests

  • on their resp. UNIX socket
  • and also their resp. TCP/IP port.

So for my database I know

  • my very special UNIX socket
  • and my very special TCP/IP port.

And in order to connect my MySQL database there, I use either of them.

But: I see no way of how to get DumpBackup.php to connect to my database like that.

I don’t see a way with MWDumper either.

Update:

My PHP web applications see and use this php.ini :

  • $HOME/public_html/cgi-bin/php.ini

This is why and how my MediaWiki and my WordPress see their MySQL database.

So why does dumpBackup.php started on the command line not see and use that php.ini ? Well PHP from the command line behaves differently. It does not see that file. But you can tell it to use a file through “-c …”. Used it, succeeded:

$ php -c $HOME/public_html/cgi-bin/php.ini …/maintenance/dumpBackup.php …
$ php -c $HOME/public_html/cgi-bin/php.ini …/maintenance/dumpBackup.php --full --output=gzip:/dumps/abstract.xml.gz

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.