PHP55 Upgrade , PHPMyAdmin No Longer Works

Jasper Frumau jasperfrumau at gmail.com
Fri Aug 22 03:10:48 PDT 2014


Well inside config.inc.php I changed tcp to socket
$cfg['Servers'][$i]['connect_type'] = 'socket'; et voila! Now I can access
the site. Why does TCP not work? No idea? Why I still have Connection for
controluser as defined in your configuration failed. no idea either. And
then there is the issue with the databases I need moved from the old
location. But this is great progress.




On Fri, Aug 22, 2014 at 10:51 AM, Jasper Frumau <jasperfrumau at gmail.com>
wrote:

> sudo mysqladmin -u root -p password worked now and I set a new password.
> After that I could enter mysql client using the newly picked password:
>
> mysql -u root -p
>
> Enter password:
>
> Welcome to the MySQL monitor.  Commands end with ; or \g.
>
> Your MySQL connection id is 7
>
> Server version: 5.5.38 Source distribution
>
> I think initially I forgot to set it properly AND I used mysql5 instead of
> mysql to access the MySQLMonitor.
>
> Thought I copied the databases as you mentioned there before but I do not
> see them now:
>
> mysql> show databases;
>
> +--------------------+
>
> | Database           |
>
> +--------------------+
>
> | information_schema |
>
> | mysql              |
>
> | mysql5             |
>
> | performance_schema |
>
> | test               |
>
> +--------------------+
>
> 5 rows in set (0.08 sec)
>
> Not a real issue, but makes me wonder where I put them or if I still have
> them in the old location, but not this new location.
>
> socket error is still there #2002 Cannot log in to the MySQL server so no
> change getting into phpmyadmin.
>
> Then I did
>
> /opt/local/www/phpmyadmin
>
> jaspersmbp:phpmyadmin jasper$ mate config.inc.php
>
> And changed localhost to $cfg['Servers'][$i]['host'] = '127.0.0.1'; and
> socketpath to $cfg['Servers'][$i]['socket'] =
> '/opt/local/var/run/mysql55/mysqld.sock';
>
> I restarted the apache server. Still the #3003 error!
>
>
>
> On Fri, Aug 22, 2014 at 10:30 AM, Jasper Frumau <jasperfrumau at gmail.com>
> wrote:
>
>> I was wondering if my php.ini was loaded.. so I checked:
>>
>> php -i | grep 'Configuration File'
>>
>> Configuration File (php.ini) Path => /opt/local/etc/php55
>>
>> Loaded Configuration File => /opt/local/etc/php55/php.ini
>>
>> And I found out I was editing the wrong php.ini in php5. Changed the
>> socket path in the ini, reloaded apache and it showed. Still had the same
>> error in mysql client though. Perhaps I should make a custom my.cnf? Do not
>> think I needed that before..
>>
>>
>> On Fri, Aug 22, 2014 at 10:14 AM, Jasper Frumau <jasperfrumau at gmail.com>
>> wrote:
>>
>>> PHP 5.5.15 (cli) (built: Jul 25 2014 13:17:32)
>>>
>>> Copyright (c) 1997-2014 The PHP Group
>>>
>>> Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
>>>     with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
>>>
>>> When I check php55'ini I have this as a socket:
>>>
>>> cd /opt/local/etc/php5
>>>
>>> jaspersmbp:php5 jasper$ mate php.ini
>>>
>>> ; Default socket name for local MySQL connects.  If empty, uses the
>>> built-in
>>> ; MySQL defaults.
>>> ; http://php.net/mysql.default-socket
>>> mysql.default_socket =/opt/local/var/run/mysql55/mysqld.sock
>>>
>>> but mysql client is looking for
>>>
>>> Can't connect to local MySQL server through socket
>>> '/opt/local/var/run/mysql5/mysqld.sock' (2)
>>>
>>> in the php.ini run from localhost/info.php I also see it is running that
>>> socket
>>> mysql.default_socket /opt/local/var/run/mysql5/mysqld.sock
>>> /opt/local/var/run/mysql5/mysqld.sock
>>>
>>> but netstat tells me
>>>
>>> netstat |grep mysql
>>>
>>> 2280fd242d1a668b stream      0      0 2280fd242f66a5d3                0
>>>               0                0 /opt/local/var/run/mysql55/mysqld.sock
>>>
>>> is running
>>>
>>> So the MySQL client is going for another socket that is not running..
>>> How to change that?
>>>
>>>
>>>
>>> On Fri, Aug 22, 2014 at 9:41 AM, Jasper Frumau <jasperfrumau at gmail.com>
>>> wrote:
>>>
>>>> Thanks a lot for the insight. Working on it again now. Added the MySQL
>>>> version as you added:
>>>>
>>>> sudo cp -r /opt/local/var/db/mysql5  /opt/local/var/db/mysql55
>>>>
>>>> sudo chown -R  _mysql:_mysql /opt/local/var/db/mysql55
>>>>
>>>> sudo port install mysql55 +openssl mysql55-server
>>>>
>>>>
>>>> sudo port select mysql mysql55
>>>>
>>>>  Got this error:
>>>>
>>>> --->  Cleaning mysql55
>>>>
>>>> Error: Port mysql55-serve not found
>>>>
>>>> Then I decided to upgrade all first and see. It upgraded PHPMyadmin as
>>>> well.
>>>>
>>>> --->  Activating phpmyadmin @4.2.7.1_0+php5
>>>>
>>>> Still had the error
>>>>
>>>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
>>>> '/opt/local/var/run/mysql5/mysqld.sock' (2)
>>>>
>>>>
>>>> Then I followed your writings a little further:
>>>>
>>>> sudo /opt/local/lib/mysql55/bin/mysqld_safe &
>>>>
>>>> [1] 19249
>>>>
>>>> jaspersmbp:php5 jasper$ cd /opt/local/lib/mysql55
>>>>
>>>>
>>>> [1]+  Stopped                 sudo
>>>> /opt/local/lib/mysql55/bin/mysqld_safe  (wd: /opt/local/etc/php5)
>>>>
>>>> (wd now: /opt/local/lib/mysql55)
>>>>
>>>> jaspersmbp:mysql55 jasper$ sudo mysqladmin -u root -p password
>>>>
>>>> Password:
>>>>
>>>> Sorry, try again.
>>>>
>>>> Password:
>>>>
>>>> Sorry, try again.
>>>>
>>>> Password:
>>>>
>>>> Sorry, try again.
>>>>
>>>> sudo: 3 incorrect password attempts
>>>>
>>>> The password I know does not seem to be the password it needs. Perhaps
>>>> there is a new standard password added now. Not sure yet.
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 8:59 PM, Bill Christensen <
>>>> billc_lists at greenbuilder.com> wrote:
>>>>
>>>>>  By the way, the reason I'm reading the MacPorts list today is to
>>>>> report a problem I just discovered with the latest ImageMagick upgrade. On
>>>>> my WordPress sites, uploading an image fails.  I reverted to  ImageMagick
>>>>> @6.8.9-1_0+x11 and all is well.
>>>>>
>>>>> Just in case you run into similar.
>>>>>
>>>>> On 8/21/14 11:04 AM, Jasper Frumau wrote:
>>>>>
>>>>> OK. Selected MySQL55 and server, then unloaded MYSQL 5 so I did not
>>>>> have to running and now I have
>>>>>
>>>>>  mysql5 -u root -p
>>>>>
>>>>> Enter password:
>>>>>
>>>>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
>>>>> '/opt/local/var/run/mysql5/mysqld.sock' (2)
>>>>>
>>>>>  and I think that is because the socket path is not correct. Not sure
>>>>> yet how to adjust...
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 6:44 PM, Jasper Frumau <jasperfrumau at gmail.com
>>>>> > wrote:
>>>>>
>>>>>> Reloading the page / phpmyadmin on Firefox I saw "You should upgrade
>>>>>> to MySQL 5.5.0 or later." So I
>>>>>>
>>>>>>  The mysql55 client has been installed.
>>>>>>
>>>>>> To install the mysql55 server, install the mysql55-server port.
>>>>>>
>>>>>> --->  Activating mysql55 @5.5.38_0
>>>>>>
>>>>>>
>>>>>>  On activation if no /opt/local/etc/mysql55/my.cnf file exists one
>>>>>>
>>>>>> will be created which loads
>>>>>>
>>>>>> /opt/local/etc/mysql55/macports-default.cnf.
>>>>>>
>>>>>>
>>>>>>  If a /opt/local/etc/mysql55/my.cnf file exists MacPorts does not
>>>>>>
>>>>>> touch it and any changes you make to /opt/local/etc/mysql55/my.cnf
>>>>>>
>>>>>> will be preserved (e.g., during port upgrades, deactivations or
>>>>>>
>>>>>> activations). /opt/local/etc/mysql55/my.cnf is a good place to
>>>>>>
>>>>>> customize your mysql55 installation.
>>>>>>
>>>>>>
>>>>>>  Any changes made to /opt/local/etc/mysql55/macports-default.cnf
>>>>>>
>>>>>> will be lost during port upgrades, deactivations or activations so you
>>>>>>
>>>>>> are advised to not make changes here. Currently
>>>>>>
>>>>>> /opt/local/etc/mysql55/macports-default.cnf contains only one
>>>>>>
>>>>>> directive; to disable networking. With disabled networking it is
>>>>>>
>>>>>> possible to install and have running all the MacPorts mysql ports
>>>>>>
>>>>>> simultaneously.
>>>>>>
>>>>>>
>>>>>>  --->  Cleaning mysql55
>>>>>>
>>>>>> --->  Updating database of binaries
>>>>>>
>>>>>> --->  Scanning binaries for linking errors
>>>>>>
>>>>>> --->  No broken files found.
>>>>>>
>>>>>> jaspersmbp:phpmyadmin jasper$ sudo port install php55-xdebug
>>>>>> php55-sqlite php55-pear php55-openssl php55-mysql php55-memcached
>>>>>> php55-mcrypt php55-mbstring php55-imagick php55-iconv php55-gd php55-curl
>>>>>>
>>>>>>  But I still have the same error. I do not think I need to install
>>>>>> the mysql server do I? Well I did it anyways, but still #2002 Cannot
>>>>>> log in to the MySQL server
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 5:25 PM, Jasper Frumau <
>>>>>> jasperfrumau at gmail.com> wrote:
>>>>>>
>>>>>>> I have had a Macports LAMP running for a year now or so and just
>>>>>>> upgraded to php 5.5. port to do some more development on my MBP. So I added
>>>>>>> the openssl port as well as the necessary php55 ports (got some help from
>>>>>>> http://blog.kicaj.com/installing-and-configuring-php-5-5-using-macports/
>>>>>>> ) :
>>>>>>>
>>>>>>>  7541  sudo port install php55
>>>>>>>
>>>>>>>  7547  sudo port select php php55
>>>>>>>
>>>>>>>  7557  port search php | grep apache
>>>>>>>
>>>>>>>  7571  sudo port install php55-apache2handler
>>>>>>>
>>>>>>>  7592  sudo port install php5-openssl
>>>>>>>
>>>>>>>  7593  sudo port install php55-openssl
>>>>>>>
>>>>>>>  7605  sudo port search mbstring
>>>>>>>
>>>>>>>  7606  sudo port install php55-mbstring
>>>>>>>
>>>>>>>  7608  sudo port install php55-mysqli
>>>>>>>
>>>>>>>  7609  sudo port search mysqli
>>>>>>>
>>>>>>>  7610  sudo port install php55-mysql
>>>>>>>
>>>>>>>  PHP 5.5. is running:
>>>>>>>
>>>>>>>  php --version
>>>>>>>
>>>>>>> PHP 5.5.15 (cli) (built: Jul 25 2014 13:17:32)
>>>>>>>
>>>>>>> Copyright (c) 1997-2014 The PHP Group
>>>>>>> Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
>>>>>>>
>>>>>>>  And I checked the ini from localhost and all good.
>>>>>>> MySQL is OK and is still running:
>>>>>>>
>>>>>>>
>>>>>>>  mysql5 -u root -p
>>>>>>>
>>>>>>> Enter password:
>>>>>>>
>>>>>>> Welcome to the MySQL monitor.  Commands end with ; or \g.
>>>>>>>
>>>>>>> Your MySQL connection id is 348
>>>>>>>
>>>>>>> Server version: 5.1.72-log Source distribution
>>>>>>>
>>>>>>>
>>>>>>>  But in phpmyadmin I now get this error:
>>>>>>>
>>>>>>>  #2002 Cannot log in to the MySQL server
>>>>>>>
>>>>>>>  I browsed some forums and tried a few rings like adding the path
>>>>>>> to the mysql socket in the php 55 init, but I still cannot get phpmyadmin
>>>>>>> to work again.
>>>>>>>
>>>>>>>  Any ideas?
>>>>>>>
>>>>>>>  --
>>>>>>> *Jasper*
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>   --
>>>>>> *Jasper Frumau @ Imagewize Ltd* web design | web development |
>>>>>> branding
>>>>>> w: imagewize. <http://www.imagewize.net/>com email: jasper at imagewize.
>>>>>> <jasper at imagewize.net>com t:  +66806044547 skype: frumau
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  --
>>>>> *Jasper Frumau @ Imagewize Ltd* web design | web development |
>>>>> branding
>>>>> w: imagewize. <http://www.imagewize.net/>com email: jasper at imagewize.
>>>>> <jasper at imagewize.net>com t:  +66806044547 skype: frumau
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> macports-users mailing listmacports-users at lists.macosforge.orghttps://lists.macosforge.org/mailman/listinfo/macports-users
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Jasper Frumau @ Imagewize Ltd* web design | web development | branding
>>>> w: imagewize. <http://www.imagewize.net/>com email: jasper at imagewize.
>>>> <jasper at imagewize.net>com t:  +66806044547 skype: frumau
>>>>
>>>
>>>
>>>
>>> --
>>> *Jasper Frumau @ Imagewize Ltd* web design | web development | branding
>>> w: imagewize. <http://www.imagewize.net/>com email: jasper at imagewize.
>>> <jasper at imagewize.net>com t:  +66806044547 skype: frumau
>>>
>>
>>
>>
>> --
>> *Jasper Frumau @ Imagewize Ltd* web design | web development | branding
>> w: imagewize. <http://www.imagewize.net/>com email: jasper at imagewize.
>> <jasper at imagewize.net>com t:  +66806044547 skype: frumau
>>
>
>
>
> --
> *Jasper Frumau @ Imagewize Ltd* web design | web development | branding
> w: imagewize. <http://www.imagewize.net/>com email: jasper at imagewize.
> <jasper at imagewize.net>com t:  +66806044547 skype: frumau
>



-- 
*Jasper Frumau @ Imagewize Ltd* web design | web development | branding
w: imagewize. <http://www.imagewize.net/>com email: jasper at imagewize.
<jasper at imagewize.net>com t:  +66806044547 skype: frumau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20140822/e7f138b9/attachment.html>


More information about the macports-users mailing list