[Dxspider-support] DBI interface error

IZ5FSA iz5fsa at gmail.com
Thu Mar 24 23:04:50 GMT 2022


Hi OMs,

I have this error on access to MariaDB.

> DBI connect('dxcluster:localhost:3306','sysop',...) failed: Access 
> denied for user 'sysop'@'localhost' (using password: YES )  at 
> /spider/perl/DXSql.pm line 63.
In  /spider/local-new/DXVars.pm I have:

> # the SQL database DBI dsn
> #$dsn = "dbi:SQLite:dbname=$root/data/dxspider.db";
> #$dbuser = "";
> #$dbpass = "";
>
> # the SQL database DBI dsn
> $dsn = "dbi:mysql:dxcluster:localhost:3306";
> $dbuser = "sysop";
> $dbpass = "MyPassword";
In MariaDB the user "sysop" have grant full access to the dxcluster 
database.


If I use this script, access is fine...

> #!/usr/bin/perl
>
> use DBI;
>
> $source = "DBI:mysql:dxcluster:localhost";
> $username = "sysop";
> $password = "MyPassword";
>
> $dbc = DBI->connect($source, $username, $password)
> or die "Unable to connect to mysql: $DBI::errstr\n";
>
> $sql = $dbc->prepare("SELECT count(*) FROM spot_backup");
>
> $out = $sql->execute()
> or die "Unable to execute sql: $sql->errstr";
>
> while (($id, $name) = $sql->fetchrow_array())
> {
>  print "Id: $id Name: $name\n";
> }
...and obviously it return

> Id: 0 Name:
because table is empty.

I cannot find any documentation of this DBI feature in docs.

Where is the trick? In the MariaDB parameters? Anyone have tryed this 
kind of error?

best 73 de Leo IZ5FSA






More information about the Dxspider-support mailing list