Archive for the Uncategorized Category

How to change Collation from latin1_swedish_ci to utf8_general_ci

If you want to change your database collation form from latin1_swedish_ci to utf8_general_ci then follow the below steps :

take the sql dump for the DB for which you want to change the collation :

example :

[email protected][#] mysqldump --opt test_shop > test_shop.sql

Now in the .sql dump file search for the collation for latin :

[email protected][#] cat test_shop.sql | grep -i latin1

now replace the latin collation to utf8 by running the command :

[email protected][#] replace latin1 utf8 -- test_shop.sql

finally restore the changed .sql dump file (in ex : it is test_shop.sql)

[email protected][#] mysql test_shop < test_shop.sql

That’s all you are done.

cannot run C compiled programs

If you are getting the above error while installing any module using

"pecl install modulename" 

then it means that the executable permission is not set on /tmp or /var/tmp

[email protected][~]# mount | grep /tmp
 /usr/tmpDSK on /tmp type ext2 (rw,noexec,nosuid)
 /tmp on /var/tmp type none (rw,noexec,nosuid,bind)

So, in-order to complete the pecl installation just remount the /tmp and /var/tmp with executable permissions as :

[email protected][#] mount -o remount rw /tmp
[email protected][#] mount -o remount rw /var/tmp

And now just try the pecl install modulename and it will work like a charm.

example :

[email protected][#] pecl install imagick
That’s all you are done.

 

Yum error : libbeecrypt.so.6: cannot open shared object file: No such file or directory

If you come across the above error while installing yum on centos 5.x then just follow the below steps :

[[email protected]]# cd /usr/lib

[[email protected] /usr/lib]# wget linuxspy.info/libbeecrypt.so.6.4.0

[[email protected] /usr/lib]# chmod 755 libbeecrypt.so.6.4.0

[[email protected] /usr/lib]# ln -s libbeecrypt.so.6.4.0 libbeecrypt.so.6

To test, if yum is working just try the command :

[[email protected]]# yum list httpd
 Loading "installonlyn" plugin
 Setting up repositories
 Reading repository metadata in from local files
 Installed Packages
 httpd.i386 2.2.3-43.el5.centos.3 installed
 Available Packages
 httpd.i386 2.2.3-45.el5.centos.1 updates

That’s all you are done.