Anope IRC Services

Anope Support => 1.8.x/1.7.x Support (Read Only) => Topic started by: Arma on March 18, 2006, 01:47:03 PM

Title: Mysql won't update the local database
Post by: Arma on March 18, 2006, 01:47:03 PM
Greetings Everyone,
unbelievable but i have a problem. I edit the mysql table 'anobe_ns_core' a flags of someone. If i save the Mysql/phpmyadmin show me the new value. But if i make a '/msg operserv update' the old value is set. And i have already set 'sql on' and if i querry the operserv it says that is activated. I use Mysql Client 3.x.x | Mysql Server 4.0.x with Unrealircd 3.2.4 and Anope 1.7.x. The Server runs on Debian 3.1 since two weeks. And its a productive ircd server, so that means there are people on the server and everything is saved. But just things which are changed in the irc network self. If u direct type the orders to 'nickserv' etc... .
I would be glad to hear some tips how i can change stats in mysql.
Pleace excuse my bad english.
Best Regards
Arma
Title:
Post by: Trystan Scott Lee on March 18, 2006, 04:15:41 PM
Anope's MYSQL is one way, you can edit all you want in phpmyadmin but as soon as Anope saves its data back to sql it will be over written.

Currently the only way to modify sql manual is to shutdown services, modify sql and restart services using userdb.. which is not always the best way to do this with a production server
Title:
Post by: Arma on March 19, 2006, 01:43:42 PM
Thank you for Response,
dont tell me anope own a quite perfectly mysql database and use it just for "nice to have" frontend. Then i have two more questions.
How can i change values in a *.db file?
And could you explain your way cause i dont really unrderstand it.
Best Regards
Arma
Title:
Post by: ShelLuser on March 19, 2006, 08:57:17 PM
Quote
Originally posted by Arma
dont tell me anope own a quite perfectly mysql database and use it just for "nice to have" frontend.

Don't underestimate the extra options which this feature provides. For example; this allows me to backup the Anope data anywhere I like. It can also make it a lot easier for backup services to keep up to date with the current settings.

All in all; the SQL server is a lot more versatile than seperate .db files are.

Quote
Then i have two more questions.
How can i change values in a *.db file?

I guess you'd need to go over the Anope sourcecode so you can get the layout of the database files.

I doubt that this is what you want though since I find it very questionable that Anope would check the database files for any change and if there is re-read it. As far as I know Anope only reads the data during start, then all it does is store it.
Title:
Post by: Arma on March 20, 2006, 05:33:47 PM
Quote

Don't underestimate the extra options which this feature provides. For example; this allows me to backup the Anope data anywhere I like. It can also make it a lot easier for backup services to keep up to date with the current settings.


I had to backup data. But i used the local *.db data, which are automatically made. Sure, its a way to backup the data, but how do you restor it back? It doesnt read the data from the mysql database. So what the point of a backup without restoring?


But i think its time to explain my problem.
I made this kill option after a few days/weeks. But i want to activate it automatically for all user. Because, only the new user have this setting per default on.

Best Regards
Arma
Title:
Post by: ShelLuser on March 21, 2006, 12:09:23 PM
Quote
Originally posted by Arma
But i think its time to explain my problem.
I made this kill option after a few days/weeks. But i want to activate it automatically for all user. Because, only the new user have this setting per default on.

Ah, well then. Your best bet is to try and change this for all those other users, but you figured that out yourself ;-)  The way to do it differs. I guess you could try to script something and use some sort of bot to do this online, that would be the quickest method and wouldn't require a restart.

The other option I see is to dump all your data to an SQL server, make the changes there, and then restart Anope so it will re-load all stored data. There maybe more possibilities, but these are the best ones I can come up with.