http://expect7.pixnet.net/blog/post/65167495
注意:可以手動匯出DB BackUP
使用Larvel可以連線不同DB 在app/config/database.php
設定不同連線
在程式當中使用連線可以做:
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'white',
'username' => 'xxxxxxxx',
'password' => 'xxxxxxxx',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
'mysql_player' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'player',
'username' => 'xxxxxxxx',
'password' => 'xxxxxxxx',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
DB::connection('mysqlr')->table('white')->count();
DB::connection('mysql_player')->table('player')->count();