Kurinchi Blogger Scribbles …


Aug 09
2014

When trying to import large SQL dump, you often get the above message. Remedy for this issue is to increase the packet size of MySQL’s daemon by setting a packet size of max_allowed_packet. Sudo to your account and set the following

root $ mysql -u admin -p

mysql> set global net_buffer_length=1000000;

mysql> set global max_allowed_packet=1000000000;

In the command line, issue the command

$ mysql –max_allowed_packet=128M -uUSER -pPASSWORD database < database.sql.dump


Aug 01
2014

Wireframesketcher – Tool for prototyping

Last updated: August 18th, 2014

Wireframing is one of the most valuable phase of any application development process. Understanding requirements from customers is the key step to project success. When this process is done with a right wireframing tools such as WireframeSketcher, PowerMockUp, Gliffy (some of the tools that I experimented this year) it helps designers produce quintessential designs in short span of time and developers understand finer details of the design elements.

As a startup, I was using paper-and-pencil model for wireframe creation to take down requirements, visually portray design concepts and straighten project objectives for creating web applications. Going with the traditional method of prototyping had its own drawbacks and the four major ones are
a) flexibility to change or tweak the prototypes built in short duration
b) re-usability of the prototypes built in the past to save time
c) option to develop prototypes in online and offline mode
d) easy options to save, export prototypes in digital formats

Read more »


Jul 22
2014

When setting up applications such as Magento you may come across the error message “PHP Fatal error: Class ‘DOMDocument’ not found …” in your apache server log files

Reason for the error is missing log files. Issue the commands below to fix the issue

$ yum -y install php-xml php-devel

$ service httpd reload


Apr 04
2014

After VPS reboot, you may encounter this issue and the fix is simple. Follow these stops to prevent this error.

$ service mysqld stop

$ mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

$ service mysqld start


Feb 21
2014

Yeoman is a tool for modern workflow to aid front-end web application development. Yeoman consists of three tools to manage this workflow and has generators available for Angular, Backbone and a collection of over 100+ other projects

+ Grunt – It is the builder and utility component that helps automate repitive tasks, script minification, javascript task compiler, compiling sass, coffee script
+ Yo – It is the code generator component that helps in scaffolding, writing boilerplate code, install some grunt tasks
+ Bower – It is the package manager for web and it helps fetch javascript library and/or javascript/css frameworks and its dependencies. This is similar to Maven for java.

Jan 09
2014

To find the collation of tables within MySQL database, you can use one of the commands listed below

mysql> show table status from exampledb;

mysql> SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA=’exampledb’;

 

To find the character set used in a MySQL table

mysql> SELECT tbl.table_name, CCSA.character_set_name FROM information_schema.`TABLES` tbl, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY CCSA WHERE CCSA.collation_name = tbl.table_collation AND tbl.table_schema = “schemaname”;


Jan 08
2014

How to find the MySQL collation and character set?

Last updated: January 9th, 2014

To find the collation of a database

mysql> SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = ‘exampledb’ LIMIT 1;

+————————+
| DEFAULT_COLLATION_NAME |
+————————+
| utf8_general_ci |
+————————+

 

To find the characterset of a MySQL database

mysql> SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = “exampledb”;


Jan 02
2014

Sudo, Visudo -bash: visudo: command not found

Last updated: December 31st, 2013

Visudo is needed to make modifications to the sudoers file. In a fresh install of CentOS “sudoers” file is not normally found. To install visudo issue the command

$ yum -y install sudo

As a sys admin, you need to be careful when performing tasks with root privileges. To be cautious, you can create a new user and assign him with root privileges using “visudo”

$ /usr/sbin/visudo

# User privilege specification
root ALL=(ALL) ALL
test ALL=(ALL) ALL

In the above file, test is a new user created with root privileges. In order for the “test” user to have root privileges, command “sudo” should be used. It prevents the user from issuing any commands that can cause system wide havoc and it also logs the command inside “/var/log/secure” for review


Jan 01
2014

Changing host configuration
$ vi /var/lib/pgsql/8.4/data/pg_hba.conf

Add postgresql to startup process
$ chkconfig postgresql-8.4 on

Start postgresql service
$ service postgresql-8.4 start

Access postgresql
$ su – postgresql
$ psql

Create database
postgres-# create database test

List databases
postgres-# \list

Exit postgresql
postgres-# \q (or \quit)

Connect to database
postgres-# \c test (\connect test)


Dec 31
2013

How to install PostgreSQL on CentOS Linux?

Last updated: December 31st, 2013

First lets do an update before we start installing PostgreSQL

$ yum update

You can install PostgreSQL from CentOS Base repo or can do a search for the latest version and install it based on your needs. Method 1 describes manual setup and Method 2 indicates an install from CentOS base repo
Read more »



Valid HTML 4.01 Strict  Valid HTML 4.01 Strict