關於 phpMyAdmin 管理 Homestead MySQL 資料庫的配置

mrsmallyi發表於2018-12-12
  1. 下載phpMyAdmin包,放到設定共享目錄下 ~/Code/
    https://www.phpmyadmin.net/downloads/

  2. 配置Homestead.yaml檔案,分別在folders 和sites 下再新增如下配置

    ---
    ip: "192.168.15.10"
    memory: 2048
    cpus: 1
    provider: virtualbox
    authorize: ~/.ssh/id_rsa.pub
    keys:
    - ~/.ssh/id_rsa
    folders:
    - map: ~/Code
      to: /home/vagrant/Code
    - map: ~/Code/phpMyAdmin
      to: /home/vagrant/Code/phpMyAdmin
    sites:
    - map: homestead.test
      to: /home/vagrant/Code/statistics/public
    - map: phpMyAdmin.test
      to: /home/vagrant/Code/phpMyAdmin
    databases:
    - homestead
  3. 重新載入Homestead.yaml檔案
    \homestead目錄,執行vagrant provision命令過載 Homestead.yaml 檔案。

  4. 在host檔案中新增域名ip地址對映

192.168.15.10   phpMyAdmin.test

IP地址根據自身實際情況配置

  1. 瀏覽器訪問phpMyAdmin.test ,測試是否登入成功
    file
本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章