Forums | Mahara Community

Support /
Error sending messages after MYSQL migration


21 May 2014, 21:24

Hi

We have just migrated our Mahara 171 database from localhost to a new external server. Everything looks fine, but when we try to send message, an error appears "A nonrecoverable error occurred. This probably means you have encountered a bug in the system"

We hace found the error at logs, the system is still trying to connect to localhost when is trying to send the message. I've review the value of wwwroot in the config table but it the same than in config.php, and the external database is correctly configurated in config.php

Any idea? Thank a lot

 

[Wed May 21 11:19:03 2014] [error]  [WAR] d9 (lib/errors.php:749) Failed to get a recordset: mysql error: [1449: There is no 'maharauser'@'localhost' registered] in EXECUTE("INSERT INTO "notification_internal_activity"
 ("type", "usr", "ctime", "subject", "message", "urltext", "read", "from") VALUE
S ('2', '146', '2014-05-21 11:19:03', 'Mensaje nuevo de Innovaci\xc3\xb3n Tecnol
\xc3\xb3xica', 'MENSAJE DE PRUEBA', 'Responder', 0, '81')"),

Robert Lyon's profile picture
Posts: 774

22 May 2014, 10:38

Hi,

The table 'notification_internal_activity' has a bunch of triggers on it.

you can see them by logging into your mahara's mysql database and running: SHOW TRIGGERS;

The triggers have Definer set as 'maharauser@localhost'

To solve this problem you can either:

1) Create the mysql user 'maharauser@localhost' on the external server and connect to the db with that user

2) Drop and recreate the triggers while logged into db as the user you are using to connect to mahara with

3) Dump the database, edit the dump file and change the 'Definer=maharauser@localhost' to whatever you need it to be and then re-import the database

Cheers

Robert

23 May 2014, 21:08

Thanks Robert

I've created the user maharauser@localhost and it works! but we need to give him the SUPER privilege on mysql. Is there any way to do it without this privilege?

[Fri May 23 10:57:51 2014] [error] [client 193.144.48.59] [WAR] 54 (lib/dml.php:
1068) Failed to get a recordset: mysql error: [1227: Access denied; you need the
 SUPER privilege for this operation] in EXECUTE("INSERT INTO "notification_inter
nal_activity" ("type", "usr", "ctime", "subject", "message", "urltext", "read",
"from") VALUES ('2', '146', '2014-05-23 10:57:51',

 

I've looked for triggers with SHOW TRIGGERS but mysql sent me an "empty set". Next week i try to make a dump of database and I'll try to look for @localhost in it

Robert Lyon's profile picture
Posts: 774

30 May 2014, 7:58

From what I read here -> http://stackoverflow.com/questions/1404107/permissions-for-creating-a-trigger-in-mysql

It might be possilbe to allow triggers without granting the SUPER privilege to the user.

You could try the comment:

  "Another way to create trigger without SUPER privilege by adding the following line to my.cnf or my.ini log_bin_trust_function_creators = 1"

I've not tried it myself - as I only use mysql on my local machine for testing (use Postgres in production)

Let me know if it helps

Cheers

Robert

 

4 results