安裝並連線 mysql的影片(youtube)
https://getcomposer.org/download/ 安裝 composer
https://laravel.tw/docs/5.3/installation
使用homestead安裝的詳細方法
https://campus-xoops.tn.edu.tw/modules/tad_book3/page.php?tbdsn=1219
https://stackoverflow.com/questions/23788096/how-do-i-set-up-phpmyadmin-on-a-laravel-homestead-box
https://www.youtube.com/watch?v=lv6cK4oETjs 影片
這邊很要命。我搞了很久
folders:
- map: ~/code/
to: /home/vagrant/code
- map: ~/code/phpMyAdmin
to: /home/vagrant/code/phpmyadmin
sites:
- map: 專案目錄名稱.test
to: /home/vagrant/public_html/專案目錄名稱/public
- map: homestead.test
to: /home/vagrant/code/homestead/public
- map: homestead2.test
to: /home/vagrant/code/homestead2/public
- map: homestead3.test
to: /home/vagrant/code/homestead3/public
- map: phpmyadmin.test
to: /home/vagrant/public_html/phpmyadmin
八. 連入資料庫方法
http://zxcvbnm2749.blogspot.com/2018/02/laravel-homestead.html
因為vagrant預設連入DB是使用內建的mysql:homestead資料庫
DB:localhost
port:33060
帳號:homestead
密碼:secret
設定在laravel的 app\config\local\database.php
如果要更改成自己本機的mysql需要調整此設定檔
'mysql' => array(
'driver' => 'mysql',
'host' => '59.127.xxx.xxx',
'database' => 'white',
'username' => 'xxxx',
'password' => 'xxxx',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
laravel要連資料庫mysql的設定
不要這麼麻煩,請用lambo就可以了
phpmyadmin方法
https://www.youtube.com/watch?v=lv6cK4oETjs
沒有留言:
張貼留言