mysql 5.5.55 and mysql 5.5.53

mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -
Number of replies: 26
Hello,
I am trying to create a test environment for our production.
We are using ubuntu 14.04 mysql5.5.53 ,php 5.5.9,moodle 2.9,apache2 2.4.7.
How do I install whole LAMP with above configuration..?
We are trying to build a exact copy of my environment
I couldn't find mysql 5.5.53 version..
How could I install mysql 5.5.53 version on ubuntu?
I tried to install mysql 5.5.55 version.But it seems like my database is not compatible with that?
Please advise.


Average of ratings: -
In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,

When I install mysql 5.5.55, I am getting following error:


Please help me out for this..

error

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Rahul Rai -

Hi Ripe

I think, That is your database connectivity problem.

Please recheck your credentials in  config.php .

In reply to Rahul Rai

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,


I am attaching my configuration file. Please advise.

<?php  // Moodle configuration file


unset($CFG);

global $CFG;

$CFG = new stdClass();


$CFG->dbtype    = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'localhost';

$CFG->dbname    = 'mydb';

$CFG->dbuser    = 'myuser';

$CFG->dbpass    = 'mypwd';

$CFG->prefix    = 'm_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbsocket' => 1,

);


$CFG->wwwroot   = 'http://172.20.1.171';




In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

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

What version of Moodle are you trying to run?

I would normally just go with the versions of software provided by Ubuntu. That makes them very easy to install. 14.04 is very old now and will not have versions compatible with the latest Moodle. 

It's a LOT easier to update the Ubuntu version than it is to install newer versions of PHP, MySQL etc..  However, it's not impossible and there's lots of documentation online. 

In reply to Howard Miller

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,


Thanks for your reply. We are planning to upgrade production in the end of July. Consequently, I am trying to make an exact copy of production. 

Thus, I can test it out. My production environment contains Ubuntu 14.04.5 LTS, PHP 5.5.9, mysql 5.5.53, moodle 2.9+, apache 2.4.7.

 I could not make a clone environment because of VMware environment and 1200GB disk space. Therefore, I have decided to copy three folders

 from the production: moodle database, moodle and moodledata folder. Later, I concentrated on my test. I have installed ubuntu 14.04, afterwards

 I install LAMP. However, when I installed LAMP, I am getting php 5.5.9 mysql 5.5.55, apache 2.4.7 which apparently same besides the mysql version...

Therefore, I am thinking that the above connection error that I am getting is probably linked to mysql version difference. I am trying to find mysql 

5.5.53 and install. I did not get any success. Do you have any idea? How could I install mysql version 5.5.53?   

Please help me out to install mysql 5.5.53 version or give me another alternative or feasible way to deal with this situation..


Thanks

 

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

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

It's not... MySQL 5.5.55 should work fine with Moodle 2.9 (minimum requirement is 5.5.31).

You did start MySQL did you? There's *mountains* of information on the Internet about setting up Lamp on Ubuntu

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

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,


I solved this issue by creating user in mysql database which is referred in config.php..That took care of my issue,..Now I ran into another problem..It seems like making a clone is not an easy task that I was thinking about that...When I tried to connect through my IP address 172.20.1.171.It automatically connect to the https://172.20.1.171/login/index.php and it says unable to connect on the browser.Any ideas? I am attaching a screenshot.. php,mysql,apache2 is running.. I don't have any firewall status..

error

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

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

Do you have https (as opposed to http) set up on your server? That is port 443 open?

It isn't by default.

In reply to Howard Miller

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,


This is my test server. I don't have https set up.. It seems like I am copying three files moodle database,moodle,moodledata from the production side. It is conflicted with my test environment and I don't know how to solve that.. I just checked my production and production setup is https://mysite.com/login/index.php..

Do you have any idea how to look into that?


Please advise...


Thanks

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

Is this literally how you migrated the files from production to test server? ...

"copying three files"

With databases, think one needs to make a mysqldump of the database for Moodle on the production server.   Transfer that .sql file to the test server.  Import the .sql file into a database for moodle on the test server.  One could rsync even database files but then one does need to make sure the location of the database files are in the location where MySQL (any version) is programmed by default to find/use them.

Tar bar code ... xfer tar ball ... un-tar in proper location.   Do same for data directory.

No offense ... but the number and nature of your postings appears to be rather fast.   By the time one attempts to help with one issue, you've solved or tried something different (right or wrong), it appears to work, then you're off into the next issue.

Uhhh ... take the time to read the docs on migrating a site.   Slow down!!!! ;)

'spirit of sharing', Ken


In reply to Ken Task

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

I know I am posting too many issues today. I have deadline to finish this things and it seems to me very tedious. So I am trying to finish this things. I have already done migration before. however, it wiped out from my mind..and again...I need to apply that things...

Apparently, I finish with the migration...Now I am trying to access my moodle with my new configuration...and I don't know what's going on...

Config.php setup: $CFG->wwwroot=http://172.20.1.171

however, when I write 172.20.1.171 on browser. I am redirecting to https://172.20.1.171/login/index.php.. Do you have any idea about that??


I didn't find anything written that I need to make a fresh install before migration. However, I want to ask about this..

Do I need to make a fresh install copy of the same version before migration??


Thanks

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

Haste is making waist/mistakes that you will eventually have to re-fix.

Use Offficial Ubuntu docs in setup/understanding of Apache and MySQL

Is the test server to be accessible from outside the private lan?

Then open only port 80 in boundary firewall

Is the test server to be using a fully qualified domain name?

Then make entries in both internal DNS (external DNS also if test server
to be accessed from outside private LAN/WAN) for the server
The FQDN must be the same for both inside and outside DNS
if server is to be accessed from outside.

Setup Apache Ubuntu
https://help.ubuntu.com/lts/serverguide/httpd.html

https ??? if outside traffic isn't going to be allowed to test server
don't think you need https.

https://www.digicert.com/ssl-certificate-installation-ubuntu-server-with-apache2.htm
That's one *** example ***. for a test server to run https one would need
to either use a domain global certificate (which you probably don't control)
or purchase another certificate just for the test server.
Again ... for your purposes, https vs http may not make a difference.

MySQL
https://help.ubuntu.com/lts/serverguide/mysql.html

Once you have apache responding and mysql installed and responding (to command line)
you are then ready to migrate the moodle code, the moodle DB, and the moodle data
directory to the test site.

https://docs.moodle.org/32/en/Moodle_migration

Things you need to know about the new environment:

document root for apache (location)

where you can un-archive moodledata so that apache server and read/write to it.

how to import the sql dump from the production server into the database
you have created for the test server moodle.
DB user, DB password, DB name, type of DB is mysqli (more than likely).
Also one has to edit the config.php file for new host name, etc.

Finally, login to test server ... credentials you had on production server
would/should be the same ... a manual account.
Then run the search and replace tool to change all the db info for internal
links that pointed to https://productionserver/
to http://internalserver.

'spirit of sharing', Ken


In reply to Ken Task

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,


I followed your direction without making a hurry, step by step..and I am still getting a same error. 

I removed apache,php,mysql and reinstall it..and it was working fine..

I am using external harddrive to mount moodledata folder because of the 500GB size. 

sudo umount /media/ripa/moodledata

sudo mount /dev/sdb1 /media/USB

and then I am linking that moodledata folder in/var/moodledata folder.

sudo ln -s /media/USB/moodledata /var

and then I am giving permission in both side

sudo chmod -R 755 /var/www

sudo chmod -R 777 /var/moodledata

sudo chmod -R 777 /media/USB/moodledata

sudo chown -R www-data:www-data /media/USB/moodledata

sudo chown -R www-data:www-data /var/moodledata

But no luck.. I am still getting the same message from moodle side..


I am also attaching my config file which is located under /var/www

<?php  // Moodle configuration file


unset($CFG);

global $CFG;

$CFG = new stdClass();


$CFG->dbtype    = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'localhost';

$CFG->dbname    = 'moodle';

$CFG->dbuser    = 'db';

$CFG->dbpass    = 'pass';

$CFG->prefix    = 'm_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbsocket' => 1,

);


$CFG->wwwroot   = 'http://172.20.1.171';


And default.conf which is located under /etc/apache2/000-default.conf


        ServerAdmin webmaster@localhost

        DocumentRoot /var/www



When I write http://172.20.1.171, it automatically redirects to https://172.20.1.171/login/index.php..

Any ideas?


err


I don't know what to do now...

Thanks

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

Can see we are going to have to take this a step at a time:

"I removed apache,php,mysql and reinstall it..and it was working fine.."

Prove that statement ... apache, php, mysqld working fine.  

IF apache was working fine then one would see intially a welcome page.

Did you see a welcome page?   Did you read page ... about sites_available and sites_enabled?

If you put an index.html page that had nothing in it but 'It Work's', in  directory you think is document root, when accessing the site via IP address/ does that page display?  ('It Works')

IF php was installed and working with all the extensions needed by Moodle, what did php -m show?

IF MySQL was installed and working, what would:

ps aux |grep mysqld

show?

Did you know the superuser for MySQL and did you create user for Moodle?

The page not found error is coming from Yandex???!!!???   Shouldn't that not found be coming from the apache service at that IP address?  (yes it should).

'spirit of sharing', Ken


In reply to Ken Task

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

I couldn't see apache when I write ip on browser..Now it is working fine. I am attaching a screenshot here

However, I don't know how to redirect to my moodle...

Now when I write ip address , I am only redirecting to apache not the moodle...

/etc/apache2/sites-available/000-default.conf


<VirtualHost *:80>

        # The ServerName directive sets the request scheme, hostname and port t$

        # the server uses to identify itself. This is used when creating

        # redirection URLs. In the context of virtual hosts, the ServerName

        # specifies what hostname must appear in the request's Host: header to

        # match this virtual host. For the default virtual host (this file) this

        # value is not decisive as it is used as a last resort host regardless.

        # However, you must set it for any further virtual host explicitly.

        #ServerName www.example.com


        ServerAdmin webmaster@localhost

        DocumentRoot /var/www


        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,

        # error, crit, alert, emerg.

        # It is also possible to configure the loglevel for particular

        # modules, e.g.

        #LogLevel info ssl:warn

My super user for mysql is root and password...

I am attaching my config file here...

my moodle is located in /var/www folder..

<?php  // Moodle configuration file


unset($CFG);

global $CFG;

$CFG = new stdClass();


$CFG->dbtype    = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'localhost';

$CFG->dbname    = 'moodle';

$CFG->dbuser    = 'db';

$CFG->dbpass    = 'pass';

$CFG->prefix    = 'm_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbsocket' => 1,

);


$CFG->wwwroot   = 'http://172.20.1.171';

$CFG->dataroot  = '/var/moodledata';

$CFG->admin     = 'xyz';


$CFG->directorypermissions = 0777;


                               


mer

php


apache

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

Going to http://yourip/ won't automagically re-direct anywhere ... it will show the welcome page ... of which you have a screen shot above.

Concerning the php info page screen shot:

https://docs.moodle.org/33/en/PHP#PHP_Extensions_and_libraries

What url did you use to get to the that php info page?

IF the moodle code is in /var/www/ there will be an index.php file and that's also where your config.php file is located.

So what do the following show?

cd /var/www/html/

ls -l config.php

or cd /var/

find ./ -name config.php

See anything different from your command to see if mysqld is running with the same command issued just below on a server where the mysqld daemon is running:

[root@sos ~]# ps aux |grep mysqld
mysql     7131  0.0  0.0 113248  1604 ?        Ss   Jul08   0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
mysql     7393  0.1  4.5 6124444 734988 ?      Sl   Jul08  12:28 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

You are getting closer! ;)

'spirit of sharing', Ken


In reply to Ken Task

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,

I referred below link and I am also following same step which mentioned in that below link,,,

cd /var/www/html/moodle/info.php

I have created info.php to see php information

I just changed the documentRoot location from /var/www to /var/www/html in 000-default.conf

default

and I created moodle folder and I transferred all data /var/ww to /var/www/html/moodle to see if I can access moodle site or not.

But unfortunately I am not..


Going to http://yourip/ won't automagically re-direct anywhere ... it will show the welcome page ... of which you have a screen shot above.

Concerning the php info page screen shot:

https://docs.moodle.org/33/en/PHP#PHP_Extensions_and_libraries

What url did you use to get to the that php info page?

I am using 172.20.1.171/info.php which is resided under /var/www/html/moodle.


Then I disable https from prefix_config in moodle database. I changed from 1 to 0.

Then I assign permission to moodledata external hard drive.media


By making changes into /etc/fstab ...

Then I also make changes into config.php

dbsocket->3306 in place of one and $CFG->dataroot='/media/USB/moodledata';

$CFG->loginhttps=false;

config

But when I tried to access my site through http://172.20.1.171/moodle

I am getting same manage. Although now it is not redirecting to https..

However, I do not access my moodlesite...

Thanks



In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

Basic concept for any application (like Moodle, WordPress, Joomla, Drupal, etc.) ... php scripts *talk to the database* for the app.    So a mysqld service/daemon must be running and the moodle.sql file must be imported into a moodle database in the DB server.

Review the install of MySQL and the migration documents at Moodle.org again.

Document root for apache is /var/www/html/   That's good.

The info.php file is a copy of the info.php file that was in Moodle code.

The moodle code is all in /var/www/html/moodle/

So the URL to your site is http://ip/moodle/

BUT ... no https ... get that out of your head for now ... forget doing anything to change/redirect OR anything for https.
REVERse ANYTHING YOU"VE CHNAGEd fOR HTTPS
SEEM TO BE HAVING KEYBOARD ISSUES WITH THE EDITOR not shouting.

Anyhoo ... review the docs for migrating the DB.   Get the MYSQL server up and the .sql file from production imported into the database you've created on the test site.

'spirit of sharing', Ken

In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

Part 2

What's in 000-default.conf?

And is there a symlink in sites_enabled to the '000-default.conf' file.

Stuff related to moodledata ....

sudo umount /media/ripa/moodledata

Why were you unmounting above?  PEN drive device named 'ripa'?   Is there a 'moodledata' dirctory there on the PEN drive?

sudo mount /dev/sdb1 /media/USB

above is supposed to mount a device labled sbd1 which you are calling /media/USB/

So when you make that mount, do you check what the operating system sees by:

ls /media/USB/

What does it see?

and then I am linking that moodledata folder in/var/moodledata folder.

sudo ln -s /media/USB/moodledata /var

man ln

shows the usage of the ln (symlink) command.

ln -fs /media/USA/moodledata is correct *IF* there is a moodledata directory there.

LN(1)                            User Commands                           LN(1)

NAME
       ln - make links between files

SYNOPSIS
       ln [OPTION]... [-T] TARGET LINK_NAME   (1st form)
       ln [OPTION]... TARGET                  (2nd form)
       ln [OPTION]... TARGET... DIRECTORY     (3rd form)
       ln [OPTION]... -t DIRECTORY TARGET...  (4th form)

The last part ... the /var is to an existing partition that should already exist ... it's where you find document root of apache ... /var/www/html?

IF you have located/mounted things properly the symlink might be made from

/var/www/ (document root for apache with the moodle code in html for moodledata that points to the mount point @ /media/USB/moodledata/

IF the symlink is correct ... one should be able to change to the directory where is shows in a ls -l

then ls -l [thesymlink] and see the contents you know belongs in moodleata.

Also, in your config.php ... you are showing information about the DB server (which is localhost) but you are not showing how moodle knows where to find moodledata.

It all begins with apache, php and mysql ... don't have those right ... not getting to moodle. :|

'spirit of sharing', Ken

PS ... if there are any Ubuntu users in Moodledum in these forums, feel free to jump in here ... at any time!



In reply to Ken Task

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello,

000-default.conf file is located under sites-enabled folder in apache...It is for Document root..

What's in 000-default.conf?

And is there a symlink in sites_enabled to the '000-default.conf' file.

symlink


(2)

By this i am renaming the mount device which is located under /media..

or in another words I am transferring data from ripa to USB..

Stuff related to moodledata ....

sudo umount /media/ripa/moodledata

Why were you unmounting above?  PEN drive device named 'ripa'?   Is there a 'moodledata' dirctory there on the PEN drive?

sudo mount /dev/sdb1 /media/USB

above is supposed to mount a device labled sbd1 which you are calling /media/USB/

So when you make that mount, do you check what the operating system sees by:

ls /media/USB/

What does it see?

media


I am working with moodledata and moodle code directory.. I will get back to you when it is done.


Thanks




In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

according to the last screen snap. the variable for the path to moodledata in config.php should be:

//=========================================================================
// 3. DATA FILES LOCATION
//=========================================================================
// Now you need a place where Moodle can save uploaded files.  This
// directory should be readable AND WRITEABLE by the web server user
// (usually 'nobody' or 'apache'), but it should not be accessible
// directly via the web.
//
// - On hosting systems you might need to make sure that your "group" has
//   no permissions at all, but that "others" have full permissions.
//
// - On Windows systems you might specify something like 'c:\moodledata'

$CFG->dataroot  = '/media/USB/moodledata';

The moodledata directory should be made readable/writable by the apache user/group which on Ubuntu is www-data:

cd /media/USB/

chown www-data:www-data moodledata -R

chmod ugo+rwx moodledata -R

ls -lR moodledata |more

should show files/diretories like this one for filedir:

drwxrwsrwx. 257  www-data www-data   8192 Sep 14  2016 filedir

'spirit of sharing', Ken


In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

I understand the reason for using the PEN drive USB ... only thing you had that could hold un-tarred moodledata.   Understandable ... but, make sure you don't remove the PEN drive.   If you do, the test Moodle is broken ... can't even log into it as a sessions file for any user that logs on is written to moodledata/sessions.

Also watch free space left on the PEN drive.

df -h

Disk Free space ... show in humanly understandable values

will show capacity, space used, and free space remaining.

Run out of room on the PEN drive and again Moodle cannot be used.

If you restart the Ubuntu server and after reboot, moodle throws an error, check to see if, after the reboot, Ubuntu automagically remounted the PEN drive.  If it didn't, mount the pen drive.

I had a test server like yours once ... was fine until the pen drive crashed. :\

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: mysql 5.5.55 and mysql 5.5.53

by Ripa Desai -

Hello Ken, 

 
 

Thanks for your help. LAMP is working fine... 

I solved that issue by applying following steps: 

 
 

I tried to install a existing version(2.9+) of moodle by

Cd /opt

Sudo git clone git://git.moodle.org/moodle.git

Cd moodle

Sudo git branch –a

Sudo git branch –track MOODLE_29_STABLE origin/MOODLE_29_STABLE

Sudo git checkout MOODLE_29_STABLE

 

Sudo cp –R /opt/moodle /var/www/html

Sudo chmod –R 755 /var/www/html/moodle


I also changed wwwroot path to my test environment’s ip address. 

I create an empty database called moodle and checked through the browser that it is working or 

not. 

Thus, when I went to the browser, I can see upgrade steps. 

Subsequently, I have replaced moodle new folder with the production folder. 

Afterwards, I tried again to access moodle through the browser, and it was working fine. 

Then I copy moodle production database with the empty database and create a user whose 

credentials match with moodle config.php file. 

sudo mysql -u root -p moodle < moodleclone.sql 

Now I can see exact replica of my production.

Thanks Ken. I appreciated for your tireless efforts to solve this problem..

I appreciated.

Thanks 


In reply to Ripa Desai

Re: mysql 5.5.55 and mysql 5.5.53

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome and congrats!!   The 'moodle journey' now begins! ;)

'spirit of sharing', Ken