I have just installed XAMPP's version of mySQL. Its CD Collection that uses mySQL works just fine.
However, when I attempt to execute gallery3/installer as follows:
php installer/index.php -u xxxx -p xxxx -d mozillanerd -x moz
(I have set the root and password in the commend to xxxx for security).
The installer displays the following message:
==> Unable to connect to the database.
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
I suspect that gallery3 does not know how to access the appropriate socket definition or the socket definition is incorrect.
srwxrwxrwx 1 mysql mysql 0 2010-03-30 11:42 /var/run/mysqld/mysqld.sock
The /opt/lampp/var/mysql/mysql.sock is
srwxrwxrwx 1 nobody nogroup 0 2010-04-01 10:23 /opt/lampp/var/mysql/mysql.sock
Thanks
Posts: 16504
Gallery doesn't need to know that so long as you have MySQL running on the server.
Check phpinfo to see how PHP thinks it's suppose to connect to MySQL.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16504
Oh and I just checked my database.php file and by default it's just connecting to MySQL over the standard port, so "socket" and
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
On mine it says 'type' => 'mysql',
'user' => 'dbuser',
'pass' => 'p@ssw0rd',
'host' => 'localhost',
'port' => FALSE,
'socket' => FALSE,
'database' => 'kohana',
I have no idea what the meaning of 'dbuser', the strange password, and database 'kohana'
Not connecting due to the error sith socket. The mySQL works OK when a cd collection code uses connect_mysql('localhost', 'root', 'sql_password_for_root').
I will be looking at debugging through the installer.
Posts: 16504
All of that information would have been entered by you during G3's install. Or possibly "default" settings set in php.ini
Try putting correct information for the user, pass and database name and see if you can connect that way.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
I have created a user kohana (database kohana is created automatically by phpMyAdmin) and issued the following with bad results:
root@intrader-laptop:/opt/lampp/htdocs/gallery3# php installer/index.php -u kohana -p #GALLERY -d kohana -x moz
Oops! Something went wrong during the installation:
==> Unable to connect to the database.
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
For help you can try:
* The Gallery 3 FAQ - http://codex.gallery2.org/Gallery3:FAQ
* The Gallery Forums - http://gallery.menalto.com/forum
** INSTALLATION FAILED **
Sorry, it continues to tell me about the socket at /var/run/mysqld/mysqld.sock instead of
srwxrwxrwx 1 nobody nogroup 0 2010-04-01 10:23 /opt/lampp/var/mysql/mysql.sock
I don't quite understand your comment 'All of that...'.
The installer is invoked as given above.
Posts: 16504
Try a different username and database name. Just to rule out any odd bug of using the term "kohana" with Gallery using the Kohana framework.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
Here is the new command - same results
php installer/index.php -u mozillanerd -p #GAL#GAL -d mozillanerd -x moz
Oops! Something went wrong during the installation:
==> Unable to connect to the database.
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
For help you can try:
* The Gallery 3 FAQ - http://codex.gallery2.org/Gallery3:FAQ
* The Gallery Forums - http://gallery.menalto.com/forum
** INSTALLATION FAILED **
in phpMyAdmin everything looks Ok. I don't think that we are dealing with the socket problem. Please review and help
Thanks
Posts: 16504
Verify that you can connect to your database.
telnet localhost 3306
Verify you don't have some firewall in place blocking ports or configure it to allow access to the MySQL port.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
I try the command
sufo ufw status
and I get
WARN: uid is 0 but '/usr' is owned by 1000
Status: inactive
I don't exactly know what that means - it looks like the firswall is off
as to the log mysql keeps, this is what I the log has:
100402 11:42:43 [Note] /opt/lampp/sbin/mysqld: ready for connections.
Version: '5.1.41' socket: '/opt/lampp/var/mysql/mysql.sock' port: 3306 Source distribution
Note again that the socket mysql reports is different from that which the gallery3 installer finds. I also changed /etc/mysql/my.cnf and changed therein the socket definition and set it to '/opt/lampp/var/mysql/mysql.sock', but it made no difference - I don't know where gallery3 installer gets the value. So far I have not found it
Posts: 16504
3306 is the default MySQL port. If you have MySQL setup on a different port and php isn't configured to look there, that's why you're not connecting.
Did you restart?
Have you looked at phpinfo yet to see what it's reporting?
Can you telnet to mysql at the port you have it running on?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
As I described above,
100402 11:42:43 [Note] /opt/lampp/sbin/mysqld: ready for connections.
Version: '5.1.41' socket: '/opt/lampp/var/mysql/mysql.sock' port: 3306 Source distribution
mysql is ready and listening
How do I telnet to mysql at the given port?
Posts: 16504
http://gallery.menalto.com/node/95317#comment-340199
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
further, I tried ./mysqlshow -u mozillanerd -p #GAL#GAL -d 'mozillanerd'
Enter password:
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mozillanerd |
| test |
+--------------------+
It looks like it is up and running showing database mozillanerd for user mozillanerd
However the socket problem is still there
Posts: 16504
Until you've said you've looked at your mysql setting listed in phpinfo AND tried telnetting to port 3306 I'm done here.
Good day.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
The following is reported by phpinfo for mySql
<code>
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $
Persistent cache enabled
put_hits 0
put_misses 0
get_hits 0
get_misses 0
size 2000
free_items 2000
references 2
Directive Local Value Master Value
mysql.allow_local_infile On On
mysql.allow_persistent On On
mysql.cache_size 2000 2000
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
</code>
mysql is not designet to telnet, it I try, with
<code>
telnet -l root -r localhost 3306
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
4
5.1.4/>(O3R"MplN#aA^8<aTConnection closed by foreign host.
</code>
It responds, but with (as designed) gibberish.
I really appreciate you hanging in there. This is frustrating. The port issue is resolved, but the socke issue is not.
Posts: 16504
Here's what mine looks like and it just works
I installed Apache, MySQL, PHP, etc all from my distribution's repository, not from XAMPP and it just works.
[img]http://gallery.menalto.com/files/mysql.gif[/img]
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 9
Must be the way that XAMPP sets up the socket. I will investigate. For now I installed 4images with no problems on the same XAMPP insallation.
Thanks so much for your help