Commit 776e96ff authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: substituting --password for --pass to pacify mysql 5.5.34+ that no...

bugfix: substituting --password for --pass to pacify mysql 5.5.34+ that no longer recognizes options by their prefix
parent 4bf4723a
......@@ -310,10 +310,10 @@ sub mysql_conn { # an example stringification formatter (others can be defined h
my ($self, $db_conn) = @_;
if(ref($db_conn) eq 'HASH') {
return "--host=$db_conn->{-host} --port=$db_conn->{-port} --user='$db_conn->{-user}' --pass='$db_conn->{-pass}' $db_conn->{-dbname}";
return "--host=$db_conn->{-host} --port=$db_conn->{-port} --user='$db_conn->{-user}' --password='$db_conn->{-pass}' $db_conn->{-dbname}";
} else {
my $dbc = go_figure_dbc( $db_conn );
return '--host='.$dbc->host.' --port='.$dbc->port." --user='".$dbc->username."' --pass='".$dbc->password."' ".$dbc->dbname;
return '--host='.$dbc->host.' --port='.$dbc->port." --user='".$dbc->username."' --password='".$dbc->password."' ".$dbc->dbname;
}
}
......
......@@ -264,7 +264,7 @@ sub dbconn_2_mysql { # will save you a lot of typing
return '--host='.$self->o($db_conn,'-host').' '
.($port ? '--port='.$self->o($db_conn,'-port').' ' : '')
.'--user="'.$self->o($db_conn,'-user').'" '
.'--pass="'.$self->o($db_conn,'-pass').'" '
.'--password="'.$self->o($db_conn,'-pass').'" '
.($with_db ? ($self->o($db_conn,'-dbname').' ') : '');
}
......
......@@ -205,7 +205,7 @@ sub run {
sub mysql_conn_from_dbc {
my ($self, $dbc) = @_;
return '--host='.$dbc->host.' --port='.$dbc->port." --user='".$dbc->username."' --pass='".$dbc->password."' ".$dbc->dbname;
return '--host='.$dbc->host.' --port='.$dbc->port." --user='".$dbc->username."' --password='".$dbc->password."' ".$dbc->dbname;
}
......
......@@ -196,7 +196,7 @@ sub get_row_count {
sub mysql_conn_from_dbc {
my ($self, $dbc) = @_;
return '--host='.$dbc->host.' --port='.$dbc->port." --user='".$dbc->username."' --pass='".$dbc->password."' ".$dbc->dbname;
return '--host='.$dbc->host.' --port='.$dbc->port." --user='".$dbc->username."' --password='".$dbc->password."' ".$dbc->dbname;
}
1;
......
......@@ -128,7 +128,7 @@ sub dbc_hash_to_cmd {
$cmd = ($to_params ? '' : 'mysql ')
."--host=$dbc_hash->{host} "
.(defined($dbc_hash->{port}) ? "--port=$dbc_hash->{port} " : '')
."--user=$dbc_hash->{user} --pass='$dbc_hash->{pass}' "
."--user=$dbc_hash->{user} --password='$dbc_hash->{pass}' "
.(defined($extra) ? "$extra " : '')
.($dbc_hash->{dbname} || '')
.(defined($sqlcmd) ? " -e '$sqlcmd'" : '');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment