Talk:Toolserver/Database
Add topicAppearance
Latest comment: 16 years ago by B. Wolterding in topic DNS aliases
DNS aliases
[edit]Is there a DNS alias for the user databases / the toolserver database (sql alias)? --B. Wolterding 12:41, 18 August 2008 (UTC)
- no. there would be no point, since these are always on 'sql'. the reason the aliases exist is that wiki databases can be on any of sql-s1, sql-s2 or sql-s3, and the alias allows you to connect without having to care which. Kate
- OK; but I'm not sure that there's really no point in having this alias, perhaps I'm missing something. The problem I'm having occurs with Connector/J, a type IV database driver for Java; that is, it doesn't use the local (native) MySQL client at all, but connects directly to the database via TCP/IP. Therefore, I don't see the "sql" alias, nor any parts of the local configuration. Rather I need a DNS alias or host name to connect to. I can access the user database by connecting to "yarrow.toolserver.org", but that will certainly break should the user databases be moved at some point. What should I use instead? --B. Wolterding 16:36, 28 August 2008 (UTC)
- i don't understand; sql is a hostname. you can ping it, telnet to it, and otherwise access it from any program, and it should work fine with Connector/J, unless it's horribly broken. what's the actual problem you're seeing? Kate
- Hm, interesting. I tried and failed. (Actually, I must say we tried and failed - en:User:Legoktm is running the bot, I'm just doing the coding, I don't have a toolserver account.) We created a user database via the mysql client, and tried to access it via Connector/J, which failed until we replaced "sql" with "yarrow.toolserver.org" as the host in the JDBC URL. See discussion. Maybe we were having some gross misunderstanding about the db layout? --B. Wolterding 16:59, 28 August 2008 (UTC)
- it looks like you created the database on yarrow, but sql is an alias for zedler; so if you connected there, the database wouldn't be present. you can re-create or copy the database to 'sql' using mysqldump. the log files you mention on the talk page don't exist anymore, so i can't see the exact error; it would help if you could include it here, as well as the code you're using to connect. the problem with the "sql" program not working is just a bug (it only works for wiki databases, not user databases; i should make a better error message for that.) Kate
- OK, thanks for your help. Yes, it seems that the schema was created on the wrong server then, via the "sql" program. Since the bot is only in a test phase currently, it's no problem to drop and recreate the schema, I'll do that in the next days. If there are still problems, I'll post a more detailed log. --B. Wolterding 13:22, 29 August 2008 (UTC)
- it looks like you created the database on yarrow, but sql is an alias for zedler; so if you connected there, the database wouldn't be present. you can re-create or copy the database to 'sql' using mysqldump. the log files you mention on the talk page don't exist anymore, so i can't see the exact error; it would help if you could include it here, as well as the code you're using to connect. the problem with the "sql" program not working is just a bug (it only works for wiki databases, not user databases; i should make a better error message for that.) Kate
- Hm, interesting. I tried and failed. (Actually, I must say we tried and failed - en:User:Legoktm is running the bot, I'm just doing the coding, I don't have a toolserver account.) We created a user database via the mysql client, and tried to access it via Connector/J, which failed until we replaced "sql" with "yarrow.toolserver.org" as the host in the JDBC URL. See discussion. Maybe we were having some gross misunderstanding about the db layout? --B. Wolterding 16:59, 28 August 2008 (UTC)
- i don't understand; sql is a hostname. you can ping it, telnet to it, and otherwise access it from any program, and it should work fine with Connector/J, unless it's horribly broken. what's the actual problem you're seeing? Kate
- OK; but I'm not sure that there's really no point in having this alias, perhaps I'm missing something. The problem I'm having occurs with Connector/J, a type IV database driver for Java; that is, it doesn't use the local (native) MySQL client at all, but connects directly to the database via TCP/IP. Therefore, I don't see the "sql" alias, nor any parts of the local configuration. Rather I need a DNS alias or host name to connect to. I can access the user database by connecting to "yarrow.toolserver.org", but that will certainly break should the user databases be moved at some point. What should I use instead? --B. Wolterding 16:36, 28 August 2008 (UTC)
- Works fine now. I've updated the documentation. --B. Wolterding 19:20, 12 September 2008 (UTC)