Wednesday, July 30, 2014

exit from mysql shell

Sometimes you may struck in the mysql shell and you cannot exit from the shell using /q or exit command.

Solution:
use single quotes and then quit from your mysql console.

`> \q
`>
`> ;


'> ''' ( use 3 single quotes)
 -> \q
Bye
[root@test ~]#




Friday, July 18, 2014

phpMyAdmin installation


Steps:
cd /usr/local/src/
wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.2.5/phpMyAdmin-4.2.5-all-languages.tar.gz
tar -xzvf phpMyAdmin-4.2.5-all-languages.tar.gz 
mv phpMyAdmin-4.2.5-all-languages /home/ajeesh/public_html/
cd /home/ajeesh/public_html/
mv phpMyAdmin-4.2.5-all-languages phpMyAdmin
cd phpMyAdmin
mkdir config
chmod o+rw config
cp config.inc.php config/ (For migration we need to copy this file and access the web panel, for new installation just visit the web panel and the config file will create automatically.)

: Web Panel access http://ajeesh.com/phpMyAdmin/setup/

Error:
[Fri Jul 18 00:31:06 2014] [error] [client IP] File does not exist: /home/ajeesh/public_html/favicon.ico
[Fri Jul 18 00:31:07 2014] [error] [client IP] PHP Fatal error:  Call to undefined function mb_detect_encoding() in /home/ajeesh/public_html/phpMyAdmin/libraries/php-gettext/gettext.inc on line 177

Fix:
yum install php-mbstring
yum install php-mcrypt
/etc/init.d/httpd restart


mv config/config.inc.php /home/ajeesh/public_html/phpMyAdmin/
chmod 644 config.inc.php
rm -rf setup

Latest phpMyadmin needs mysql5.5 version. So I have updated the latest version using the following steps:

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
yum --enablerepo=remi list mysql mysql-server
yum --enablerepo=remi upgrade mysql mysql-server