Archive for May, 2008
Mysql (mysqldump) – Backup database
Backing up the database is no doubt a must activity for any software system, which involves Data Base (of course). For taking backup of MySQL db there are few utilities which are suitable for different types of DBs like Innodb, MyISAM and ARCHIVE tables. For Innodb tables mysqldump is quite useful and popular utility which [...]
Mysql Procedures,functions and triggers – Binary logging
If you have enabled binary logging on MySql server you are running, you may get error below while creating Stored Procedures or functions and triggers in your database: ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to [...]
getElementsByClassName – Finding DOM elements having class
Mostly Javascript libraries provide this function one way or another but if you are not using any of them you can use following code for finding elements on which same class is applied and can do operations on them: function getElementsByClassName(className, tag, elm){ var testClass = new RegExp("(^|\\\\s)" + className + "(\\\\s|$)"); var tag [...]
sox: Input and Output rates must be different to use resample effect
Problem: While using SOX for converting audio files in one single format, we faced an issue with SOX. It doesn’t allow resampling of media file if source file sample rate id same as of destincation file e.g. if you are trying to convert media files to Mono Channel, Audio Sample rate 8kHz and Audio sample [...]
Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist
Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist I faced this problem while i was shifting the location of mysql data directory to some non-default location. I copied all the files from /var/lib/mysql(default data location) to the /newdir and changed path in /etc/my.cnf also. When i tried to run the mysql [...]
