Opened 15 years ago

Closed 14 years ago

#21581 closed request (duplicate)

MySql socket location change

Reported by: scott@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: php5 Cc: scott@…, jyrkiwahlstedt
Port: php5-mysql

Description

Can we start some discussion on this, I see this as being painful for MacPorts users. Especially on one of the users that I believe MacPorts is widely used, which is getting MAMP running.

At some point in the past I could get php 5, MySql5, and Apache 2 running in a few commands, with little trouble.

I can not find, or at least, I do not understand how to use trac well enough to see when the socket location of MySql was changed, though I am looking to know why.

Php looks in a known location, /tmp I believe. This I also believe is a hard coded in the source, or is a compile time option that can be changed.

If it can be changed at compile time, then why not set the socket to MySql to the right location when php is built?

My ideal solution would be to put the MySql socket in the location that php looks for it by default.

As it is now, if I were to port install php5 port install mysql5 port install apache2

There is a good deal of work to be done before I am able to use those tools. On a local dev machine, I never even bothered to set up php.ini, and just relied on the defaults of php without any explicit file.

Now, there are no less than three socket locations I need to change.

What are your thoguhts on this, and what is the history? My vote, change MySql to put the socket where php defaults to looking for it. We already had a user installing phpMyAdmin, the simplest of many softwares to install, ending up dropping localhost in favor of a tcp connection just to get this to work.

Change History (7)

comment:1 Changed 15 years ago by scott@…

Cc: scott@… added

Cc Me!

comment:2 Changed 15 years ago by blb@…

Cc: jwa@… added
Keywords: php5 added; mysql5 removed
Owner: changed from macports-tickets@… to ryandesign@…

comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Port: php5-mysql added; mysql5 removed
Status: newassigned

The socket location has not changed in years. It is in the place we want it, in ${prefix}/var/run/mysql5/mysqld.sock. I saw your message on the mailing list, but did not yet respond because I did not yet have a chance to investigate. I may just need to add some configure args to the mysqlnd variant in the php5-mysql port to tell it where the socket is located. In the mean time, you can set the socket location in php.ini, as the php5-mysql port already tells you to do if you install it with its default mysqlnd variant, or you can install the php5-mysql port with its mysql5 variant instead which already knows where the socket is.

comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Having the MySQL socket in /tmp is a security vulnerability which is why nobody puts it there anymore.

comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Related to #21250.

comment:6 in reply to:  3 Changed 15 years ago by scott@…

Replying to ryandesign@…:

The socket location has not changed in years. It is in the place we want it, in ${prefix}/var/run/mysql5/mysqld.sock. I saw your message on the mailing list, but did not yet respond because I did not yet have a chance to investigate. I may just need to add some configure args to the mysqlnd variant in the php5-mysql port to tell it where the socket is located. In the mean time, you can set the socket location in php.ini, as the php5-mysql port already tells you to do if you install it with its default mysqlnd variant, or you can install the php5-mysql port with its mysql5 variant instead which already knows where the socket is.

Sorry, I was not aware of that. I did try to search out the past revisions of a port and see if I could figure out what is going on. I do think you are correct, that there just needs to be some config args set to the php side of things, then it will go clean. Sorry I assumed that /tmp was the default location, that is what php has been telling me is the default location in all the installs I have done over the past few weeks.

Thanks again

comment:7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: assignedclosed

Duplicate of #21250.

Note: See TracTickets for help on using tickets.