Re: [PHP4BETA] cvs: /php4/ext/mysql/libmysql mysql_com.h (fwd)
| From: | Michael Widenius | Date: | Thu, 09 Mar 2000 00:54:51 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4/ext/mysql/libmysql mysql_com.h (fwd) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-16555@lists.php.net to get a copy of this message | ||
>>>>> "Andi" == Andi Gutmans <andi@zend.com> writes:
Andi> Monty, David,
Andi> We are now building MySQL support by default both in UNIX and Win32.
Andi> There seems to be some confusion about the location of the mysql.sock
Andi> libs. Apparently you do some magic in your RPM's to find the correct
Andi> location.
Andi> Can you please check out the PHP 4 CVS tree and see what is missing?
Andi> Also, a while ago you I patched the Win32 header files in order to get
Andi> Win32 to compile but I prefer to have the "official" working version in
Andi> our CVS. Can you please just make sure that all the files in our CVS are
Andi> now updated?
Andi> Thanks,
Andi> Andi
Hi!
David will be home tomorrow and he will then (or on Thursday) check
that your CVS is up to date with ours.
David is the one that is responsible for the renaming of the mysqld
socket (I would still have prefered to have /tmp/mysql.sock) and will
have to deal with this :(
Anyway, one option is in php use the following sequence to open the
connections to MySQL:
----------
mysql_sock=mysql_init(0);
if (!mysql_sock)
{
printf("Can't allocate mysql structure\n");
return 0;
}
mysql_option(mysql_sock,MYSQL_READ_DEFAULT_GROUP,"php");
------------
This will read the 'php' and 'client' sections from the my.cnf file
and this should ensure that the socket is ok.
David can in the .rpm add some code to automaticly create a
/etc/my.cnf file with the default options for the socket file!
If you have any other suggestions how to do this right, please mail us!
Regards,
Monty
Andi> ---------- Forwarded message ----------
Andi> Date: Tue, 07 Mar 2000 17:49:03 +0100
Andi> From: "[iso-8859-1] Stig-Ørjan Smelror" <Stig.Orjan.Smelror@winther.net>
Andi> To: "'php4beta@lists.php.net'" <php4beta@lists.php.net>
Andi> Subject: Re: [PHP4BETA] cvs: /php4/ext/mysql/libmysql mysql_com.h
Andi> Paul DuBois wrote:
>>
>> At 5:28 PM +0100 03-07-2000, Sascha Schumann wrote:
>> >On Tue, Mar 07, 2000 at 05:19:01PM +0100, Kenneth Mutka wrote:
>> >> > Right. Nevertheless, the default is /tmp/mysql.sock. Or are there any
>> >> > distributions with other default settings?
>> >>
>> >> Yes.
>> >> Debian uses /var/run/mysqld/mysqld.sock for some unknown reason.
>> >
>> >Thanks for the information. We will check the usual places and change
>> >the default to point there.
>>
>> Check with David Axmark (davida@mysql.com) - he builds the RPM
>> versions that are distributed on the MySQL Web site, and I think
>> those don't use /tmp/mysql.sock.
>>
Andi> RPMS use /var/lib/mysql/mysql.sock.
Andi> You had me worried a bit there :)
Andi> Thanks for all the great work.
Andi> --
Andi> Vennlig hilsen/Best Regards
Andi> Stig-Ørjan Smelror
Andi> Winther Computer Network DA http://www.winther.net
Andi> Stig.Orjan.Smelror@winther.net Teknisk Ansvarlig
Andi> Winther.Net ; Webhosting uten grenser.
Andi> --
Andi> PHP 4.0 Beta Mailing List
Andi> <http://www.php.net/version4/>
Andi> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
Andi> For additional commands, e-mail: php4beta-help@lists.php.net
Andi> To contact the list administrators, e-mail: php4beta-admin@lists.php.net