Need help to decipher changing to Barracuda tables

Need help to decipher changing to Barracuda tables

by Deborah Orton -
Number of replies: 17

I am doing fresh install of Moodle 3.2.2 on XAMP localhost on my laptop for devel. purposes.  I have not been able to get my brain to decipher instructions to change DB tables from Antelope to Barracuda.  I've checked forums and online sources and its still not getting through.

I have installed the latest XAMP to include using php7, recommended MySQL.

I set up my database using phpMyAdmin through the XAMP control panel, assigned it as UTF8-unicode-ci using the DB name as sgdp-mdl.

I found a forum post that indicated I should also go to the Variables Tab in phpMyAdmin and find the table listings for INNOdB and change innodb file format max to Barracuda and save.  This I did.

I used the XAMP control panel to get to the php.ini file where I enabled the requested extensions of intl, soap, xmlrpc as well as opcache (although opcache still does not show as enabled no matter what I do - not an issue at this point).

I run the install, choosing to use the MariaDB format.  All goes well except that I get the message that tables need to be in Barracuda format and that innodb large prefix needs to be ON and this is where I get hung up.

I can get to the command prompt on my computer, but when I enter the path to where the Moodle Admin\cli folder is, I get told that this path is not an internal or recognized prompt. (C:\xampp7\htdocs\sgdp-mdl\admin\cli) (screenshot attached)

Can someone walk me through the command prompt portion of converting to Barracuda?  Once I get to the part where I can run the script it seems pretty straightforward, but I appear to be having difficulty getting there from here.

Thanking anyone very much in advance for your help.


Attachment command-prompt.png
Average of ratings: -
In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables

by Bret Miller -
Picture of Particularly helpful Moodlers

Open an administrator command prompt, change to the moodle root directory for the site and then run the CLI command. Note that unless PHP is in your path, you'll need to fully qualify the path to php like:

C:\php56\php.exe admin/cli/mysql_compressed_rows.php 


In reply to Bret Miller

Re: Need help to decipher changing to Barracuda tables

by Deborah Orton -

Thank you Brett for your reply. 

However, as you can see from the attached screenshot, every path name I use to try to get into the moodle directory shows wrong path, file name or syntax.

Can you help me with this part?  My assumption is that I need to get into the Moodle directory first, THEN I can do the command to get into the PHP directory using the command you gave me.  Correct?

But no matter what I type in for the path to get to Moodle, nothing works.  The screen shot should show my file hierarcy on my computer. Hopefully this will help you help me with file path, name or syntax.

Any input most appreciated.

Attachment command-prompt2.png
In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables

by Bret Miller -
Picture of Particularly helpful Moodlers

I don't personally use XAMPP so this is an educated guess based on what you were typing:

cd \xampp7\htdocs\SGDP-mdl

If PHP is in the path, then it's just

php admin\cli\mysql_compressed_rows.php 

If not, then we need to qualify php with the path to it. Maybe something like:

c:\xampp77\php\php  admin\cli\mysql_compressed_rows.php 

Again, since I don't use XAMPP, I'm only guessing where it might put php.

In reply to Bret Miller

Re: Need help to decipher changing to Barracuda tables

by Deborah Orton -
I have managed to get the command prompt to get me as far as the directory

where I installed Moodle.  xampp7>htdocs>SGDP-mdl



This folder has the admin\cli and so on folder and file.  What command

should I use after getting to the Moodle install?



On Tue, Apr 11, 2017 at 6:40 PM, Bret Miller (via Moodle.org) <
In reply to Bret Miller

Re: Need help to decipher changing to Barracuda tables

by Deborah Orton -

Is there another way to do this other than through the command prompt?  I can access myPHPAdmin with its tables directly; I have dreamweaver where I could change code directly...

I just can't seem to get the command prompt to move beyond accessing the path xampp7\htdocs\sgdp-mdl\admin\cli. 

I try to access the mysql_compressed_rows.php with the command to list and it just automatically kicks me into Dreamweaver.  I am at a total loss. 

But seeing as it would kick me into Dreamweaver where I can edit code directly, it made me wonder if there is another way to do this, ie. manually locating and fixing the necessary files?

In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables

by William Stewart -

Deborah, 

There are a few things to do.

First, if you access to php my admin, log in as the root user, and find the variables tab.

Filter/search for innodb and ultimately there are two items you need to simply edit and change the default 'Antelope' setting to 'Barracuda' by writing in 'Barracuda'. See image below.


Innodb file format, and innodb file format max.


To compress the tables, navigate to the cli directory (yourmoodle/admin/cli), simply run the mysql_compressed_rows.php.

 It will show you the list of tables that need to be adjusted, then simply rerun with --fix. (See below)

 I learned this from http://blog.academictools.org/2016/02/moodle-antelope-to-barracuda-conversion.html and found it helpful when I had the same question smile.

Please pardon any strange formatting as a result of some quick copy and paste from this thread (https://moodle.org/mod/forum/discuss.php?d=350560) that I responded to earlier in the week.

billy:cli Billy$ php mysql_compressed_rows.php --list

mdl_data                        Needs fixing

mdl_data_fields                   Needs fixing

mdl_enrol_lti_lti2_consumer       Needs fixing

mdl_enrol_paypal                  Needs fixing

mdl_lti                           Needs fixing

mdl_questionnaire_survey          Needs fixing 

mdl_user                          Needs fixing

mdl_user_info_field              Needs fixing



billy:cli Billy$ php mysql_compressed_rows.php --fix

mdl_data                        Compressed

mdl_data_fields                   Compressed

mdl_enrol_lti_lti2_consumer       Compressed

mdl_enrol_paypal                  Compressed

mdl_lti                           Compressed

mdl_questionnaire_survey         Compressed

mdl_user          Compressed

mdl_questionnaire_survey          Compressed

mdl_user                          Compressed

mdl_user_info_field              Compressed



Average of ratings: Useful (1)
In reply to William Stewart

Re: Need help to decipher changing to Barracuda tables

by Deborah Orton -
Thank you William.  I found that same post and did the first part.  That

was easy.  I thought I had found my answer in your reply - that I could

just navigate within PhpMyAdmin to the admin/cli file and run the scripts

until I realized that I have no tables installed yet.  And that is my

problem.



I cannot get Moodle to install until I can fix these tables, and I cannot

for the life of me and the help of others get through the command prompt

portions to be able to run that --list, --fix command.  Every effort I make

using the command prompt on my local install will only get me as far as the

admin/cli - whenever I try to run the command to list, I get kicked over

into Dreamweaver on my computer with the mysql-compressed-rows.php file on

it.



My file hierarcy is:

C:\xampp\htdocs\sgdp-mdl\admin\cli\mysql-compressed-rows.php  but when I

use command prompt, I can only get the path to go to admin\cli and only if

I put the whole path at once. If I try to do >cd for each level of the

hierarcy, I cannot even get to htdocs.  And if I get as far as the

admin\cli path, that is where everything hangs.  I can't get the command to

work.  If someone would be willing to walk me through the command part, it

would be most appreciated, because I'm obviously not getting the command

portion right.  If I add anything php to it, it comes back as an error.



Seems to me like it would be so much easier if Moodle would let you install

the database, but not let you go any further until you correct them, being

able to do so from within PhpMyAdmin using a sql query.







On Tue, Apr 11, 2017 at 11:51 PM, William Stewart (via Moodle.org) <
In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables

by William Stewart -

Deborah,

Well you can't run the php files from within PhpMyAdmin, you have to execute those on the command line.

But if you haven't actually installed Moodle yet, then there isn't anything to list and fix yet. I'm a bit more confused now. Are you simply trying to install Moodle and getting to the server environment checks?

In reply to William Stewart

Re: Need help to decipher changing to Barracuda tables

by Deborah Orton -
YES! Exactly.  I want to install a new Moodle 3.2.2 on my local xamp server

and I get to the server environment checks and it will not let me install

Moodle until I fix the tables from Antelope to Barracuda.  There is no way

to continue with the installation until this is fixed, but for the life of

me, I cannot get any of the instructions I have been given to work for me.



At this point, I am thinking I will go back to 3.1.5 and forget I ever saw

version 3.2.2



On Wed, Apr 12, 2017 at 8:26 PM, William Stewart (via Moodle.org) <
In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables

by William Stewart -

Deborah,

I specifically only recall 2 warnings related at the server checks screen for that.

One was to change format from Antelope to Barracuda, which for a fresh install, is just that-changing variable name (since you have no tables yet).

The second was changing one of the innodb tables to "ON" since the default is off. 

The specific item, and what to do, should be written in the redbox that appears in the server check warning. If you take a screen shot, it should have those two listed.

In reply to William Stewart

Re: Need help to decipher changing to Barracuda tables RESOLVED sort of

by Deborah Orton -

Thanks all for your help.  I have managed to resolve the installation problem, sort of.  Now I have a new problem which I will research first and start a new thread if necessary.

What I did, for anyone else trying to install a brand new Moodle 3.2.2 (not upgrade) on localhost. 

  • installed a new XAMPP with php 7.1.1
  • Unpacked Moodle3.2.2 zip and put the files under htdocs.
  • went directly to the php.ini file and changed the required environmentals (XMLRPC, Intl, Soap, and opcache.enable). (I have them memorized by now)
  • I then started XAMPP and went to phpMyAdmin
  • I went to the More>Variables menu on the main phpMyAdmin screen and made the database changes to innodb format max, renaming it to Barracuda, and changed the inndoDB large prefix to ON.
  • THEN and ONLY THEN did I create the database in which to install Moodle.  This was the key for me,  Do it before you ever run the install, because if you try to do it after you have begun the install, you already have your database set up and now its all this other command prompt stuff.
  • I then went to my browser and ran the install for Moodle and everything worked fine - as in no environmental warnings.  I was eventually taken to the admin user profile setup page, so Moodle 3.2.2 did install.

HOWEVER: when I hit Continue on the Admin Profile setup page, I got a white screen.  I hit the back button on the browser and I was taken back to the Admin User profile, only now it had sidebar menu's.

I hit continue again, and I keep getting the message, no matter which menu item I select:

"server is redirecting the request for this address in a way that will never complete".  The subitem states the cause may be due to disabling or refusing to accept cookies.  ???? don't recall as that I got the chance to make a choice to begin with.

So, the problem is resolved, sort of.   I made my environmental changes BEFORE I created a database and now I can at least get Moodle 3.2.2 to install.

I will now try researching this white screen/redirect problem.


In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables RESOLVED sort of

by Deborah Orton -

Now resolved completely.

I changed the max memory in the php.ini files to 1024 and manually sent to the Moodledata folder, deleted the cache folder and created a new cache folder, all according to this forum post: 


My Moodle 3.2.2 now works smile !!! (and it only took me 3 days big grin)

In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables RESOLVED sort of

by Usman Asar -
Picture of Plugin developers Picture of Testers

Deborah, Good to know things worked out for you, just for future references, you dont have to manually create "cache" folder, once you delete (usually is recommended to delete both cache and localcache), upon refreshing the page they are automatically recreated.

In reply to Deborah Orton

Re: Need help to decipher changing to Barracuda tables RESOLVED sort of

by César Casados Méndez -
Deborah, Excellent Work! You managed to find the solution; And most importantly, you never gave up on a clean installation of Moodle 3.2., Greetings from Xalapa, México.
In reply to William Stewart

Re: Need help to decipher changing to Barracuda tables

by Usman Asar -
Picture of Plugin developers Picture of Testers

See the beauty of the community forum, learning is always two way, you have learnt something from me (academictools is my blog) and I just have learned from you changing table format in PHPMyAdmin. Cheers for that William!

In reply to Usman Asar

Re: Need help to decipher changing to Barracuda tables

by William Stewart -

Usman,

Small world eh?! Let me say thanks now since that post helped me out last year-I've got it bookmarked for reference for that reason smile.

In reply to William Stewart

Re: Need help to decipher changing to Barracuda tables

by Usman Asar -
Picture of Plugin developers Picture of Testers

Indeed it is, I am building that  blog for core reason of referencing as I need it time to time, still plenty of stuff to go inside that will be updated shortly.