[newbie] not a very auspicious start

This is a discussion on [newbie] not a very auspicious start within the MySQL Database forums, part of the Database Forums category; Kees Nuyt <k.nuyt@nospam.demon.nl> wrote: > On Sun, 24 Jun 2007 15:19:35 +0200, ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 06-24-2007
desmond
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

Kees Nuyt <k.nuyt@nospam.demon.nl> wrote:
> On Sun, 24 Jun 2007 15:19:35 +0200, desmond
> <desmond@zeouane.org> wrote:
>
>>Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>> desmond wrote:
>>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>>>> In other words, it works. So why can't I connect from within a php file?
>>>>>> The password is _identical_ (I even copied and pasted it to make sure).
>>>>>> This is annoying .. is there a typo that I can't see, or is it something,
>>>>>> like some sort of 'rite of passage' that all newbies have to go through??
>>>>>>
>>>>>> Help !!
>>>>>>
>>>>>> D.
>>>>> Do you actually have your mysql socket at /var/mysql/mysql.sock? If
>>>>> not, where is it?
>>>>>
>>>> /private/tmp/mysql.sock
>>>>
>>>> (it's a Mac).
>>>>
>>>> D.
>>>
>>> Then you need to specify it in your client section of your my.cnf (or
>>> php.ini file). Right now PHP is using the default.

>>
>>/private/etc/my.cnf now looks like this...
>>
>>[mysqld]
>>safe-user-create
>>socket=/private/tmp/mysql.sock
>>
>>[client]
>>port=3306
>>socket=/private/tmp/mysql.sock
>>
>>Same error.
>>
>>D.

>
> That's the MySQL config.
> What's in your php.ini ?
>
> ; Default port number for mysql_connect(). If unset, mysql_connect() will use
> ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
> ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
> ; at MYSQL_PORT.
> mysql.default_port =
>
> ; Default socket name for local MySQL connects. If empty, uses the built-in
> ; MySQL defaults.
> mysql.default_socket =
>

There was nothing in them but I entered 3306 and /private/tmp/mysql.sock

Restarted apache and MySQL.

No joy. :(
Reply With Quote
  #12 (permalink)  
Old 06-24-2007
desmond
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

desmond <desmond@zeouane.org> wrote:

> No joy. :(


Duh. I'd put '/private/tmp/mysql.socket'

Removed the feral 'et' and it works.

Thanks, guys.
Reply With Quote
  #13 (permalink)  
Old 06-24-2007
Jerry Stuckle
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

desmond wrote:
> desmond <desmond@zeouane.org> wrote:
>
>> No joy. :(

>
> Duh. I'd put '/private/tmp/mysql.socket'
>
> Removed the feral 'et' and it works.
>
> Thanks, guys.


You shouldn't need it in php.ini if your MySQL is set up properly. That
way if you change the location of the socket you have one less file to
remember to update.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #14 (permalink)  
Old 06-26-2007
desmond
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

Jerry Stuckle <jstucklex@attglobal.net> wrote:
> desmond wrote:
>> desmond <desmond@zeouane.org> wrote:
>>
>>> No joy. :(

>>
>> Duh. I'd put '/private/tmp/mysql.socket'
>>
>> Removed the feral 'et' and it works.
>>
>> Thanks, guys.

>
> You shouldn't need it in php.ini if your MySQL is set up properly. That
> way if you change the location of the socket you have one less file to
> remember to update.


But it's in my my.cnf and that doesn't change things: i still can't
connect, unless I do the above modif to php.ini.

D.
Reply With Quote
  #15 (permalink)  
Old 06-27-2007
Jerry Stuckle
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

desmond wrote:
> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>> desmond wrote:
>>> desmond <desmond@zeouane.org> wrote:
>>>
>>>> No joy. :(
>>> Duh. I'd put '/private/tmp/mysql.socket'
>>>
>>> Removed the feral 'et' and it works.
>>>
>>> Thanks, guys.

>> You shouldn't need it in php.ini if your MySQL is set up properly. That
>> way if you change the location of the socket you have one less file to
>> remember to update.

>
> But it's in my my.cnf and that doesn't change things: i still can't
> connect, unless I do the above modif to php.ini.
>
> D.


Is it in this my.cnf file you're using?

I compile my own mysql and set it in that compile configuration options.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #16 (permalink)  
Old 06-27-2007
desmond
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

Jerry Stuckle <jstucklex@attglobal.net> wrote:
> desmond wrote:
>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>> desmond wrote:
>>>> desmond <desmond@zeouane.org> wrote:
>>>>
>>>>> No joy. :(
>>>> Duh. I'd put '/private/tmp/mysql.socket'
>>>>
>>>> Removed the feral 'et' and it works.
>>>>
>>>> Thanks, guys.
>>> You shouldn't need it in php.ini if your MySQL is set up properly. That
>>> way if you change the location of the socket you have one less file to
>>> remember to update.

>>
>> But it's in my my.cnf and that doesn't change things: i still can't
>> connect, unless I do the above modif to php.ini.
>>
>> D.

>
> Is it in this my.cnf file you're using?


yes..
[mysqld]
#Don't allow new user creation by the user who has no write privileges to
the mysql.user table.
safe-user-create
socket=/private/tmp/mysql.sock

[client]
port=3306
socket=/private/tmp/mysql.sock

> I compile my own mysql and set it in that compile configuration options.


I used a binary (gettin' lazy)..
Reply With Quote
  #17 (permalink)  
Old 06-28-2007
Jerry Stuckle
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

desmond wrote:
> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>> desmond wrote:
>>> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>>>> desmond wrote:
>>>>> desmond <desmond@zeouane.org> wrote:
>>>>>
>>>>>> No joy. :(
>>>>> Duh. I'd put '/private/tmp/mysql.socket'
>>>>>
>>>>> Removed the feral 'et' and it works.
>>>>>
>>>>> Thanks, guys.
>>>> You shouldn't need it in php.ini if your MySQL is set up properly. That
>>>> way if you change the location of the socket you have one less file to
>>>> remember to update.
>>>
>>> But it's in my my.cnf and that doesn't change things: i still can't
>>> connect, unless I do the above modif to php.ini.
>>>
>>> D.

>> Is it in this my.cnf file you're using?

>
> yes..
> [mysqld]
> #Don't allow new user creation by the user who has no write privileges to
> the mysql.user table.
> safe-user-create
> socket=/private/tmp/mysql.sock
>
> [client]
> port=3306
> socket=/private/tmp/mysql.sock
>
>> I compile my own mysql and set it in that compile configuration options.

>
> I used a binary (gettin' lazy)..


Hmmm, the whole reason for having the client is to make it available to
those who ask.

OTOH, that may be used only for the MySQL client - I'm not sure. But
since you got it working from the php.ini file, it looks like your good
to go.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #18 (permalink)  
Old 06-28-2007
desmond
 
Posts: n/a
Default Re: [newbie] not a very auspicious start

Jerry Stuckle <jstucklex@attglobal.net> wrote:

>>> I compile my own mysql and set it in that compile configuration
>>> options.

>>
>> I used a binary (gettin' lazy)..

>
> Hmmm, the whole reason for having the client is to make it available to
> those who ask.
>
> OTOH, that may be used only for the MySQL client - I'm not sure. But
> since you got it working from the php.ini file, it looks like your good
> to go.


It does..now I just need to learn php. :-\

Thanks for the help. :-)
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0