Last modified: 2013-05-30 18:41:02 UTC
As tool user (e.g. local-tusc), I can connect to the tools-db server using the replica.my.cnf credentials, but cannot connect to the "mysql" database (as the "sql" command would), nor can I create tusc__something databases there. Someone wrote on https://wikitech.wikimedia.org/wiki/User:Magnus_Manske/Migrating_from_toolserver that this requires a .my.cnf file for the tool. Some of my tools (e.g. flickr2commons) have that, others (e.g. tusc) don't.
all new tools don't have .my.cnf by default, that is by design. The newly created replica.my.cnf contains access to both local and replicated db's (that doesn't apply for tools created before replica was working) you should be able to type sql local in order to get connected to tools-db, the script automatically detect your configuration and attempt to use proper credentials. This was designed by Coren so I can't tell you why is that, but IMHO users should rename replica.my.cnf to .my.cnf for all new tools and they will have access everywhere without troubles
I don't care what the file is called; I care that it doesn't work, neither as mysqlf nor as the tool user: magnus@tools-login:~$ sql local ERROR 1045 (28000): Access denied for user 'u3067'@'tools-login.pmtpa.wmflabs' (using password: YES) magnus@tools-login:~$ become tusc local-tusc@tools-login:~$ sql local ERROR 1044 (42000): Access denied for user 'p50380g50556'@'%' to database 'mysql' Re-opening this one.
Two different issues: (a) Users (as opposed to tools) do not get access to the local database; it is unclear at this time whether they should. (b) With the new scheme in place, users do not get a database created by default, but have the right to create new ones instead. The current 'sql' script should not attempt to connect to a database by default when requesting 'local'. I'll fix that.
Sorry if I don't make myself clear (but it's so clear in my head! ;-) I want to create a database for a tool (e.g. "tusc"), on the tools-db server (as per recommendation). I try to do that as the tool user, using the replica credentials, but it won't let me: local-tusc@tools-login:~$ mysql --defaults-file=~/replica.my.cnf -h tools-db Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3340 Server version: 5.5.30-MariaDB-mariadb1~precise-log mariadb.org binary distribution Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database tusc__main; ERROR 1044 (42000): Access denied for user 'p50380g50556'@'%' to database 'tusc__main'
Ah! The database needs to be created with the name of the /DB/ user, not that of the Unix account: create database p50380g50556__main; Should do what you expected.
Yes! Thank you, I'll add it to my labs survival notes :-)