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
Wed Jul 28 20:53:51 PDT 2010


Yes, I finally was able to get MySQL to run.

I queried to see what mysql processes were running, and I got the following line:

alis-imac:tmp ali$ ps auxw | grep mysql
root      2022   0.0  0.0  2445728    572   ??  Ss    7:04PM   0:00.14 /opt/local/bin/daemondo --label=mysql5 --start-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper restart ; --pid=none

So, I issued a alis-imac:tmp ali$ sudo kill -9 2022 to kill that process.

I then rechecked for mysql processes, and I had the following:
alis-imac:tmp ali$ ps auxw | grep mysql
_mysql   31710   0.1  0.6  2508960  19860   ??  S     4:51AM   0:00.10 /opt/local/libexec/mysqld --basedir=/opt/local --datadir=/opt/local/var/db/mysql5 --user=_mysql --log-error=/opt/local/var/db/mysql5/Alis-iMac.local.err --pid-file=/opt/local/var/db/mysql5/Alis-iMac.local.pid
ali      31715   0.0  0.0  2435084    564 s000  S+    4:51AM   0:00.00 grep mysql
root     31660   0.0  0.0  2435468    780   ??  S     4:51AM   0:00.02 /bin/sh /opt/local/lib/mysql5/bin/mysqld_safe --datadir=/opt/local/var/db/mysql5 --pid-file=/opt/local/var/db/mysql5/Alis-iMac.local.pid
root     31650   0.0  0.0  2447276   1040   ??  Ss    4:51AM   0:00.01 /opt/local/bin/daemondo --label=mysql5 --start-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper restart ; --pid=none

I was the able to set the root user password.

I then installed the following

	sudo port install php5-mysql
	sudo port install phpmyadmin

They seemed to install without any problems. So I edited httpd.conf and added or uncommented the following lines:

	LoadModule php5_module modules/libphp5.so
	LoadModule fastcgi_module modules/mod_fastcgi.so
	AddType application/x-httpd-php .php
	AddType application/x-httpd-php-source .phps
	Include conf/extra/httpd-userdir.conf

I also set the following to change the web directory/root
	DocumentRoot "/Library/WebServer/Documents"
	<Directory "/Library/WebServer/Documents">

I added index.php under DirectoryIndex as such:
	<IfModule dir_module>
		DirectoryIndex index.html index.php
	</IfModule>

I then created a phpinfo.php file and added it to my root web directory. I stopped and restarted Apache and mysql.

Apache works, I can get to my web root.

But php doesn't work. When I load phpinfo.php, I get the ext echoed back to me.

Also, when I try and load phpmyadmin by browsing to http://localhost/phpmyadmin/ I get the following error:

The requested URL /phpmyadmin was not found on this server.

Other than that, all is perfect...but since php and mysql are absolutely necessary to have working, nothing is really hunky-dory.

On 29 Jul, 2010, at 05:30 , Scott Webster wrote:

> On Wed, Jul 28, 2010 at 6:46 PM, Ali A Samii <samii at me.com> wrote:
>> Well, I have restarted the whole thing and I have gotten as far as getting mysql to install and be able to automatically generate the initial database.
>> 
>> 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!
>> 
> 
> Is mysql actually running now?

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


More information about the macports-users mailing list