This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dump-yourdb { | |
$command_pattern = "C:\path\to\mysqldump.exe -u {0} -p{1} --skip-extended-insert --skip-dump-date {2} -r {3}" | |
$command = $command_pattern -f '<username>','<password>','<database>','C:\path\to\dumpfile' | |
echo 'Executing: ' $command | |
Invoke-Expression $command | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// assuming we are in a subfolder to root like 'scripts' | |
define('TL_ROOT', dirname(__DIR__)); | |
require TL_ROOT . '/system/config/localconfig.php'; | |
// Database credentials | |
$strHost = $GLOBALS['TL_CONFIG']['dbHost']; | |
$strUser = $GLOBALS['TL_CONFIG']['dbUser']; | |
$strPassword = $GLOBALS['TL_CONFIG']['dbPass']; |