Forum Problems Installing LAMS: Problem with insert-database


 
You may request notification for Problem with insert-database.
Search: 

1: Problem with insert-database
03/27/07 07:23 AM
[ Reply | Forward ]
Hi all,

I try to install Lams but I keep getting stuck when ant tries to perform insert-database. Mysql is running and working and the passwords in the lams.properties are correct. It seems like mysql is refusing connection but I don't have a clue why it would.

I'm using jdk 1.6.0 (also tried 1.5.0) and jboss 4.0.2

Thanks

Piet


This is the error I keep getting:

insert-database:
    [echo] Inserting tables into the database

BUILD FAILED
/root/binary_package/build.xml:34: The following error occurred while executing this line:
/root/binary_package/build.xml:141: The following error occurred while executing this line:
/root/binary_package/build.xml:189: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused

< a lot of blah blah >

** END NESTED EXCEPTION **

Posted by Piet van Soomeren

2: Re: Problem with insert-database
In response to 1 03/27/07 04:46 PM
[ Reply | Forward ]
Piet,

Are you running the Windows installer, the generic Unix/Linux installer or building from source?

Given you mention lams.properties, I assume you are using teh generic Unix/Linux installer.

(1) Is MySQL running on the same server as where you are trying to run the install?

(2) Have you done anything special when you configured MySQL? In  MySQL, you can set it up so that a particular user can only log in from certain servers. Have you changed the root user so that it can only log in from a particular server? This is usually only an issue if MySQL is running on a different database.

(3) Is the username and database name the default values in the lams.properties file (ie lams2) or a different name?

(4) Can you login to MySQL using the database username and password that you have in the lams.properties file? Normally this user is created by the previous step in the build, and I'm wondering if that might have gone wrong. This user is created so that it can only log in from the local machine, so if MySQL is on another server there could be a problem.

Try this, replacing lams2 with whatever you set the username and database name to in your properties file.

$ mysql -u lams2 -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9 to server version: 5.0.27-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use lams2;

Database changed

mysql> exit;

Posted by Fiona Malikoff

3: Re: Re: Problem with insert-database
In response to 2 03/27/07 05:38 PM
[ Reply | Forward ]
Hi Fiona,

Thanks for your reply.

I was checking all your suggestions and I couldn't find a single problem. As a last attempt I checked the my.cnf for any weird settings. I found this part:

# Instead of skip-networking you can listen only on
# localhost which is more compatible and is not less secure.
# bind-address = 127.0.0.1
skip-networking

I simply changed it into:

bind-address = 127.0.0.1
#skip-networking

Now everyting works just fine!

Thanks for your help,

- Piet

Posted by Piet van Soomeren

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