Page 1 of 1

cannot connect to database

Posted: Fri Feb 26, 2010 11:06 pm
by ebw
The pacsone installation reported no errors and I can see the login page successfully along with an anitspam code in blue text. Also, the name of database I entered during installation is listed as the only entry in the pulldown menu. However, when I attempt to login, I get the message:

Could not connect to database pacsone_1 as User: pacsone_1

I have confirmed that the mysql password is correct for the user pacsone_1 by using the mysql command line.

After overcoming previous imagick.so issues, I am now stuck on this one.

Posted: Sat Feb 27, 2010 12:20 am
by pacsone
Did you check if the mysql/mysqli PHP extension is loaded from the output of the test page?

http://localhost/pacsone/Hello.php

mysql mysqli mysqlnd modules are loaded

Posted: Sat Feb 27, 2010 3:13 am
by ebw
Yes, mysql mysqli and mysqlnd are all shown on the phpinfo() page. The version is 5.05.

Using the mysql command interface, I confirmed that the user and database created by the pacsone install are there. The login page does show the db name so the connection is at least *partially* there.

Posted: Sat Feb 27, 2010 3:14 am
by pacsone
Did you check the Session.save_path setting from the output of the test page, and make sure it's set to a valid local directory?

http://localhost/pacsone/Hello.php

Posted: Sat Feb 27, 2010 5:07 am
by ebw
session.save_path is set to /tmp and that folder does exist. In /tmp, I see several files with names such as sess_43uohk26htfs576pj1176af483

pacsone log contents

Posted: Sat Feb 27, 2010 6:13 am
by ebw
Below are the contents of the pacsone log file. There is an error reported for binding to the specified DICOM listening port (3010). Is this a serious problem?

Sat Feb 27 00:09:06 2010 INFO - Server Process [15725] Initialized as AE Title: [appa_pacsone_1]
Sat Feb 27 00:09:06 2010 INFO - Server Socket: 4 created successfully
Sat Feb 27 00:09:06 2010 ERROR - Cannot bind() socket to port: 3010, Error: 48
Sat Feb 27 00:09:11 2010 INFO - Database: Connected to database [pacsone_1]

Posted: Sat Feb 27, 2010 4:37 pm
by pacsone
ebw wrote:session.save_path is set to /tmp and that folder does exist. In /tmp, I see several files with names such as sess_43uohk26htfs576pj1176af483
Can you check the configuration section for the mysql/mysqli extension configuration section, and see if the MySQL socket name matches with what's currently being used by MySQL on your server? If not, you'll need to configure the socket name to match with the non-default socket name being used.

Code: Select all

# ps aux|grep mysqld

Re: pacsone log contents

Posted: Sat Feb 27, 2010 4:40 pm
by pacsone
ebw wrote: Sat Feb 27 00:09:06 2010 ERROR - Cannot bind() socket to port: 3010, Error: 48
[pacsone_1]
This usually means port 3010 was already in use by another application. To verify this, you can stop PacsOne Server and run the netstat command to check if port 3010 is in use:

Code: Select all

# netstat -tanp

path to mysql.sock in php.ini was incorrect

Posted: Mon Mar 01, 2010 2:36 am
by ebw
I finally found the problem.

The path to the mysql socket was incorrect in the php.ini file. I was careful to enter the correct path into the pacsone installation and it appeared correctly in the .ini created for my pacsone instance, but that wasn't enough. The path must also be correct in the php.ini file. The pacsone installation instructions don't mention checking the path to the mysql socket in php.ini. Perhaps it should be added - at the very least to the troubleshooting section.

thanks,
ebw

Posted: Mon Mar 01, 2010 6:14 pm
by pacsone
Thanks for the suggestion and we'll add the above comments about the MySQL socket name to the next rev of the PacsOne Server Installation Guide.