Monday, September 16, 2013

Percona Tool Kit Installation


How to install Percona Tool Kit.

1.Download the latest tar.gz Percona toolkit from Percona Software download link.

link : http://www.percona.com/downloads/percona-toolkit/LATEST/

#wget  http://www.percona.com/redir/downloads/percona-toolkit/LATEST/percona-toolkit-2.2.4.tar.gz

2. Extract the file.

#tar -xvzf percona-toolkit-2.2.4.tar.gz

3.Go to the file name.

#cd percona-toolkit-2.2.4

4.Do the following steps one  by one

#perl Makefile.PL

#make

#make test

#make install

5.Check the tool kit by using this tool.

#pt-summary

It will show the details of your Server details.

Troubleshooting:

#perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite DBD::mysql 3 not found.
Warning: prerequisite DBI 1.46 not found.
Writing Makefile for percona-toolkit

Fix it by,

#yum install perl-DBI perl-DBD-MySQL


Thank you.

More details :  http://form.percona.com/rs/percona/images/Percona_Toolkit_2_1_9_Operations_Manual.pdf



Thursday, September 12, 2013

MySQL Grant Password Error : ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number



When you creating a new user for a MySQL server with the below method sometime you may get this below error.

Ex:

mysql>grant all privileges on *.* to 'root'@'localhost' identified by password 'welcome';

"ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number"


Solution:

mysql> select password ('welcome');

+-------------------------------------------+
| password ('welcome')           |
+-------------------------------------------+
| *DF216F57F1F2066124E1AA5491D995C3CB57E4C2 |
+-------------------------------------------+

1 row in set (0.02 sec)

mysql>grant all privileges on *.* to 'root'@'localhost' identified by password '*DF216F57F1F2066124E1AA5491D995C3CB57E4C2';

 Query OK, 0 rows affected (0.02 sec)

mysql>flush privileges;

 Query OK, 0 rows affected (0.02 sec)


Now the error gone.Try this when you are getting this error.


Better always try this below way to create MySQL user.

mysql>grant all privileges on *.* to 'root'@'localhost' identified by 'welcome';

Query OK, 0 rows affected (0.00 sec)

mysql>flush privileges;

Query OK, 0 rows affected (0.02 sec)