Forums | Mahara Community
Support
/
Moving Mahara site to new server
01 June 2016, 8:06
Hi Matthew,
Did you ever get a reply to this? I have exactly the same problem and error message.
I created a brand new install of Mahara, zipped up the files and database, downloaded to my PC then uploaded to an 'empty' domain account. All was OK except when importing the sql file into the new database and I got precisely the same message.
Others after you seemed to address related problems but I can't see how to deal with this one.
Surely there must be a simple way to migrate Mahara to a new server otherwise you have no means of backing up usefully.
Thanks for any advice.
-----------------------------------------------------------------------------------------------------------------------
Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
ERROR: Unknown Punctuation String @ 12
STR: //
SQL:
DELIMITER //
CREATE TRIGGER `update_unread_delete2_trigger` AFTER DELETE ON `module_multirecipient_userrelation`
FOR EACH ROW BEGIN
IF OLD.read = '0' AND OLD.role = 'recipient' THEN
UPDATE "usr" SET unread = unread - 1 WHERE id = OLD.usr;
END IF;
END
//
SQL query:
DELIMITER // CREATE TRIGGER `update_unread_delete2_trigger` AFTER DELETE ON `module_multirecipient_userrelation` FOR EACH ROW BEGIN IF OLD.read = '0' AND OLD.role = 'recipient' THEN UPDATE "usr" SET unread = unread - 1 WHERE id = OLD.usr; END IF; END //
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"usr" SET unread = unread - 1 WHERE id = OLD.usr;
END IF;
' at line 5
-----------------------------------------------------------------------------------------------------------------------
03 June 2016, 10:38
Hi Matthew,
It could be the format of the Mysql backup. I usually do this:
# From the command line, backup the db:
mysqldump db_name -h localhost -u db_user -ppassword | gzip > /tmp/db_name.sql.gz
Then when I restore it:
# Through the mysql console, drop / create the database
mysql
drop database db_name; # if db already exists
create database db_name CHARACTER SET=UTF8;
ctl-d
# From the command line, restore the backup.
gunzip -c ./tmp/db_name.sql.gz | mysql db_name -u db_user -h localhost -ppassword
Please let me know if this helps.
Cheers,
Ghada
A post by Account deleted was deleted
A post by Account deleted was deleted
A post by Account deleted was deleted
A post by Account deleted was deleted
- «Previous page
- 1
- 2
- 3
- »Next page