Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Mac+MAMP+EclipsePDT > Mysql connection problem
Mac+MAMP+EclipsePDT > Mysql connection problem [message #51986] Sat, 15 September 2007 08:34 Go to next message
Eclipse UserFriend
Originally posted by: nova67f.yahoo.de

Hi all,


I'm a new eclipse user, having used textwrangler for my php editing
needs up to now ;)

my configuration is like this :

Mac Os X 10.4.10,
MAMP 1.7 with Apache on port 80 and mysql on port 3306.

Php version 5.2.3

Eclipse 3.3.0 with debugger from Zend
http://downloads.zend.com/pdt/all-in-one/

Everything works, also the debugging, except the mysql connection.

I can connect to mysqlwith cocoa using this unix socket
/Applications/MAMP/tmp/mysql/mysql.sock

In php however, when my code hits

@mysql_connect($this->server, $this->user, $sqlpassword, $new_link);

i get thrown into my error exception
********
General Error
SQL ERROR [ mysql4 ]
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[2002]
An sql error occurred while fetching this page. Please contact an
administrator if this problem persists.
********

Obviously the socket is wrong but i don't know how to correct this in
eclipse.

This is my phpinfo concerning mysql : you can see that the socket is
different.

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.0.41
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /Applications/MAMP/tmp/mysql/mysql.sock
MYSQL_INCLUDE -I/Applications/MAMP/Library/include/mysql
MYSQL_LIBS -L/Applications/MAMP/Library/lib/mysql -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
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 /Applications/MAMP/tmp/mysql/mysql.sock
/Applications/MAMP/tmp/mysql/mysql.sock
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off


So how do i put Eclipse in the right direction ?

Many thanks in advance!

Andy

(sorry for crossposting this i didn't find the right group)
Re: Mac+MAMP+EclipsePDT > Mysql connection problem [message #52333 is a reply to message #51986] Mon, 17 September 2007 19:00 Go to previous message
Eclipse UserFriend
Originally posted by: dserodio.gmail.com

I'm not a Mac user, but in XAMP (I'm guessing it's the MAMP equivalent
on Windows) there are separate configuration files (php.ini) for running
PHP under Apache and "CLI" (command-line).
Maybe your two php.ini files are different regarding MySQL configuration?

HTH,
Daniel Serodio

Andy Vandenberghe wrote:
> Hi all,
>
>
> I'm a new eclipse user, having used textwrangler for my php editing
> needs up to now ;)
>
> my configuration is like this :
>
> Mac Os X 10.4.10,
> MAMP 1.7 with Apache on port 80 and mysql on port 3306.
>
> Php version 5.2.3
>
> Eclipse 3.3.0 with debugger from Zend
> http://downloads.zend.com/pdt/all-in-one/
>
> Everything works, also the debugging, except the mysql connection.
>
> I can connect to mysqlwith cocoa using this unix socket
> /Applications/MAMP/tmp/mysql/mysql.sock
>
> In php however, when my code hits
>
> @mysql_connect($this->server, $this->user, $sqlpassword, $new_link);
>
> i get thrown into my error exception
> ********
> General Error
> SQL ERROR [ mysql4 ]
> Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
> [2002]
> An sql error occurred while fetching this page. Please contact an
> administrator if this problem persists.
> ********
>
> Obviously the socket is wrong but i don't know how to correct this in
> eclipse.
>
> This is my phpinfo concerning mysql : you can see that the socket is
> different.
>
> MySQL Support enabled
> Active Persistent Links 0
> Active Links 0
> Client API version 5.0.41
> MYSQL_MODULE_TYPE external
> MYSQL_SOCKET /Applications/MAMP/tmp/mysql/mysql.sock
> MYSQL_INCLUDE -I/Applications/MAMP/Library/include/mysql
> MYSQL_LIBS -L/Applications/MAMP/Library/lib/mysql -lmysqlclient
>
> Directive Local Value Master Value
> mysql.allow_persistent On On
> 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 /Applications/MAMP/tmp/mysql/mysql.sock
> /Applications/MAMP/tmp/mysql/mysql.sock
> mysql.default_user no value no value
> mysql.max_links Unlimited Unlimited
> mysql.max_persistent Unlimited Unlimited
> mysql.trace_mode Off Off
>
>
> So how do i put Eclipse in the right direction ?
>
> Many thanks in advance!
>
> Andy
>
> (sorry for crossposting this i didn't find the right group)
Previous Topic:XDebug versus ZendDebugger
Next Topic:failed openning '../include.inc.php'
Goto Forum:
  


Current Time: Fri Apr 26 14:36:41 GMT 2024

Powered by FUDForum. Page generated in 0.03602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top