Manual talk:Pywikibot/MySQL
Add topicAppearance
Latest comment: 7 years ago by Vladis13 in topic db_connect_file = None
| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
xywiki.labsdb or xywiki.analytics.db.svc.eqiad.wmflabs?
[edit]@Zhuyifei1999: I noticed you changed this value. But in user-config.py (and config2.py) there is a different value suggested. I use xywiki.labsdb and it works for me, what is the correct value? We should fix the config2.py or this page and make them unified. Dvorapa (talk) 01:30, 21 June 2018 (UTC)
- The former used to point to a replica cluster that has now been decommissioned; it is now a deprecated alias for the latter, only kept for backwards-compatibility. Zhuyifei1999 (talk) 05:07, 21 June 2018 (UTC)
- I see, thank you. I'll apply the change also to config2.py in the https://gerrit.wikimedia.org/r/#/c/pywikibot/core/+/272990/. But from my dumb novice user view, the former was better to remember and use. Dvorapa (talk) 12:10, 21 June 2018 (UTC)
- the former was better to remember and use.
- Agreed. Zhuyifei1999 (talk) 13:58, 21 June 2018 (UTC)
db_connect_file = None
[edit]@Dvorapa: edit No, I checked the empty value today. The `db_username`/password using ONLY if `= None`. Take a look to code, lines 57-65. And you can see in debuger - there on value '' or empty using `{'read_default_file': config.db_connect_file}`. Vladis13 (talk) 10:43, 27 June 2018 (UTC)
- Yeah, but in Python at least: '' == None too. And also if no value ever set, Pywikibot really uses the default from config2, which is also ''. So it doesn't matter if db_connect_file is '', None or not set in the user-config, still db_username counts in all these cases. Therefore better not push users to change '' to None (as they are equal) and leave it as is. Dvorapa (talk) 11:00, 27 June 2018 (UTC)
- Sorry, but you mistake. 1)
'' == Noneis False, see online console. 2) Users have error on connect to database, if do not set `db_connect_file = None`. Screenshot. Vladis13 (talk) 18:35, 28 June 2018 (UTC) - I can not reproduce what you describe, maybe you should fill in a bug task to Phabricator as the behavior in this manual should be described correctly. Dvorapa (talk) 20:50, 28 June 2018 (UTC)
- Phab:T198428 Vladis13 (talk) 21:59, 28 June 2018 (UTC)