Antelope to barracuda on WIndows

Antelope to barracuda on WIndows

by Heather P -
Number of replies: 37

Hi

I've got the same issue with antelope and barracuda as several other posters seem to have.
Your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format. See the documentation Administration via command line for details of a tool for converting InnoDB tables to Barracuda.

I've seen the threads with a variety of suggestions along the lines of running a php script and I'm struggling with it.

My database is MySQL, but it is not on the same server as the Moodle so I'm not sure how running  php admin/cli/mysql_compressed_rows.php -s  on my Moodle server would help me. 

I don't have php on my Windows server that hosts the MySQL - I'm using the workbench tool to maintain the databases.

I tried running a select statement found (http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-downgrading-procedure-conversion.html ) to identify which tables needed fixing, but it found no rows requiring fixing. Admittedly it does seem to be instructions for an older version of MySQL - we are on version 5.6, so it may well not be looking for what I thought it was.

Can you fix the database directly using MySQL workbench without knowing which tables need fixing.

Basically can anybody point me at some WIndows based instructions for when the database is on a separate server to the Moodle.

Thank you

Heather

Average of ratings: -
In reply to Heather P

Re: Antelope to barracuda on WIndows

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You're almost there! Run...

php admin/cli/mysql_compressed_rows.php -s

...the output is the SQL statements you need to run to fix the problem. You can copy/paste them into your MySQL Workbench and that should be that!

In reply to Howard Miller

Re: Antelope to barracuda on WIndows

by Heather P -

Brilliant.

Thank you. I've given it a go and now I understand.

Regards

In reply to Heather P

Re: Antelope to barracuda on WIndows

by Nick Varney -

If left unchanged can this have an impact on server performance? I have a sluggish Moodle 2.9.4 sandbox instance running on a VM and is one of things I'm looking at.

In reply to Nick Varney

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Nick, although Moodle keeps it as optional, but then there are other things that are kept optional enabling them brings good performance effects on Moodle, so I'd suggest converting DB.

On Windows platform, Open command prompt and go to your PHP folder (say for example it's C:/PHP)

Now run the command, giving the path to your Moodle installation

php c:\inetpub\wwwroot\mymoodle\admin\cli\mysql_compressed_rows.php -l

This will list all the tables that needs conversion, now run the same command using the switch -f

php c:\inetpub\wwwroot\mymoodle\admin\cli\mysql_compressed_rows.php -f

and it will convert tables into Barracuda, you're good to go.

Average of ratings: Useful (2)
In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Nick Varney -

Thank you very much Usman

I applied the changes to the DB successfully but alas this didn't solve the current performance issue. I will obviously need to look elsewhere on that.

In reply to Nick Varney

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Nick, was moodle slow from start or is it you just started experiencing this?

Also, VM will degrade performance, but you can always try working on Database optimization, and see if this brings any changes.
Assuming you are running either of MySQL or MariaDB, you can read further about DB optimization using this link, also MySQL tuning on THIS link.

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Wendi Daniels -

Does anyone who is good at communicating know HOW to "run a command line"? Where do I find my "workbench"? I tried to upgrade from 2.8 to 3, and saw all the changes, so I tried to scale back to 2.9, and it is too late. Please advise. I WILL NOT KNOW WHAT YOU ARE SAYING IF YOU USE LINGO THAT IS UNDERSTOOD TO TECHY PEOPLE. I need common terms and step-by-step instructions.



Howard, you often like to respond with rudeness and smart alec words, and I would rather you keep all of your amazing knowledge to yourself rather than treat me with rudeness.

In reply to Wendi Daniels

Re: Antelope to barracuda on WIndows

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
"who is good at communicating"? Sure there are kind souls, angels and fairies - in their respective domains. The hardned IT crowd in the virtual world worship Murpy, the creator of https://en.wikipedia.org/wiki/Murphy%27s_law, and the survivors are usually old, male cynics.

> HOW to "run a command line"? Where do I find my "workbench"?

That kind of interactions require some intensive communication. I am not sure whether you'll enjoy that.

> I WILL NOT KNOW WHAT YOU ARE SAYING IF YOU USE LINGO THAT IS UNDERSTOOD TO TECHY PEOPLE.

Oh yes, there's ample proof.

> Howard, you often like to respond with rudeness and smart alec words, and I would rather you keep all of your amazing knowledge to yourself rather than treat me with rudeness.

Well, if you master ESP, we all can try hard to communicate in silence.
;-D
In reply to Wendi Daniels

Re: Antelope to barracuda on WIndows

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You are asking for free help.  Starting with insults does not help.

If your upgrade has not gone well, you need to restore the whole site from a backup.  Not knowing anything about your server setup or whether are hosted or not gives us absolutely nothing to go on.  Despite your tone, I am sure many of us would be happy to help but we need a lot more information.

If your site is hosted somewhere, you need to talk to them.  

Average of ratings: Useful (2)
In reply to Wendi Daniels

Re: Antelope to barracuda on WIndows

by Bret Miller -
Picture of Particularly helpful Moodlers

Here's an attempt at answering those questions:

"Command line" is equivalent to "Command Prompt (Admin)" when you right click the Windows button. Or on previous versions of Windows, Right click "Command Prompt" and "Run as adminsitrator". To run Moodle command line options, you'll need to be in your Moodle site directory (where the .php files are).

"Workbench" is a graphical program provided by MySQL to administer MySQL from Windows. You can download it from their website.

Please understand that the help here is free and no one is paid to answer your questions. We tend to assume that if you're running your own Moodle server that you have some basic knowledge of running a server, web server, database and php. Simply stating the fact that you don't have that knowledge and asking for some more detailed help is the best way of getting it.


Average of ratings: Useful (2)
In reply to Bret Miller

HOW to "run a command line"? Where do I find my "workbench"? Botched the (2.8 > 3) upgrade. it is too late. Please advise.

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Bret

I thought the "command line" will show up once the "line of command" is established.
smile

How do you know that OP (in fact https://moodle.org/mod/forum/discuss.php?d=315719#p1322030 just hijacked the thread. The content had no relation to the subject.) uses Windows?
In reply to Visvanath Ratnaweera

Re: HOW to "run a command line"? Where do I find my "workbench"? Botched the (2.8 > 3) upgrade. it is too late. Please advise.

by Bret Miller -
Picture of Particularly helpful Moodlers

Yes, well, Nick and Wendi both should learn not to resurrect old threads. Much better to post your question in your own thread with a subject that describes your problem and as much detail as you can muster so we have a chance to figure out what might be going on.

Resurrecting old threads and being critical makes us who try to help a little grumpy.

Average of ratings: Useful (1)
In reply to Wendi Daniels

Re: Antelope to barracuda on WIndows

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Wendi, could you let us know where you are in your steps?  It sounds like you upgraded from Moodle 2.8 to 3.0, then tried downgrading to 2.9.  You can't downgrade moodle, it doesn't work that way.

Is anything working right now?

Do you have backups of anything?

If your upgrade to Moodle3 was successful, you might need to reinstall Moodle3.

How have you been upgrading and downgrading?  We need to know exactly what steps you did so that we can help.

I most commonly run "the command line" by using an application, like "Terminal" on my Mac.  PC users might use applications like "Putty."  But to run the command line applications, you would also need to know how to SSH into your server.  Do you?

There are other ways to issue commands to your moodle, such as using applications like Workbench.  But most of us who do these things (I don't want to speak for everyone, sorry) probably use a terminal program like Terminal or Putty, and we know how something about SSH.  If your answer is "no" to SSH, this will tell us some good information.

In reply to Rick Jerz

Re: Antelope to barracuda on WIndows

by Wendi Daniels -

I figured it out with the help of another friend, and other threads on Moodle.


For those who are at my level of understanding of this sort of thing.....



The command line is something to be run in SSH (you can download a program called "Putty" for free on the net)


I logged in with my webhosting credentials as "root" user


I entered the following command:  cd  my/moodle/site/directory      and pressed enter


Now in that directory, I entered the "cli" command:  php admin/cli/MySQL_compressed_rows.php and pressed enter, and the site was mostly upgraded to Barracuda.


I then entered the cli command: php admin/cli/MySQL_compressed_rows.php -l to get a list of the lines that needed to be fixed.


I then entered the cli command php admin/cli/MySQL_compressed_rows.php -f to fix those lines, but the system said I must enter them manually in the database.


I entered WHM and from there I went to phpMyAdmin, so that I could be logged in to phpMyAdmin as the root user (often, it seems the userid is simply "root", and you set your password in cpanel). If you log into phpMyAdmin from the cpanel, it is apparently not the same, as you must have "super privileges" which means you need to be logged in as the root user, which means you access phpMyAdmin from WHM. Enough said. I clicked on my root database on the sidebar. On the horizontal menu bar I clicked on MySQL, and I entered those lines that needed to be entered manually, clicked "go" and all is well.







Thanks for all the help. The right click thing did not work, and I was unclear on the instructions, so maybe it was not something workable from my computer. In any case, I am grateful for all who helped me without giving me rudeness and smart-alec remarks. I tip my hat to you.

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Antelope to barracuda on WIndows

by Ahmad Nasuha -

I have use ssh terminal and notified that,, :

Zend OPcache requires Zend Engine API Version 220131226

The Zend Engine API version 220121212 which is isntalled, is outdated.

Cannot change GLOBAL innodb_file_format setting, use --showsql option and execute the statements manualli.!!! Error writing to database !!!

This is screenshoot

thank's

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Christoph Ruda -

Hi Usman,

We have recently set up a test server on Windows Server 2012 R2 following the excellent instructions on your blog. We are currently tracing an issue where Moodle backup .mbz fail to upload. I noticed that our Environment page show the unsupported db table row  format warning. On a previous test server with MySQL I was able to do the conversion following the instructions in your post. The latest test server uses MariaDB. I have been unable to find information how to do this with MariaDB - could you give us a clue or point us in the right direction? Can the conversion script work without MySQL installed?


Many thanks,

Christoph

In reply to Christoph Ruda

Re: Antelope to barracuda on WIndows

by Bret Miller -
Picture of Particularly helpful Moodlers

MariaDB should be functionally equivalent to MySQL so the same procedure should work.

Average of ratings: Useful (1)
In reply to Bret Miller

Re: Antelope to barracuda on WIndows

by Christoph Ruda -

Thanks Bret, it's what I suspected but I lost faith after starting off by making a basic mistake - not specifying the php directory...

In reply to Christoph Ruda

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Hello Christoph, honestly you could have asked for something else wink, I have uploaded another video, converting Antelope to Barracuda on my same blog using MariaDB. you can find the post in the link below, and I have as well mentioned small issue that people may face, changing Global variables format from Antelope to Barracuda, then doing the conversion, I have used HeidiSQL, you can use either of HeidiSQL, PhpMyAdmin or MySQL Bench - all works the  same way.

http://blog.academictools.org/2016/02/moodle-antelope-to-barracuda-conversion.html

Although I am building up all information for my personal use (so mean of me) as I'll be managing my own windows servers later, but later thought it may will be useful for some people else so started blog instead.

Average of ratings: Useful (1)
In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Christoph Ruda -

Amazing! Thanks for adding the info to your blog. i can see immediately where I went wrong. As soon as I'm able to log into our server I'll give it a try (some time next week).

Next I need to find out why .mbz backup files are rejected by our server. I posted in this forum: https://moodle.org/mod/forum/discuss.php?d=318938#p1328304 - you haven't come across this issue by any chance? wink

Anyway, your contribution and help is much appreciated.

In reply to Christoph Ruda

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Christoph, Unfortunately I haven't handled Moodle implementation to a large scale personally to be very confident about everything, but, what comes into my mind is time out error in priority if you're keeping default value of 300, try increasing it. also I have been updating the blog entry, for videos once created cant be edited that easy, so remains text editing, and I did added max.vars_input = 2000 (default is disabled and values to 1000), for moodle has more than 1000 tables so when importing DB in PhpMyAdmin it was giving errors (could be one of the possibility).

Also, go into Site administration > performance > PHP Limit, for newer themes default values to 512MB, if you are using 3.0+ then try increasing it, or in case of older ones set it at maximum to see if it helps restoring large courses.

Lastly,  have you set yours up using PHP 7? as until PHP 7, though 64-bit experiential PHP was available, but it wasn't fully supporting the long integer values in DB, but PHP 7 with full support for 64-bit will bring PHP's performance on windows platform equal to Linux, so large size imports of courses shouldn't be an issue.

Just before making any above changes, just try using barracuda conversion and see if  that works, then start taking turns in terms of above inputs, whatever the outcome to be, let me know so to think of some other possibilities and if fingers crossed it worked, let that know too, may help someone else as last time i spent time with someone having similar issue it all came down to using PHP 7 64-bit, but they couldn't for the WordPress wasn't working on that (may have started working now)


In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Christoph Ruda -

Hi Usman, thanks for your reply. I shall have another look at our php.ini file. It occurred to me that this actually isn't related to file type but indeed file size as the different types I was testing differed significantly in size with the backup file being the biggest. I'll start a new thread (as this is Antelope / Barracuda) once I have more information.

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Christoph Ruda -

Usman, finally I got the chance to have another look at this. I found that the problem with uploading the files is not related to file type but indeed file size.

But first I've attempted the Antelope to Barracuda conversion as you suggested. Thanks for your post and video which were both very helpful. I got an error and then changed the innodb_file_format and innodb_file_format_max to Barracuda. I still got the error together with the suggestion to convert the table manually. After changing the innodb_file_format parameters do I need to 'restart' MySql / MariaDB?

I'm happy to do the manual conversion; it's what I did the last time I came across this. But I'm trying to get to the bottom of this.

In reply to Christoph Ruda

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Hi Christoph,

you dont need to restart DB server, but are you logged in as root user? I mean with the username: root and password that you kept at time of installing MariaDB?

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Christoph Ruda -

Hi Usman,

Only now did I get to having another look at this. I've had another go following the instructions on your blog. I opened the prompt as administrator but I still got the access error as before. I did use the -s flag to show the SQL required and executed it in HeidiSQL. I fixed the problem - so let's move on...

Thanks again for your help.

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by tommy dwi julianto -

hai Usman, I following your tutorial how to convert antelope into barracuda on windows server. I stuck in step 3. Here's the error message.



anyway I following your tutorial to install moodle on windows server, so I'm using maria db too. Do you know how to fix this? and what is the impact if I not convert it?

In reply to tommy dwi julianto

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Tommy, Error is evident, dataroot directory is not writable, have you given permission to IUSR for Modify/Write in your moodledata directory?

Regarding the conversion, there is absolutely no impact in terms of using that i have as well explained in the video of antelope to barracuda conversion, unless you are backing up and restoring large courses, then you can expect this to come handy, else performance wise or functionality wise, no impact at all.

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by tommy dwi julianto -

yes I  already give modify permission to IUSR, but it still showing that error


So is fine if  I just ignore it? 

In reply to tommy dwi julianto

Re: Antelope to barracuda on WIndows

by BISS Edtech -
Hi there, I'm also having the same problem as Tommy. Have checked the permissions on the dataroot folder, it seems fine. Can't find any problems in config.php either ... any suggestions? Thanks!
Attachment Screen Shot 2016-06-08 at 11.54.49.png
In reply to BISS Edtech

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Hi, you are on Apache XAMPP server and not on windows server, and issue that your screen shot is showing is related to your config.php file's host header, if it's mentioned localhost, try using 127.0.0.1 instead and see if that works.

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by BISS Edtech -

Oh right, yes XAMMP on a windows box, sorry.


Tried adjusting $CFG->dbhost    = 'localhost'; to $CFG->dbhost    = '127.0.0.1';, but I'm still getting the same error message. Any other possible fixes?


BTW, I'm trying to change the database format as we are having trouble with a large course backup failing everyday.


Thanks!

In reply to BISS Edtech

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

hi, it's not DB host you should be looking at, it's localhost, as its mentioned HTTP host, means the address you use to access moodle, try changing that and see if that works.

In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by BISS Edtech -

Hi Usman,

The only mention of locahost is in the db config. Did you mean I should try changing  $CFG->wwwroot from the URL to 127.0.0.1?

In reply to tommy dwi julianto

Re: Antelope to barracuda on WIndows

by Usman Asar -
Picture of Plugin developers Picture of Testers

Tommy, hi, sorry for a small delay, yes it's fine if you ignore it as I mentioned  in tutorial that is is recommended but not required, unless you are backing up / restoring large courses, you wont need it.


In reply to Usman Asar

Re: Antelope to barracuda on WIndows

by Champion Aghogho -
HELLO USMAR.

I AM VERY CONFUSED ABOUT THE CONVERSION PROCESS I DONT KNOW WHERE TO PASTE THIS CODE

 php admin/cli/mysql_compressed_rows.php -s 

I AM HOSTING ON A SEVER NOT LOCAL SO AM NOT SURE HOW TO ACCESS MY CMD AND FOLLOW THE PROCESS AM SEEING EVERY WHERE. PLEASE I NEED HELP.