Change port # for mysql on mac

后端 未结 6 814
甜味超标
甜味超标 2021-02-09 07:34

I just installed mysql on a mac running 10.6. The mysql version is 5.1.56. I need to have mysql run on port 3307. This article says we can change the port by modifying this file

6条回答
  •  心在旅途
    2021-02-09 08:12

    I tried a long time to get mysql running on my Mac (OSX 10.11.13) with mysql 5.7.11 to develop wordpress sites on my local machine...

    When I used the app duplicator to migrate a website to my local machine I got errors during the database import. This was caused by to stricked sql_mode...

    The trick that made it was:

    Going to

    /usr/local/mysql-5.7.11/support-files/ 
    

    and copy the content from my-default.cnf

    and paste it to

    /etc/my.cnf (if this file does not exist create it!)

    at the very last line of my.cnf I added:

    sql_mode="NO_ENGINE_SUBSTITUTION"
    

    Et voilà: sql_mode is changed permanently!

    Whoop whoop!

提交回复
热议问题