Still have MySQL problems that need to get solved soon (was: Re: Apache and MySQL won't start)

Ali A Samii samii at me.com
Thu Jul 29 03:53:28 PDT 2010


Hi Scott:

I successfully installed MySQL as step 1 of your tutorial. I also successfully installed Apache as in your tutorial, but, I seem to have some problems because my httpd.conf edits (to enable the Apache manual, for example) have no effect. Of course, I saved the http.conf file and restarted apache, which actually gave me an error:

ali$ sudo /opt/local/apache2/bin/apachectl -k restart
httpd not running, trying to start
(48)Address already in use: make_sock: could not bind to address [::]:80
(48)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

So I did a sudo port unload apache2, checked running httpd processes (had a whole bunch) killed them (or so I thought) then ps checked for httpd processes again, and still had a whole bunch...Seems something is auto-resuming the killed processes.

ali$ ps auwx | grep httpd
_www     90519   0.0  0.0  2451584    620   ??  S    12:43PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90517   0.0  0.0  2451584    620   ??  S    12:43PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90515   0.0  0.0  2451584    620   ??  S    12:43PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90512   0.0  0.0  2451584   1552   ??  S    12:42PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90510   0.0  0.0  2451584   1536   ??  S    12:42PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90504   0.0  0.0  2455536    620   ??  S    12:42PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90502   0.0  0.0  2455536    620   ??  S    12:42PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90499   0.0  0.0  2455536    620   ??  S    12:42PM   0:00.00 /opt/local/apache2/bin/httpd -k start
_www     90497   0.0  0.0  2455536    620   ??  S    12:42PM   0:00.00 /opt/local/apache2/bin/httpd -k start
ali      90603   0.0  0.0  2435084    564 s000  S+   12:52PM   0:00.00 grep httpd

So I think somehow I have not been successful in fully shutting down and restarting apache2.

Any ideas?


On 29 Jul, 2010, at 11:45 , Ali A Samii wrote:

> Hi Scott:
> 
> Since I couldn't get things to work for me last night (I'm in Paris, France) and I had been up to almost 6 AM to get things to work, I gave up for the night (or I should say the morning) and went to get some sleep.
> 
> Anyway, I just got your email with the tutorial, and I am going to do a fresh, clean and directed reinstall of everything according to your tutorial, and I'll get back to you in the event of a hiccup and/or in the event of success.
> 
> If all else fails, log into my system. I'll get you the info needed at that time.
> 
> Thanks,
> 
> Ali
> 
> On 29 Jul, 2010, at 06:45 , Scott Haneda wrote:
> 
>> On Jul 28, 2010, at 6:46 PM, Ali A Samii wrote:
>> 
>>> However, I still cannot change the password.
>>> 
>>> I get the following Error:
>>> 
>>> alis-imac:bin ali$ /opt/local/lib/mysql5/bin/mysqladmin -u root password 'golijoon'
>>> /opt/local/lib/mysql5/bin/mysqladmin: connect to server at 'localhost' failed
>>> error: 'Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)'
>>> Check that mysqld is running and that the socket: '/opt/local/var/run/mysql5/mysqld.sock' exists!
>>> 
>>> I really need to get this issue solved as soon as possible, so I hope that I can get it done in theft hour or two.
>> 
>> Have you tried:
>> sudo /opt/local/lib/mysql5/bin/mysql_secure_installation
>> This will run you through an interactive shell that should get things in order.
>> * Probably will not work if Mysql is not loading because it can't locate the socket file.
>> 
>> What is in /opt/local/etc/mysql5/my.cnf for the socket?  
>> If you have no file in that location, you can find a sample by using:
>>   $port contents mysql5 | grep \.ini
>> 
>> Once you find the sample configi ini file, you can copy in perhaps the medium one.
>> 
>> I have the values:
>>   socket		= /opt/local/var/run/mysql5/mysqld.sock
>> 
>> I also added this right after the thread_concurrency = x setting
>> 
>> # Custom settings made by scott at newgeo.com 03/16/2010 05:36:10 PM	
>> 
>> # Without this, OS X will default to 2, HFS is not case-sensitive
>> # but, http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html#sysvar_lower_case_table_names
>> # explicitly states to set to 1 if InnoDB will be used, and I may someday.  It does not seem
>> # a bad idea to have names forced lowercase, it is consistent
>> lower_case_table_names=1
>> 
>> # End custom settings made by scott at newgeo.com
>> 
>> if that does not work, and only because you are in a time crunch, as I really don't want to put this file out there, and should instead work to add it to the wiki...
>> 
>> I wrote up a mini tutorial, which I reference when I do new installs, and it tends to get me through it.  There are some errors, obvious ones, where I forgot to sudo or other syntactical issues.
>> 
>>   http://dl.dropbox.com/u/340087/drops/01.04.10/mamp/MAMP%20Tutorial.html
>> 
>> I will yank those files in a day or so as to not pollute the documentation of MacPorts.
>> 
>> MySql should not take more than 5 minutes to get going once it is built.  Depending on how things go tonight, if you really get stuck, drop me an email following the instructions in my sig and I may take you up on your offer to ssh in, which I believe you mentioned in your first post.
>> -- 
>> Scott (* For off-list contact, replace talklists@ with scott@ *)
>> 
> 
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100729/f3749e6f/attachment.html>


More information about the macports-users mailing list