Anope IRC Services

Anope Support => 1.8.x/1.7.x Support (Read Only) => Topic started by: neX on April 09, 2011, 02:36:34 PM

Title: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 09, 2011, 02:36:34 PM
First I've used the mydbgen tool.

MysqlHost "localhost"
MysqlUser "servicios_chat"
MysqlPass "******************"
MysqlName "servicios_chat"
MysqlSock ""
MysqlPort ""

When I tried to run anope it showed an error about the MySQL Port so i write that on the services.conf

MysqlHost "localhost"
MysqlUser "servicios_chat"
MysqlPass "******************"
MysqlName "servicios_chat"
MysqlSock ""
MysqlPort 3306

MysqlSecure "md5"
MysqlRetries 10
MysqlRetryGap 1
UseRDB

I can see the data base with phpMyAdmin. It has been built but Anope doesn't use the data base. Why?

I have tried to find the mysql.sock file but i don't know where is it. I am using Ubuntu Server 10.04 where can I find that file?
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: Charles Kingsley on April 09, 2011, 02:54:37 PM
Does it work if you telnet to localhost on port 3306?
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 09, 2011, 02:56:57 PM
yes of course. And I have other data bases with other logins on the same server.
This is the my.cnf file on /etc/mysql

Code: [Select]
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

Should have to set the MySQLSock param as "/var/run/mysqld/mysqld.sock"  ???
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 09, 2011, 03:53:32 PM
I have do it
Quote
MysqlHost "localhost"
MysqlUser "servicios_chat"
MysqlPass "*******************"
MysqlName "servicios_chat"
MysqlSock "/var/run/mysqld/mysqld.sock"
MysqlPort 3306

But it doesn't work :(
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: katsklaw on April 10, 2011, 06:37:03 PM
what do you mean by "Anope doesn't 'use' the database"? do you mean Anope doesn't dump data to the mysql db, as in the db and tables exist but no data populates the tables? or do you mean you made changes from outside Anope and Anope doesn't see the changes you made?
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 14, 2011, 12:17:16 AM
what do you mean by "Anope doesn't 'use' the database"? do you mean Anope doesn't dump data to the mysql db, as in the db and tables exist but no data populates the tables? or do you mean you made changes from outside Anope and Anope doesn't see the changes you made?

I'm trying to say that Anope doesn't insert any info to the mysql DB. I have created the tables using the mydbgen tool (./mydbgen on console) but they use the binary files from the HDD, but they don't insert any info to the MySQL DB. They work fine but they insert all registered nicknames, channels and everything on the binary files, but not to de MySQL DB.

I've configured the .conf file like this.

MysqlHost "localhost"
MysqlUser "servicios_chat"
MysqlPass "******************"
MysqlName "servicios_chat"
MysqlSock ""
MysqlPort 3306

MysqlSecure "md5"
MysqlRetries 10
MysqlRetryGap 1
UseRDB
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: katsklaw on April 14, 2011, 01:46:03 AM
did you enable sql from IRC? /os set sql on

Additionally, they will always use the .db files. They only dump data to mysql and can load from mysql, but not use mysql in a live state.
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: Jan Milants on April 14, 2011, 09:18:31 AM
normally anope will automatically dump its DB to MySQL if it is configure properly..  enable debug or start anope in debug (./services -support)  and check the logfiles to see what exactly is going wrong..
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 14, 2011, 10:56:17 AM
did you enable sql from IRC? /os set sql on

Additionally, they will always use the .db files. They only dump data to mysql and can load from mysql, but not use mysql in a live state.

[11:55:25] : -OperServ- --(Private notice)-- SQL Unknown option.

 ???
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: Charles Kingsley on April 14, 2011, 10:57:55 AM
When you ran ./Config did it say MySQL: Yes?
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 14, 2011, 11:06:34 AM
normally anope will automatically dump its DB to MySQL if it is configure properly..  enable debug or start anope in debug (./services -support)  and check the logfiles to see what exactly is going wrong..

Code: [Select]
[Apr 14 12:03:39 2011] Loading IRCD Protocol Module: [unreal32]
[Apr 14 12:03:39 2011] status: [0][Module, Okay - No Error]
[Apr 14 12:03:39 2011] Loading Encryption Module: [enc_none]
[Apr 14 12:03:39 2011] status: [0][Module, Okay - No Error]
[Apr 14 12:03:39 2011] Anope 1.8.5 (3037) (ircd protocol: UnrealIRCd 3.2+) starting up
[Apr 14 12:03:39 2011] ns_noticeunregister: module loaded and active.
[Apr 14 12:03:39 2011] NServ v0.1 module loaded.
[Apr 14 12:03:39 2011] Loaded ns_restrictdrop: Only Service Admins and Root will be able to use NickServ Drop
[Apr 14 12:03:39 2011] cs_autolimit.so: Add Command 'AutoLimit' Status: 0
[Apr 14 12:03:39 2011] cs_autolimit.so: DataBase loaded!
[Apr 14 12:03:39 2011] cs_autovoice: Nuevo comando: /msg ChanServ HELP AUTOVOICE
[Apr 14 12:03:39 2011] cs_autovoice: Modulo cargado correctamente.
[Apr 14 12:03:39 2011] [os_massmode]: Module loaded.
[Apr 14 12:03:39 2011] Loading os_statsonid [Status: 0]
[Apr 14 12:03:39 2011] hs_setonhost.c v1.0 by Roy loaded
[Apr 14 12:03:39 2011] Databases loaded
[Apr 14 12:03:39 2011] Info: Reflecting database records.
[Apr 14 12:03:39 2011] Connected to Server 1 (87.106.210.209:4400)
[Apr 14 12:03:39 2011] trying to load [cs_appendtopic]
[Apr 14 12:03:39 2011] [cs_appendtopic] Loaded successfully
[Apr 14 12:03:39 2011] status: [0][Module, Okay - No Error]
[Apr 14 12:03:39 2011] trying to load [cs_enforce]
[Apr 14 12:03:39 2011] status: [0][Module, Okay - No Error]
[Apr 14 12:03:39 2011] trying to load [ns_maxemail]
[Apr 14 12:03:39 2011] status: [0][Module, Okay - No Error]
[Apr 14 12:03:39 2011] trying to load [os_info]
[Apr 14 12:03:39 2011] os_info: Loading configuration directives...
[Apr 14 12:03:39 2011] os_info: Directive OSInfoDBName loaded (os_info.db)...
[Apr 14 12:03:39 2011] status: [0][Module, Okay - No Error]
[Apr 14 12:03:39 2011] trying to load [hs_request]
[Apr 14 12:03:39 2011] hs_request loaded
[Apr 14 12:03:39 2011] status: [0][Module, Okay - No Error]
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 14, 2011, 11:08:41 AM
When you ran ./Config did it say MySQL: Yes?

Yes. I can compile them again. But take a look.


Quote
Allow anope to automatically check for mysql libaries?
unless you get errors with make, there is no need to
change this setting.
[yes]

.................................
................................


configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/bin/anoperc
config.status: creating include/sysconf.h
config.status: include/sysconf.h is unchanged

Modules: Yes
  MySQL: No

What do you think about this?
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: Jan Milants on April 14, 2011, 11:13:51 AM
anope couldn't find the required libraries on your system...
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: Charles Kingsley on April 14, 2011, 11:15:05 AM
Quote
Yes. I can compile them again. But take a look.

You mean no.

You need the development libraries for MySQL libmysqlclient-dev I think
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 14, 2011, 11:15:31 AM
anope couldn't find the required libraries on your system...

I'm using Ubuntu. How can I install them?

apt-get install libmysqlclient-dev

 ???
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: Charles Kingsley on April 14, 2011, 11:17:00 AM
Sounds like a reasonable thing to try.
Title: Re: Problems using MySQL and Anope on Ubuntu 10.04
Post by: neX on April 14, 2011, 11:19:16 AM
FIXED

I used apt-get install libmysqlclient-dev and install the MySQL libraries and it worked great!!

thank you so much!!  ;D ;D ;D ;D ;D