Koozali.org: home of the SME Server

[Announce] Moodle 2.5 for SME 8.0

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #15 on: December 23, 2013, 06:42:04 PM »
I have reset the password according to instructions here:

http://wiki.contribs.org/MySQL#Resetting_the_MySQL_root_password

Code: [Select]
cd /var/service/mysqld
sv d .
expand-template /root/.my.cnf
expand-template /var/service/mysqld/set.password
/usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < ./set.password
sv u .

But when I run,

Code: [Select]
/etc/e-smith/events/actions/mysql-dump-tables
I am still getting the same errors:

Quote
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #16 on: December 23, 2013, 08:41:33 PM »
From that same MySQL manual page, I disable the InnoDB engine,

Code: [Select]
db configuration setprop mysqld InnoDB disabled
expand-template /etc/my.cnf
sv t /service/mysqld

And now the error returned when I manually run mysql-dump-tables is,

Quote
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

From the manual page again, I restore the InnoDB tables,

Code: [Select]
db configuration setprop mysqld InnoDB enabled
expand-template /etc/my.cnf
sv t /service/mysqld

 and once again I get error 1044.

Quote
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES

I tried scheduling a backup through the server-manager after disabling InnoDB and I am getting reports again about successful backups.  But, the user preferences in the email are not available.  I get a little report at the top of the mail display,

Quote
The preferences backend is currently unavailable and your preferences have not been loaded. You may continue to use the system with default settings.

So disabling InnoDB appears to disable the default settings in Horde.  Horde is still otherwise working OK.

It looks as though InnoDB might play a role.  How to fix the user preferences in Horde?  What else in SME uses the InnoDB tables that might be effected?
« Last Edit: December 23, 2013, 08:51:58 PM by LANMonkey »

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #17 on: December 24, 2013, 01:59:52 AM »
Try adding the "-x" option to mysqldump:
Code: [Select]
for db in $(mysql -BNre "show databases;"); do mysqldump -x --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || exit 1; done

I had to do this when adapting /etc/e-smith/events/actions/mysql-dump-tables to backup mariadb:
http://wiki.contribs.org/User_talk:Mmccarn#.2Fetc.2Fe-smith.2Fevents.2Factions.2Fmariadb-dump-tables

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #18 on: December 24, 2013, 05:46:56 AM »
OK.  I copied and pasted that code into my PuTTY command line and entered it and PuTTY promptly exited.  I logged back in and looked in the directory that was the target for the dump and found "information_schema.dump.  That was the only .dump file there.

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #19 on: December 24, 2013, 06:43:28 PM »
I have also installed this database on SME 9.0 Beta 2.  Logged on to this server, I run,

Code: [Select]
/etc/e-smith/events/actions/mysql-dump-tables
and get an entirely different error,

Quote
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `PARAMETERS`': Cannot load from mysql.proc. The table is probably corrupted (1548)

But if I schedule a backup through the server-manager, I get the same errors that I get in SME 8.0,

Quote
Backup terminated: pre-backup failed - status: 256

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #20 on: December 25, 2013, 10:42:31 PM »
I did a little research on the error I get when running mysql-dump-tables in SME 9.0 Beta 2 and made some progress

Quote
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `PARAMETERS`': Cannot load from mysql.proc. The table is probably corrupted (1548)

and found this tip here:

http://dba.stackexchange.com/questions/956/resolving-issue-with-mysql-proc-after-upgrading-mysql-from-5-0-to-5-1

On SME 9.0 Beta 2, I tried running,

Code: [Select]
mysql_upgrade --force
/usr/bin/sv t mysqld

And now I get no errors back when I run, " /etc/e-smith/events/actions/mysql-dump-tables"

On SME 8.0, I tried doing the same thing, but continue to get the same errors back when I run mysql-dump-tables:

Quote
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES

So since I am getting no errors back when I run mysql-dump-tables in SME 9.0 Beta 2, I assume the problem is solved there.  I wanted to try running a scheduled backup, but for some reason, I cannot access my user share on my Windows Home Server from this Beta machine.

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0 [PROBLEM SOLVED]
« Reply #21 on: January 01, 2014, 11:10:21 PM »
Try adding the "-x" option to mysqldump:
Code: [Select]
for db in $(mysql -BNre "show databases;"); do mysqldump -x --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || exit 1; done

I had to do this when adapting /etc/e-smith/events/actions/mysql-dump-tables to backup mariadb:
http://wiki.contribs.org/User_talk:Mmccarn#.2Fetc.2Fe-smith.2Fevents.2Factions.2Fmariadb-dump-tables

I completely misunderstood this instruction.  I thought the poster was recommending a command line to test the installation.  No, the poster was talking about actually altering the file /etc/e-smith/events/actions/mysql-dump-tables.  I did this as instructed and ran that script - which is what I had been doing - /etc/e-smith/events/actions/mysql-dump-tables and only got the following error message:

Quote
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

I tried scheduling a backup and the backups are working.

[PROBLEM SOLVED]

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #22 on: December 12, 2014, 06:31:09 PM »
I'm back again for this fix.  An update or something has replaced the mysqldump script with one without the "-x".

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #23 on: December 12, 2014, 08:35:04 PM »
I have tried all of the above fixes, but I am still having problems.  To review, I've done the following,

Added the "-x" in the code below in mysqldump:

Code: [Select]
for db in $(mysql -BNre "show databases;"); do mysqldump -x --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || exit 1; done
Tried restoring the password as outlined here:

http://wiki.contribs.org/MySQL#Resetting_the_MySQL_root_password

Code: [Select]
cd /var/service/mysqld
sv d .
expand-template /root/.my.cnf
expand-template /var/service/mysqld/set.password
/usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < ./set.password
sv u .

I also have tried enabling and disabling the InnoDB tables as described above.

I am now getting this error when running the /etc/e-smith/events/actions/mysql-dump-tables script:

"mysqldump: Couldn't execute 'show create table `atkin_relations_reord_vw_2`': View 'connectivity.atkin_relations_reord_vw_2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)"

There appears to be another problem with root again.

Any ideas, anyone?

Offline LANMonkey

  • ****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: [Announce] Moodle 2.5 for SME 8.0
« Reply #24 on: December 12, 2014, 09:24:38 PM »
I assumed this was another problem with root.  It is not, I deleted the offending views and this problem is gone.