Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Problem Complying Anope with mySQL.  (Read 3417 times)

0 Members and 1 Guest are viewing this topic.

Jorge

  • Anope User
  • Offline Offline
  • Posts: 3
Problem Complying Anope with mySQL.
« on: May 09, 2017, 09:44:53 PM »

Hello guys, I'm having problems with the m_mysql module compilation, the configurations of modules.conf and services.conf are fine as I leave here as it has been:

Services.conf :
Code: [Select]

module
{
        name = "db_sql"
        #name = "db_sql_live"

        /*
         * The SQL service db_sql(_live) should use, these are configured in modules.conf.
         * For MySQL, this should probably be mysql/main.
         */
        engine = "mysql/main"

        /*
         * An optional prefix to prepended to the name of each created table.
         * Do not use the same prefix for other programs.
         */
        prefix = "anope_db_"




modules.conf

Code: [Select]
module
{
        name = "m_mysql"

        mysql
        {
                /* The name of this service. */
                name = "mysql/main"
                database = "useranope"
                server = "localhost"
                username = "useranope"
                password = "password34434"
                port = 3306
        }
}

I have been seeing the same problem but in the version of the anope 1.8.x / 1.7.x which I leave the link: https://forum.anope.org/index.php?topic=301.0


My problem is that running the services in debug mode I get the following error:

Code: [Select]
anope@vps126400:~/services/bin$ ./services -nofork -debug | grep sq

......................
[May 09 16:35:18.548756 2017] Debug: Trying to load module: m_mysql
[May 09 16:35:18.551357 2017] Debug: MySQL: Unable to connect to MySQL service mysql/main: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[May 09 16:35:18.551440 2017] Debug: Module m_mysql loaded.



And is that I have installed the lampp that comes with the apache2 + Mysql + php + phpmyadmin packages and I want to run the services on that socket path since I have seen this in "/opt/lampp/var/mysql/mysql.sock" and at The compilation looks like this route by default: "/var/run/mysqld/mysqld.sock".

I installed the liberia and dependencies with the following command:

Code: [Select]
#apt-get install libmysqlclient-dev
I would like to know if there is an option like in previous versions of anope when you did:
Code: [Select]
./configure --with-mysqlclient-prefix = / opt / lampp / mysql
Or if someone can give me a solution to be able to change the default path that is "/var/run/mysqld/mysqld.sock" to the lampp path that is "/opt/lampp/var/mysql/mysql.sock"


I await your contributions, thank you very much
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 169
    • French Eggdrop community
Re: Problem Complying Anope with mySQL.
« Reply #1 on: May 11, 2017, 10:00:14 AM »

Before compiling, did you activate m_mysql using ./extras ?
And can you access to your database using the mysql command line tool ?

Jorge

  • Anope User
  • Offline Offline
  • Posts: 3
Re: Problem Complying Anope with mySQL.
« Reply #2 on: May 11, 2017, 04:18:01 PM »

Before compiling, did you activate m_mysql using ./extras ?
And can you access to your database using the mysql command line tool ?

Hello thanks for replying, yes activate the module in ./extras. In command line as is lampp could not enter mysql, so I had to see the lampp's settings to see where the mysql.socket was.

As I have not been able to solve it, please unplug the lampp I made separate apache2, mysql and phpmyadmin installations and now I connect but I have a new problem that when I shut down the services and reload them with any command (either ./anoperc or ./services) The service is normal but in my status of the inspIRD server I get the following error:


Code: [Select]
10:15  irc.servert.com  *** Successfully rehashed server.
10:15 irc.server.com  *** ANNOUNCEMENT: *** Successfully rehashed server.
10:15  irc.server.com  *** ANNOUNCEMENT: WARNING: No regex engine loaded - Filter functionality disabled until this is corrected.
10:15  irc.server.com  *** ANNOUNCEMENT: database: cannot create new db: Permission denied (13)


135/5000
I am interested to know what this error means:

Code: [Select]
ANNOUNCEMENT: database: can not create new db: Permission denied (13)

And how to solve it

Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 169
    • French Eggdrop community
Re: Problem Complying Anope with mySQL.
« Reply #3 on: May 12, 2017, 12:48:15 PM »

I think you have to create the DB (your anope user haven't the right to do that), and give all the rights to the user on the DB. Then, it will create the tables and triggers.

Jorge

  • Anope User
  • Offline Offline
  • Posts: 3
Re: Problem Complying Anope with mySQL.
« Reply #4 on: May 12, 2017, 11:46:50 PM »

I think you have to create the DB (your anope user haven't the right to do that), and give all the rights to the user on the DB. Then, it will create the tables and triggers.

Thanks for your reply, I created a user exclusively a database created previously and I have given the necessary permissions, I have solved that fastifioso message by executing the command:


1.-
Code: [Select]
shell/home/jorge/inspircd$ /bin/inspircd --start2.- 
Code: [Select]
shell/home/jorge/services$ /bin/services

So the ircd server does not show the error, it is not a good solution but I stop annoying if there is an administrator or someone who understands the subject I would be very grateful to collaborate with a solution
Logged
Pages: [1]   Go Up