[Labs-l] Temporary tables?
Tim Landscheidt
tim at tim-landscheidt.de
Sun May 26 22:08:08 UTC 2013
Magnus Manske <magnusmanske at googlemail.com> wrote:
> Just saw the database replicas for Lab Tools today - great progress!
> Quick (I hope...) question: Can a tool create a temporary table that can
> "see" a database (e.g. enwiki_p)?
> On the toolserver, I connected to my user database on the "
> enwiki-p.userdb.toolserver.org" server. How can this be done on labs?
Just connect to enwiki.labsdb. There you can create data-
bases with names that begin with your replicated databases
username (u1234) and two underscores
(cf. https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Creating_databases).
For example:
| MariaDB [enwiki_p]> CREATE DATABASE u1234__test2;
| Query OK, 1 row affected (0.03 sec)
| MariaDB [enwiki_p]> CREATE TABLE u1234__test2.test2 (page_id INTEGER);
| Query OK, 0 rows affected (0.04 sec)
| MariaDB [enwiki_p]> INSERT INTO u1234__test2.test2 (page_id) SELECT page_id FROM page WHERE page_id < 1000;
| Query OK, 381 rows affected (0.03 sec)
| Records: 381 Duplicates: 0 Warnings: 0
| MariaDB [enwiki_p]>
Tim
More information about the Labs-l
mailing list