it took me some minutes to find out dbscripts was giving me "Improper database connection settings." because of the regexp using to parse the connection assumes one is using a password (a good practice indeed, but its a @local environment), so here is a quick and dirty fix :P
dbscripts.modules line 1759
[code]
function _dbscripts_db_connect() {
require('config.inc');
require("$settings_path");
// Ensure required files are loaded
if (!isset($dump_path)) return "The file 'config.inc' does not exist. Copy from the example version?";
if (!isset($db_url)) return "The file 'settings.php' file does not exist.";
preg_match('/'.$dbtype.':\/\/([^:]+):([^@]+)@([^\/]+)\/(.+)/', $db_url, $db_settings);
if(empty($db_settings)) {
//try to parse without password
preg_match('/'.$dbtype.':\/\/([^:]+)@([^\/]+)\/(.+)/', $db_url, $db_settings);
if(!empty($db_settings)){
//match index are different
//so we cannot reuse code
$dbuser = $db_settings[1];
$dbhost = $db_settings[2];
$dbname = $db_settings[3];
//plus we need to return a different string
return "-u $dbuser -h $dbhost $dbname";
}else{
return false;
}
}else{
$dbuser = $db_settings[1];
$dbpassword = $db_settings[2];
$dbhost = $db_settings[3];
$dbname = $db_settings[4];
return "-u $dbuser -p$dbpassword -h $dbhost $dbname";
}
}
[/code]
Comments
Comment #1
hefox commentedBasically a duplicate of #303200: connect string doesn't allow for blank mysql password