improve database config file
This commit is contained in:
parent
05b7443a3a
commit
1a3508d765
@ -25,7 +25,7 @@ task('setup:createDbConfig', function () {
|
|||||||
$db_name = ask('database name');
|
$db_name = ask('database name');
|
||||||
$db_user = ask('database user');
|
$db_user = ask('database user');
|
||||||
$db_pass = askHiddenResponse('database password');
|
$db_pass = askHiddenResponse('database password');
|
||||||
run('printf "[mysql]\nuser='.$db_user.'\npassword=\"'.$db_pass.'\"\ndatabase=\"'.$db_name.'\"\nhost='.$db_host.'\nport='.$db_port.'\n\n[mysqldump]\nuser='.$db_user.'\npassword=\"'.$db_pass.'\"\ndatabase=\"'.$db_name.'\"\nhost='.$db_host.'\nport='.$db_port.'" > {{db_conf_path}}');
|
run('printf "[client]\nuser='.$db_user.'\npassword=\"'.$db_pass.'\"\nhost='.$db_host.'\nport='.$db_port.'\n\n[mysql]\ndatabase=\"'.$db_name.'\"" > {{db_conf_path}}');
|
||||||
info('config successful created');
|
info('config successful created');
|
||||||
} else {
|
} else {
|
||||||
throw new \RuntimeException('can not create {{db_conf_path}}, task stopped');
|
throw new \RuntimeException('can not create {{db_conf_path}}, task stopped');
|
||||||
|
Loading…
Reference in New Issue
Block a user