Problem connecting to MySQL server during installation ICA Atom

288 views
Skip to first unread message

Vincent

unread,
Jul 23, 2009, 3:46:45 PM7/23/09
to ICA-AtoM Users
I continue to have problems with the PDO connection. Once, I have been
able to get ICA Atom 1.0.5 running, but after I renewed my operating
system and experiment with ICA Atom 1.0.7 (or 1.0.8 already?), it
doesn't work.

I work with Apache (httpd-2.2.6), PHP (php-5.2.5) and MySQL
(mysql-5.1.22) in a Fedora 10-environment. At this moment, my
configuration command for PHP looks like: "./configure --with-apxs2=/
usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-
mbstring --with-xsl=/usr/local/xsl --with-pdo-mysql" and the
installation runs without problems.

However, when I try to start up ICA Atom and in the second step have
filled in the name of the main user and the database, I get the
following error: "Unable to open PDO connection [wrapped: SQLSTATE
[HY000] [2002] Can't connect to local MySQL server through socket '/
var/lib/mysql/mysql.sock' (13)]"

How can I solve this?

David Juhasz

unread,
Jul 24, 2009, 2:30:08 PM7/24/09
to ica-ato...@googlegroups.com
Hi Vincent,

From the error you reported it looks like PDO *is* installed properly, but it can't open a connection to you MySQL database.

Please check your config/propel.ini to make sure the this line has the correct MySQL information:
propel.database.url        = mysql:dbname=qubit;host=localhost;port=

And also check your config/databases.yml, to make sure this line is correct:
      dsn: 'mysql:dbname=qubit;host=localhost;port='

You should also try connecting to your MySQL database from your web server with mysql-client, to make sure there's nothing wrong with the mysql server or your connection.



Regards,

David Juhasz,
Software Engineer, Artefactual Systems Inc.

Vincent

unread,
Jul 26, 2009, 9:13:12 AM7/26/09
to ICA-AtoM Users
Hi David

Thanks for your reaction. Although it isn't solved, it gives me an
idea where to search.

> You should also try connecting to your MySQL database from your web
> server with mysql-client, to make sure there's nothing wrong with the
> mysql server or your connection.

When trying to access MySQL via a PHP-site, I get the error: "Warning:
mysql_connect() [function.mysql-connect]: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (13)" Indeed, MySQL is
running, but can't be connected to.

When installing, I have set the sticky bit of /tmp/ and created a soft
link from /var/lib/mysql/mysql.sock to /tmp/mysql.sock, but obviously,
that doesn't work...

> Please check your config/propel.ini to make sure the this line has the  
> correct MySQL information:
> propel.database.url        = mysql:dbname=qubit;host=localhost;port=
>
> And also check your config/databases.yml, to make sure this line is  
> correct:
>        dsn: 'mysql:dbname=qubit;host=localhost;port='

Exept for the specifications for port, the strings already had the
right values. I don't know how to figure out the value of "port", so I
left it out, but obviously, that's not enough. I have created a second
database "kubit", changed the strings, but I get the same error:
"can't open pdo-connection".

How do I figure out the value of "port"?

Vincent

unread,
Jul 27, 2009, 1:28:36 AM7/27/09
to ICA-AtoM Users
I have found /etc/myconf, where I can change settings, set the value
for port, etc. I have changed the path of the socket to /tmp/
mysql.sock and created a symbolic link to /var/lib/mysql/mysql.sock. I
have been able to connect to MySQL via a PHP-site, but...

ICA Atom still gives the same error...

I hope... there is only some wrong value left behind in the memory or
something. Or... is it possible to specify inside ICA Atom the path to
the mysql-socket?

David Juhasz

unread,
Jul 27, 2009, 11:19:28 AM7/27/09
to ica-ato...@googlegroups.com
Hi Vincent,

Please try the following config settings:

In config/propel.ini:
propel.database.url =
mysql:dbname=qubit;host=localhost;unix_socket=/var/lib/mysql/mysql.sock

And in config/databases.yml:
dsn: 'mysql:dbname=qubit;host=localhost;unix_socket=/var/lib/mysql/
mysql.sock'

For the change to take effect You will need to clear your symfony
cache with the following command at the commandline:
"php /path/to/ica-atom/symfony cc"

Let us know if that works!

David Juhasz

unread,
Aug 3, 2009, 4:47:37 PM8/3/09
to vincent, ica-ato...@googlegroups.com
Hi Vincent,

I just started my summer vacation on Thursday, July 30th - I'll be
back August 31st.

I'm sure that one of the other programmers from Artefactual can get
ICA-AtoM running for you, if you are willing to keep working on it.
We also have several Spanish-speaking users that may be able to help
if you are finding it difficult communicating in English.

I'd encourage you not to give up - it sounds like you are very close
to getting it working! :)

David Juhasz

unread,
Aug 8, 2009, 1:39:42 PM8/8/09
to Vincent Jansen, ica-ato...@googlegroups.com
Hi Vincent,

That's great, glad to hear that you got ICA-AtoM working! :)

I'm not sure where I got the impression that you were from a Spanish-
speaking country, but sorry for the mix-up! :)


Cheers,

David Juhasz,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | P: 604.527.2056 | F: 604.521.2059

On 7-Aug-09, at 12:41 PM, Vincent Jansen wrote:

> Hi David
>
> Wednesday evening I managed to run the installation program of ICA
> Atom.
> It was indeed a problem with rights.
>
> I entered the command "chmod -R 777 /var/lib/mysql", giving all users
> and processes access to this location. It might not be the best
> solution, but for the moment, it works. I don't install ICA Atom for a
> big organization, I only work at home, and I keep my eyes open for a
> more fine tuning of the rights of /var/lib/mysql.
>
> I am a student of Documentary Information Sciences in Amsterdam, and
> for
> my master thesis by Jaap Kamps I want to compare ICA Atom with another
> search engine, Nutch (Lucene) with regard to searching archival
> descriptions. Now, I have both search engines working, the fun can
> begin. :-)
>
> Thanks for your help, I found it very encouraging!
>
> Enjoy your holiday.
>
> Vincent
>
>
>
> Op maandag 03-08-2009 om 13:47 uur [tijdzone -0700], schreef David
> Juhasz:

Vincent

unread,
Sep 11, 2009, 3:16:07 PM9/11/09
to ICA-AtoM Users
The problem has been solved in private email-discussion.

But to whom it may concern...

in the end, the problem was caused by the fact that the PHP-user
(daemon) did not have rights to manipulate the database-files in /var/
lib/mysql. I solved this in a rather rude way by giving everyone
rights to this location.
Reply all
Reply to author
Forward
0 new messages