Cannot enter the password on pt-mysql-summary

Bug #1474547 reported by Valent
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Invalid
Undecided
Unassigned

Bug Description

Hi,
when I try to use pt-mysql-summary, I enter my root password then I digit the password and press ENTER. However, I continue get the request "Enter password:". I suspect a problem with an "escape" character: my password contains a underscore and a bang.
If I try to connect to mysql in this way:
mysql -u root -p
I enter the password and I get the prompt.

Complete command‐line used to run the tool:
pt-mysql-summary -- --user=root -p
Tool version:
2.2.14 (installed from percona-toolkit_2.2.14_all.deb)
MySQL version of all servers involved:
5.5.40-0+wheezy1-log
Output from the tool including STDERR:
root@srv01:~# pt-mysql-summary -- --user=root -p
Enter password:
Enter password:

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Hi,

I don't know why you are giving -- two times in command line, before user information.
Can you try to run like this and check?

pt-mysql-summary --user=root --password=<yourpassword>

If you don't want to give password in command line then you can create .my.cnf in your home folder and then run direct pt-mysql-summary command. i.e

nilnandan@desktop:~$ cat .my.cnf
[client]
user=root
password=root
nilnandan@desktop:~$
nilnandan@desktop:~$ pt-mysql-summary
# Percona Toolkit MySQL Summary Report #######################
              System time | 2015-07-21 06:33:51 UTC (local TZ: IST +0530)
# Instances ##################################################
  Port Data Directory Nice OOM Socket
  ===== ========================== ==== === ======
   3306 /var/lib/mysql 0 0 /var/run/mysqld/mysqld.sock
# MySQL Executable ###########################################
       Path to executable | /usr/sbin/mysqld
              Has symbols | No
...

Changed in percona-toolkit:
status: New → Incomplete
Revision history for this message
Valent (vf-valent) wrote : RE: [Bug 1474547] Re: Cannot enter the password on pt-mysql-summary
Download full text (3.2 KiB)

Hi,
This is the command:

root@srv01:~# pt-mysql-summary --user=root --password=vkY!_93mbfZGPH
-bash: !_93mbfZGPH: event not found
root@srv01:~#

If I create the file .my.cnf with the same password, it works.

My distro is:

root@srv01:~# cat /etc/*ase
DISTRIB_ID=Debian
DISTRIB_RELEASE=7
DISTRIB_CODENAME=
DISTRIB_DESCRIPTION=
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"

root@srv01:~# bash --version
GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)

Regards,
V.

------
> Date: Tue, 21 Jul 2015 06:34:56 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 1474547] Re: Cannot enter the password on pt-mysql-summary
>
> Hi,
>
> I don't know why you are giving -- two times in command line, before user information.
> Can you try to run like this and check?
>
> pt-mysql-summary --user=root --password=<yourpassword>
>
> If you don't want to give password in command line then you can create
> .my.cnf in your home folder and then run direct pt-mysql-summary
> command. i.e
>
> nilnandan@desktop:~$ cat .my.cnf
> [client]
> user=root
> password=root
> nilnandan@desktop:~$
> nilnandan@desktop:~$ pt-mysql-summary
> # Percona Toolkit MySQL Summary Report #######################
> System time | 2015-07-21 06:33:51 UTC (local TZ: IST +0530)
> # Instances ##################################################
> Port Data Directory Nice OOM Socket
> ===== ========================== ==== === ======
> 3306 /var/lib/mysql 0 0 /var/run/mysqld/mysqld.sock
> # MySQL Executable ###########################################
> Path to executable | /usr/sbin/mysqld
> Has symbols | No
> ...
>
>
> ** Changed in: percona-toolkit
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1474547
>
> Title:
> Cannot enter the password on pt-mysql-summary
>
> Status in Percona Toolkit:
> Incomplete
>
> Bug description:
> Hi,
> when I try to use pt-mysql-summary, I enter my root password then I digit the password and press ENTER. However, I continue get the request "Enter password:". I suspect a problem with an "escape" character: my password contains a underscore and a bang.
> If I try to connect to mysql in this way:
> mysql -u root -p
> I enter the password and I get the prompt.
>
>
> Complete command‐line used to run the tool:
> pt-mysql-summary -- --user=root -p
> Tool version:
> 2.2.14 (installed from percona-toolkit_2.2.14_all.deb)
> MySQL version of all servers involved:
> 5.5.40-0+wheezy1-log
> Output from the tool including STDERR:
> root@srv01:~# pt-mysql-summary -- --user=root -p
> Enter password:
> Enter password:
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/percona-toolkit...

Read more...

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Hi,

! is a metachar for bash so it will not work directly. please add ' ' in password, it will work.

nilnandan@desktop:~$ pt-mysql-summary --user=nilnandan --password=nil!_123
bash: !_123: event not found
nilnandan@desktop:~$

nilnandan@desktop:~$ pt-mysql-summary --user=nilnandan --password='nil!_123'
Warning: Using a password on the command line interface can be insecure.
# Percona Toolkit MySQL Summary Report #######################
              System time | 2015-07-22 06:35:39 UTC (local TZ: IST +0530)
# Instances ##################################################
  Port Data Directory Nice OOM Socket
  ===== ========================== ==== === ======
   3306 /var/lib/mysql 0 0 /var/run/mysqld/mysqld.sock
# MySQL Executable ###########################################

Changed in percona-toolkit:
status: Incomplete → Invalid
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1294

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.