Wednesday, April 25, 2018

php - MAMP upgrade from MySQL 5.5 to 5.6




I am upgrading MySQL 5.5 to 5.6 for MAMP



Do I need to get a new .so file for php integration with 5.6



Configuration File (php.ini) Path /Applications/MAMP/bin/php/php5.3.14/conf



So, I added the change in php.ini in above directory to use /tmp/mysql.sock which is used by MySQL 5.6



But, even after this phpinfo page still shows MySQL 5.5 and also php code is always trying to connect to MySQL 5.5




I find that both MySQL 5.5 and MySQL 5.6 can run together on port 3306 since they work on different sock files. MySQL 5.6 has /tmp/mysql.sock and MySQL 5.5 has /Applications/MAMP/tmp/mysql/mysql.sock



Need to read from MySQL 5.6 instead of 5.5 database from php for upgrade..



EDIT



I tried created a Soft Link -
ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock



But this gives error in php ->

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)


Answer



Answer to this post solved it. All I had to do was change localhost to 127.0.0.1 in yii while configuring db module



yii error while excecuting custom command


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...