PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, March 9, 2022

[FIXED] MAMP upgrade from MySQL 5.5 to 5.6

 March 09, 2022     mamp, mysql, php, yii     No comments   

Issue

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)


Solution

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



Answered By - fortm
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing