Page MenuHomePhabricator
Paste P7001

mysql.py
ActivePublic

Authored by jcrespo on Apr 17 2018, 10:13 AM.
Tags
None
Referenced Files
F17033712: mysql.py
Apr 17 2018, 10:13 AM
Subscribers
None
root@neodymium:~$ ./mysql.py -h dbstore2001:3318
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4333
Server version: 10.1.32-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Event Timeline

root@neodymium:~$ ./mysql.py -h db1052 enwiki
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2447007520
Server version: 10.0.28-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@db1052.eqiad.wmnet[enwiki]>
while read host port; do ./mysql.py -h $host:$port enwiki -e "SHOW CREATE TABLE revision\G"; done < s1.hosts

(it handles different passwords and dns resolution/tls automaticaly for you)