Talk:Toolserver:Database access

From mediawiki.org
Jump to navigation Jump to search
Wikimedia Community Logo-Toolserver.svg

This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.

Current settings of the Query Killer[edit]

I'm running a slow query with /* SLOW_OK */ on sql-s2, which, according to the replag graphs, is currently having 1908s of replag. According to the current version of the documentation, the query should have been killed after 10 minutes, yet it's still running (which is great!). Anyway, I was wondering: what are the current settings of the Query Killer then? Junkie.dolphin 19:19, 14 August 2012 (UTC)

Joining between user and wiki databases[edit]

This page does not cover what would be needed to do joins between a user database with a wiki database, if that is even possible. — Hippietrail 00:27, 28 November 2009 (UTC)

AFAIK you need to create a user database on the same server as the wiki database. Best to ask on IRC. Dispenser 03:01, 28 November 2009 (UTC)

Multi maintainer project databases[edit]

This page doesn't say anything about the dabases of multi-maintainer accounts. Elsewhere it's mentioned that such db's begin with p_ rather than u_ but it should also be covered here.

But in fact in our own m-m project, "enwikt" we can't seem to connect even to the standard databases and have no .my.cnf - do m-m projects need to requst their database be provided via a Jira request or is this a problem we've found? — Hippietrail 12:59, 5 January 2010 (UTC)

You should ask on IRC or on the mailing list; I don't think anyone watches these pages except to read documentation. I only found this by accident. CBM 17:27, 5 January 2010 (UTC)

Java example does not close InputStream[edit]

The FileInputStream used to read Properties from ".my.cnf" is never closed, so the application will lose a file handle everytime that code is used.

Safe code:

....
Properties mycnf = new Properties();
InputStream inputStream = null;
try {
   inputStream = new FileInputStream(System.getProperty("user.home")+"/.my.cnf");
   mycnf.load(inputStream);
} finally {
   if (inputStream != null)  {
      inputStream.close();
   }
}
....

but that's maybe too much for an example. hans 19:57 Wed Jan 23 (UTC)