After everything was done tried to access vagrant via PUTTY and now the my local drive is now accessible via vagrant. How cool is that!!!!!

Just another issue while browsing my local directory via vagrant. I throws an error while browsing some Windows default directory. I am not sure why but the important thing is i am able to access my Work directory.

Mytopmytop is a console-based (non-gui) tool for monitoring the threadsand overall performance of a MySQL server.It runs on most Unix systems which have Perl,DBI, and Term::ReadKey installed. And with Term::ANSIColor installedyou even get color.If you install Time::HiRes, you’ll get good real-time queries/second stats.

As of version 0.7, it even runINSTALLATIONSDownload Package: http://jeremy.zawodny.com/mysql/mytop/tar -zxvf mytop-.tar.gzcd mytop-perl Makefile.PLmakemake install

Possible Errors during installation:

Warning: prerequisite DBD::mysql 1 not found.

Warning: prerequisite DBI 1.13 not found.

Warning: prerequisite Term::ReadKey 2.1 not found.

Solution:

perl-Class-Data-Inheritable-0.08-1.el5.rf.noarch.rpm

perl-DBD-MySQL-4.014-1.el5.rfx.x86_64.rpm

perl-DBI-1.616-1.el5.rfx.x86_64.rpm

perl-DBIx-ContextualFetch-1.03-1.el5.rf.noarch.rpm

perl-Ima-DBI-0.35-1.el5.noarch.rpm

perl-Ima-DBI-0.35-1.el5.src.rpm

perl-TermReadKey-2.30-4.el5.

Error after a successful installation:

Use of uninitialized value $host in substitution (s///) at /usr/local/bin/mytop line 958.

Solution:

Remove this line

$host =~ s/^([^.]+).*/$1/;

$thread->{Host} = $host;

Replace with this

if ($host)

{

$host =~ s/^([^.]+).*/$1/;

$thread->{Host} = $host;

}

Error in option spec: "long|!"

Solution:

The fix for this is to edit the mytop script and comment out the line containing long|!

Thursday, February 13, 2014

I've been using RPM every time i will install MySQL server in my Linux boxes. But today i will show you on how to install MySQL 5.5 on Centos 6.5 via Yum.First, to set up the yum repository, install the webtatic-release RPM based on your CentOS/RHEL release.[root@localhost ~]# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpmRetrieving http://mirror.webtatic.com/yum/el6/latest.rpmwarning: /var/tmp/rpm-tmp.q3Y9pR: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEYPreparing... ########################################### [100%] 1:webtatic-release ########################################### [100%]

Remove the pre-installed mysql-libs with no dependecy.

[root@localhost ~]# rpm -e mysql-libs

error: Failed dependencies:

libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64

libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64

mysql-libs is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64

[root@localhost ~]# rpm -e --nodeps mysql-libs

After removing the previous version of mysql-libs you can now start the installation of MYSQL via Yum

Tuesday, December 11, 2012

Yesterday i was trying to connect to MySQL localhost with another port aside from 3306:

mysql -uroot -p -h localhost --port=3390

to my suprise i was login to the default port. My collegue told me that i need to used 127.0.0.1 instead of localhost so i tried it then i search everywhere to find the answer on why oh why its like this until i found a blog that explained the difference between localhost and 127.0.0.1.

With network connections, there are two special addresses that always refer to the machine you are currently using. This is either called 'localhost' or has the IP address of 127.0.0.1. In general using these is equivalent and interchangeable, and uses a special path through the networking subsystem called the local loopback interface. However MySQL has reserved 'localhost' for the special purpose of indicating the use of a UNIX socket and not use networking. This can cause some confusion to new users, but if you understand what is going on it is pretty clear.

'localhost' in MySQL uses the UNIX socket and ignores any port you may supply.

127.0.0.1 in MySQL uses networking and requires a port, using the default if you don't supply it.

Tuesday, November 20, 2012

Upon searching for some solutions at google we found out that the error means 'Too many open files'. Everything you do in linux is a file (or rather a file descriptor). Every mysql connection, every apache connection etc.

To see how many files a user has open try this

sudo lsof -u mysqledit the file in /etc/security/limits.conf and add these two mysql lines in at the bottom

There is some debate as to whether you need to reboot for this to
take effect (i say debate, i rebooted, and didnt google for it as i was
in a rush ymmv).
Once this is set you need to make some changes in the mysql file as
well. Assuming yours lives in /etc/mysql/my.cnf - edit or add these
values