Quantcast
Channel: Installing and upgrading help
Viewing all articles
Browse latest Browse all 46762

How to install moodle with database on a different server

$
0
0
by Daniel Lombardo.  

Hi

I am installing Moodle across 2 Centos virtual machines. 1 for application + data, and the other for MySQL

  • mysql55
  • centos 6.4
  • php5.3.3
  • moodle25

Application server IP: 192.168.6.162

Database server IP: 192.168.6.163

I am unable to get past the Database connection:

Using these details for install.php:

Database host: 192.168.6.163
Database name: moodle
Database user: unique-user
Database password: *********
Tables prefix: default
Unix socket: ON

Error: Database connection failed

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php

Warning: mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on '192.168.6.163' (13) in /var/www/html/moodle/lib/dml/mysqli_native_moodle_database.php on line 76

Oh and here are the MySQL user settings for the unique user:

mysql> CREATE DATABASE moodle;
Query OK, 1 row affected (0.00 sec)

mysql> ALTER DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO unique-user@192.168.6.162 IDENTIFIED BY '********';
Query OK, 0 rows affected (0.00 sec)

Please note that I have also tried using the root user and letting install.php create the database automatically - without success - same error in fact. Also tried with Unix socket off.

Additionally, I have tried creating the config.php with nano manually in the terminal. Of course including all the appropriate details for the connection - alas same error message (bar the last part). Tried search the web and forums for this error message - nothing has solved my crisis.

Last words

Advice overcoming this current error and going onward with the installation would be greatly helpful for me. I have limited knowledge of Linux servers but I am enjoying the command line extremely. I have found this page in the docs to be very helpful: http://docs.moodle.org/25/en/CentOS_Linux_installation although I suggest updating the repos by including Webtatic (http://www.webtatic.com/packages/mysql55/) instead of manually downloading the mysql upgrades. Then install using yum - it's sure to be easier to update later, too.

Thanks so much.

D


Viewing all articles
Browse latest Browse all 46762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>