Connect to MySQL on Vagrant instance with Sequel Pro

前端 未结 10 1821
囚心锁ツ
囚心锁ツ 2021-02-02 18:03

I am running Laravel on Vagrant and I am trying to connect Sequel Pro.

I have just started using Vagrant, I have followed a few tutorials on connecting to Sequel Pro how

10条回答
  •  半阙折子戏
    2021-02-02 18:53

    All you need to do is edit the bind address located here:

    $ sudo nano /etc/mysql/my.cnf
    

    Find the bind_address setting which will be set to 127.0.0.0 and change it to 0.0.0.0

    After that restart mySQL:

    $ sudo service mysql restart
    

    The final step is just updating permissions:

    $ mysql -u root -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; FLUSH PRIVILEGES;"
    

    Then connect as you normally would (changing port to what ever you set in your vagrant file).

    sequel pro settings

    Note there are security issues here since it's all pretty open but for dev work it's fine.

提交回复
热议问题