Learning On Demand Learning anything from anywhere

Archive for the ‘Database’ Category

Can’t locate Compress/Zlib.pm

10.07.2008 · Posted in Database

edp# perl /usr/local/sbin/mysqlblasy.pl Can’t locate Compress/Zlib.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/lib/perl5/site_perl/5.8.8/Archive/Zip.pm line 11. BEGIN failed–compilation aborted at /usr/local/lib/perl5/site_perl/5.8.8/Archive/Zip.pm line  11. Compilation failed in require at /usr/local/sbin/mysqlblasy.pl line 1340. BEGIN failed–compilation aborted at /usr/local/sbin/mysqlblasy.pl line 1340. Solution : edp# cd /usr/ports/archivers/ edp# cd p5-Compress-Zlib && make install edp# ...

MYSQL server has gone away

08.12.2008 · Posted in Database

Its very rare case when I see message : “MYSQL server has gone away” , a few things to consider are : * Check variable max_timeout * Check variable max_allowed_packet These setting available in my.ini or my.cf file, edit the value and restart mysql daemon. Example : max_allowed_packet=16M max_timeout=28800 Try again to import database using ...

Unknown SMSD service type (“MYSQL”)

07.17.2008 · Posted in Database

That message show up when I install gammu from source in Ubuntu server 8.04 : root@dns:/home/edpteam# gammu –smsd MYSQL smsdrc Unknown SMSD service type (“MYSQL”) After dig in mailing list I have clue to install mysql library : apt-get install libmysqlclient15-dev apt-get install libmysqlclient15-dev Reading package lists… Done Building dependency tree Reading state information… Done ...

Stop GAMMU smsd (27)

06.09.2008 · Posted in Database

C:\gammu2>gammu –smsd MYSQL smsdrc Log filename is “smsdlog” Stop GAMMU smsd (27) Fri 2008/06/06 11:06:10 : Stop GAMMU smsd (27) Fri 2008/06/06 11:06:53 : Start GAMMU smsd Fri 2008/06/06 11:06:53 : PIN code is “1234″ Fri 2008/06/06 11:06:53 : commtimeout=1, sendtimeout=10, receivefrequency=0, resetfrequency=0 Fri 2008/06/06 11:06:53 : deliveryreport = no Fri 2008/06/06 11:06:53 : phoneid ...

Reset MySQL password in FreeBSD

06.02.2008 · Posted in Database

Just another post for my archive One our sandbox accidently delete root account with host ‘localhost’. We need to recover the account by grant new root account back into system. The steps are : 1. Turn off mysql service sandbox# /usr/local/etc/rc.d/mysql-server stop 2. Run mysql with skip grant table mode sandbox# mysqld_safe –skip-grant-tables & [1] ...

MySQL and Null

05.16.2008 · Posted in Database

Just for my own record, dealing with Null type field. Checking with : select * from tablename where field1=”  -> this one not work select * from tablename where field1=’Null’ -> same too is null is the answer select * from tablename where field1 is null Save my day, thanks to St4r ...

Mysql Trigger Tutorial and Tools

05.09.2008 · Posted in Database

Deal with gammu and mysql make learn more about mysql feature in mysql 5.0 called trigger. Books always good to start with so I choose MySQL Stored Procedure Programming book to start with but others might help to for someone looking for practical solution in cookbook form etc : High Performance MySQL: Optimization, Backups, Replication, ...

Postfix and LOCK tables

04.01.2008 · Posted in Database

just found error in /var/log/messages and when I try to backup postfix database. mail# mysqldump -upostfix -p postfix > postfix.sql Enter password: mysqldump: Got error: 1044: Access denied for user ‘postfix’@'localhost’ to database ‘postfix’ when using LOCK TABLES checking user privileges using information_schema mail# mysql -upostfix -p Enter password: Welcome to the MySQL monitor.  Commands ...

MySQL date range, case study

01.25.2008 · Posted in Database

Just stumble upon situation where I need to find out if specific date in a date range. I’ve try using lower than with greater than operator and use between in second attempt. Quick mysql shell mode Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\alam>cd c:\appserv\mysql\bin   C:\AppServ\mysql\bin>mysql -uroot -p Enter ...

Export picture from mysql database to file

12.11.2007 · Posted in Database, PHP

[amazonify]032152599X:left[/amazonify] As our data getting mobile and copying picture is annoying for me I decide to save the picture in the database (mysql). Another challenge came when other division need the data exported in a directory with same dimension (135 x 180 pixel). Structure for table ‘student_pic’  : CREATE TABLE `student_pic` (   `image_id` int(10) ...