MySQL error installing Drupal

Jasper Frumau jasperfrumau at gmail.com
Thu Jan 14 06:32:42 PST 2010


Well I am happy :-) Apache and PHP installed and Drupal running. I also
needed to add php5-gd and php5-mbstring and replace one deprecated ereg
function, but all good. Only mod_rewrite is not running according to Drupal:
our system configuration does not currently support this feature. The handbook
page on Clean URLs <http://drupal.org/node/15365> has additional
troubleshooting information.

Even though:

Jaspers-MacBook-Pro:conf jasper$ httpd -M | grep rewrite
Syntax OK
 rewrite_module (shared)
Jaspers-MacBook-Pro:conf jasper$

 Well will try to figure that out as soon as possible. Need a break soon...

On Thu, Jan 14, 2010 at 4:57 PM, Jasper Frumau <jasperfrumau at gmail.com>wrote:

> Well I changed /opt/local/etc/php5/ and finally saw a change in the error
> message. Still no correct path to the sock though:
>
> *Warning*: mysql_connect() [function.mysql-connect<http://localhost/function.mysql-connect>]:
> [2002] No such file or directory (trying to connect via
> unix:///opt/local/var/run/mysql5/mysql.sock) in *
> /opt/local/apache2/htdocs/connect-test.php* on line *2*
>
>
> *Warning*: mysql_connect() [function.mysql-connect<http://localhost/function.mysql-connect>]:
> No such file or directory in */opt/local/apache2/htdocs/connect-test.php*on line
> *2*
> Could not connect: No such file or directory
>
> Then I saw I had to use mysqld.sock and voila:
>
> Connected successfully
>
> On Thu, Jan 14, 2010 at 4:39 PM, Jasper Frumau <jasperfrumau at gmail.com>wrote:
>
>> Well back to square one with PHP, MySQl and Apache under MacPorts.@
>> http://localhost/drupal-6.15/install.php?profile=default&locale=en after
>> adding database name, database user and password I get:
>>
>> Failed to connect to your MySQL database server. MySQL reports the
>> following message: *No such file or directory*.
>>
>>    - Are you sure you have the correct username and password?
>>    - Are you sure that you have typed the correct database hostname?
>>    - Are you sure that the database server is running?
>>
>> For more help, see the Installation and upgrading handbook<http://drupal.org/node/258>.
>> If you are unsure what these terms mean you should probably contact your
>> hosting provider.
>>
>> and when I run http://localhost/connect-test.php I still get:
>>
>> *Warning*: mysql_connect() [function.mysql-connect<http://localhost/function.mysql-connect>]:
>> [2002] No such file or directory (trying to connect via
>> unix:///tmp/mysql.sock) in */opt/local/apache2/htdocs/connect-test.php*on line
>> *2*
>>
>> *Warning*: mysql_connect() [function.mysql-connect<http://localhost/function.mysql-connect>]:
>> No such file or directory in */opt/local/apache2/htdocs/connect-test.php*on line
>> *2*
>>
>> Could not connect: No such file or directory
>>
>> But I guess I need to add the paths to mysql.sock again..
>>
>>
>>
>>
>> On Thu, Jan 14, 2010 at 3:27 PM, Jasper Frumau <jasperfrumau at gmail.com>wrote:
>>
>>> I have Apache and PHP running.
>>> Jaspers-MacBook-Pro:conf jasper$ sudo vim httpd.conf
>>> Jaspers-MacBook-Pro:conf jasper$ sudo /opt/local/apache2/bin/apachectl -k
>>> restart
>>> Jaspers-MacBook-Pro:conf jasper$
>>>
>>> I can see localhost and info.php shows PHP 5.3.1 with PHP.ini located @
>>> /opt/local/etc/php5  The link Scott gave me plus all the other tips helped a
>>> lot. Thanks!!
>>>
>>> Will try to install Drupal one more time now..
>>>
>>>
>>>
>>>
>>> On Thu, Jan 14, 2010 at 2:22 PM, Scott Haneda <talklists at newgeo.com>wrote:
>>>
>>>> On Jan 14, 2010, at 3:13 AM, Jasper Frumau wrote:
>>>>
>>>> > On Thu, Jan 14, 2010 at 2:04 PM, Scott Haneda <talklists at newgeo.com>
>>>> wrote:
>>>> >
>>>> >> Ok, really quick, and I need to get off to sleep…
>>>> >>
>>>> >> Maybe you can give us a clear explanation of what your goals are, is
>>>> it to
>>>> >> run Apache2, Mysql5, and php5 all under MacPorts, or do you want to
>>>> mix and
>>>> >> match bits from Apple and  MacPorts?   I suggest the former, and
>>>> should have
>>>> >> nightmares about the later in about a half hour :)
>>>> >>
>>>> >
>>>> > I would prefer all under MacPorts (Apache2, PHP5 and MySQL5). Apple's
>>>> > Websharing / Apache has been turned off and I just now need to get
>>>> Apache
>>>> > and PHP from MacPorts and get all running properly so my Wordpress
>>>> will run
>>>> > again and so I can install Drupal without any issues....  I'd like to
>>>> avoid
>>>> > further hasssles :-) But it can wait until it is day again at your
>>>> side of
>>>> > the planet. Thanks for all the help so far. I appreciate it a lot! I
>>>> learned
>>>> > a lot already!!
>>>>
>>>> Good, that makes it simple, you are mostly there.
>>>> I think all you need to to is run the launchctl command to load apache.
>>>>
>>>> This may help some: http://trac.macports.org/wiki/howto/MAMP
>>>>
>>>> You need to run this command:
>>>> sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
>>>>
>>>> But that also means you need to configure Apache a little, this means at
>>>> the least, the following:
>>>> 1) Decide if you want user directory support, enable or disable it
>>>> 2) Decide if you want a local copy of the Apache manual to work, enable
>>>> or disable it
>>>> 3) include the "mod_php.conf" into your Apache config file
>>>>        This alone could be most of your issues
>>>> 4) Maybe load the php module, I am not sure the state your setup is in
>>>> 5) Restart apache after each of those steps, test to be sure they are
>>>> working.
>>>>
>>>> Talk to you tomorrow.
>>>>
>>>> --
>>>> Scott * If you contact me off list replace talklists@ with scott@ *
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100114/c04eacaf/attachment.html>


More information about the macports-users mailing list