[Dxspider-support] DBI interface error

Danilo Brelih danilo.brelih at siol.net
Fri Mar 25 08:03:22 GMT 2022


If I remember correctly DXSpider doesn't create database itself. Try creating database manually first. 

- Create database with: 

CREATE DATABASE dxspider; 

- Give right privilages to the user you are using for dxspider with: 

GRANT ALL PRIVILEGES ON dxspider.* to 'sysop'@'localhost'; 

- Creating table with: 

CREATE TABLE 'spot' ( 'rowid' int(11) NOT NULL AUTO_INCREMENT, 'freq' double NOT NULL, 'spotcall' varchar(14) NOT NULL, 'time' int(11) NOT NULL, 'comment' varchar(255) DEFAULT NULL, 'spotter' varchar(14) NOT NULL, 'spotdxcc' smallint(6) DEFAULT NULL, 'spotterdxcc' smallint(6) DEFAULT NULL, 'origin' varchar(14) DEFAULT NULL, 'spotitu' tinyint(4) DEFAULT NULL, 'spotcq' tinyint(4) DEFAULT NULL, 'spotteritu' tinyint(4) DEFAULT NULL, 'spottercq' tinyint(4) DEFAULT NULL, 'spotstate' char(2) DEFAULT NULL, 'spotterstate' char(2) DEFAULT NULL, 'ipaddr' varchar(40) DEFAULT NULL, PRIMARY KEY ('rowid'), KEY 'spot_ix1' ('time'), KEY 'spot_ix2' ('spotcall'), KEY 'spiderweb_spotter' ('spotter') ) ENGINE=InnoDB AUTO_INCREMENT=2598318 DEFAULT CHARSET=utf8mb4 

Reboot. 

GL Dan, S50U 

----- Dne 25. Mar. 2022 ob 07:55 je The DXSpider Support list <dxspider-support at tobit.co.uk> napisal(a): 

> Nope... error still remain the same.

> Is there a documentation around the mysql/sqlite dxspider support?

> reading source all seems to be nice...

> Il 25/03/2022 00:20, Dirk Koopman via Dxspider-support ha scritto:
> > Try changing the $dsn strings to be the same (i.e. lose the ':3306').

> > On 24/03/2022 23:04, IZ5FSA via Dxspider-support wrote:
> >> 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




> >> _______________________________________________
> >> Dxspider-support mailing list
> >> Dxspider-support at tobit.co.uk
> >> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support


> > _______________________________________________
> > Dxspider-support mailing list
> > Dxspider-support at tobit.co.uk
> > https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support

> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at tobit.co.uk
> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20220325/1699474b/attachment-0001.htm>


More information about the Dxspider-support mailing list