Forum Problems Installing LAMS: PROBLEM Integ Moodle & LAMS


 
You may request notification for PROBLEM Integ Moodle & LAMS.
Search: 

1: PROBLEM Integ Moodle & LAMS
01/02/06 08:38 AM
[ Reply | Forward ]
Hi,
I have installed Moodle and LAMS separately.

When I start one the other does not start.
Both independenlty are working.

I shall be grateful if I could be advised where I am going wrong and how to approach the Integration using the same server.

I see that I have two My SQL servers installed.

The problem I face is that I cannot connect to the application on the test server.

Regards

Garry

Posted by Bhupinder Singh

2: Re: PROBLEM Integ Moodle & LAMS
In response to 1 01/02/06 06:42 PM
[ Reply | Forward ]
Having two MySQL servers may be the problem. Each will run on its own, but both may have problems running at the same time.

Assuming they are running on the same physical machine, it would be a better idea to have Moodle and LAMS use a single instance of MySQL.

From here you can either start from scratch by uninstalling either LAMS or Moodle, and then reinstalling it with the existing MySQL parameters in mind (easy way, but you lose your data). The other way would be to export your LAMS or Moodle database and reimport it into the instance of MySQL that you want to keep, creating the MySQL users for the particular application, and reconfiguring the particular application to use the new database. This way is a little more complicated but you don't lose your data stored in the database.

Let me know if you'd like further details on how to do this.

Hope this helps!

Posted by Jun-Dir Liew

3: Re: Re: PROBLEM Integ Moodle & LAMS
In response to 2 01/02/06 11:53 PM
[ Reply | Forward ]
Hello Jun,

Thanks for the reply.
I shall be graeful if you could send the details.


Thanks in Advance.

Garry

Posted by Bhupinder Singh

4: Re: PROBLEM Integ Moodle & LAMS
In response to 1 01/03/06 06:03 PM
[ Reply | Forward ]
I'll assume from your other thread that you're running on Windows.

To install LAMS onto an existing database (uninstall existing LAMS first):
1. http://www.lamsinternational.com/documentation/LAMS%201.0.2%20Windows%20Installer%20Manual_attachments/07-mysql%20integration.jpg
2. Simply make sure the details in that screenshot match those of your existing MySQL database.  You'll need the MySQL installation directory, and the root password
3. You can make 'MySQL LAMS User' and 'MySQL LAMS User Password' whatever you want - these are the credentials that LAMS itself will use to access the database.  Same for 'MySQL LAMS Database'.

To transplant your LAMS database onto another MySQL server:
0. You will need to know 3 things - LAMS' database name, LAMS' MySQL user name, and LAMS' MySQL password.  You can get these from C:\lams\lams-config.bat, or your build.properties.
1. Make sure you are running the instance of MySQL that holds LAMS' database.
2. Export your LAMS database using this command:
mysqldump -c -a --add-drop-table -B <lams db name> -r C:\lams-database.sql -u <lams db user name> -p
Then enter the password for the lams db user when prompted.  The database will be dumped in the file called 'lams-database.sql'.
3. Stop MySQL and start the instance of MySQL you want LAMS to use from now on.
4. Import the LAMS database using this command (you will need the MySQL root password of the MySQL you are importing into):
mysql -u root -p < C:\lams-database.sql
5. Open C:\lams\jboss\server\default\deploy\mysql-service.xml in Wordpad and scroll down to this section:

<attribute name="ManagedConnectionFactoryProperties">
          <properties>
            <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost/YOUR_LAMS_DATABASE_NAME_HERE</config-property>
            <config-property name="DriverClass" type="java.lang.String">com.mysql.jdbc.Driver</config-property>
            <!--set these only if you want only default logins, not through JAAS -->
            <config-property name="UserName" type="java.lang.String">root</config-property>
            <config-property name="Password" type="java.lang.String">YOUR_MYSQL_ROOT_PASSWORD_HERE</config-property>
          </properties>

6. Edit the text 'YOUR_LAMS_DATABASE_HERE' and 'YOUR_MYSQL_ROOT_PASSWORD_HERE' with your details.
7. Make sure your currently running MySQL is set to start automatically rather than the one you have just ditched.
Note. It's not good practice to have your LAMS database use your root user's credentials, but it makes these steps a little bit shorter.  You can use the ant command 'ant prepare-db' to create a custom MySQL user for LAMS, provided you have the essential details in C:\lams\lams-package\ant\build.properties

Ugh.  The second way is a bit convoluted, but it should help anyone who wants to transplant their LAMS database to another MySQL instance.

Posted by Jun-Dir Liew

5: Re: PROBLEM Integ Moodle & LAMS
In response to 1 01/05/06 10:56 AM
[ Reply | Forward ]
Hello Jun,

I have done a fresh install. And tried to install the LAMS after the Moodle has been installed.



My environment
Windows XP, Webxerver Apache/PHP
Database MySql 4.1+

I have successfully installed the data base and application which happens to be Moodle and it was working perfectly. Thereafter I have installed LAMS which has started successfully.


Thereafter When I went back to the Moodle installation and tried to access it there wasa an error of Access denied to .

What I get is as under:
"
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.

Error

MySQL said:


#1045 - Access denied for user 'root'@'localhost' (using password: NO)
[Documentation]


I have two databases installed can I set the password in the MYSQL database.

I shall be grateful if you could help.

Garry

Posted by Bhupinder Singh

Reply to first post on this page
Back to Problems Installing LAMS