major/MySQLTuner-perl

Use of uninitialized value $mysqllogin in concatenation (.) or string at mysqltuner.pl line 6356

Open

#490 opened on Apr 6, 2020

View on GitHub
 (3 comments) (0 reactions) (1 assignee)Perl (9,452 stars) (1,293 forks)batch import
Help Wantedenhancement

Description

I'm trying to run the tuner against MariaDB 10.3 hosted and managed by Microsoft Azure. SSL enforcement is enabled.

The command I'm using looks like this: perl mysqltuner.pl --host <instance>.mariadb.database.azure.com --user <username>@<instance> --pass '<password>' --ssl-ca <certpath> --forcemem 10000

I've also tried --userenv and --passenv env variables, and providing host, user and pass with and without single and double quotes, and explicitly providing the port. No matter what I try I always get the following error

 >>  MySQLTuner 1.7.19 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[--] Performing tests on <host>:<port>
[--] Will connect using ssl public key passed on the command line
Use of uninitialized value $mysqllogin in concatenation (.) or string at
	mysqltuner.pl line 6356 (#1)
    (W uninitialized) An undefined value was used as if it were already
    defined.  It was interpreted as a "" or a 0, but maybe it was a mistake.
    To suppress this warning assign a defined value to your variables.
    
    To help you figure out what was undefined, perl will try to tell you
    the name of the variable (if any) that was undefined.  In some cases
    it cannot do this, so it also tells you what operation you used the
    undefined value in.  Note, however, that perl optimizes your program
    anid the operation displayed in the warning may not necessarily appear
    literally in your program.  For example, "that $foo" is usually
    optimized into "that " . $foo, and the warning will refer to the
    concatenation (.) operator, even though there is no . in
    your program.
    
Use of uninitialized value $mysqllogin in concatenation (.) or string at
	mysqltuner.pl line 6357 (#1)
[--] Assuming 10000 MB of physical memory
[!!] Assuming 0 MB of swap space (use --forceswap to specify)
Use of uninitialized value $mysqllogin in concatenation (.) or string at
	mysqltuner.pl line 989 (#1)
[!!] failed to execute: SELECT VERSION()
[!!] FAIL Execute SQL / return code: 256
Use of uninitialized value $mysqllogin in concatenation (.) or string at
	mysqltuner.pl line 994 (#1)
Use of uninitialized value $mysqllogin in concatenation (.) or string at
	mysqltuner.pl line 995 (#1)
[!!] You probably did not get enough privileges for running MySQLTuner ...

What is wrong? I am using the admin user account created when I deployed the database. I can connect to the database via mysql client.

When I use --debug I also get [DG] ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) though I've specified a host. I also tried using a different socket (--socket /tmp/mariadb.sock) but that didn't help.

Contributor guide