How to insert data in MySQL Table

September 28th, 2011 by Pankaj Joshi View Comments »

Let’s start inserting data in the table created in our post, table name was employee, we also discussed how to check the table structure in one of our post Step 1) Login to MySQL we will be using user : demo and password as demouser mysql -u demo -p demouser Step 2) use database in  Read More…

How to get list of tables in a MySQL database

September 28th, 2011 by Pankaj Joshi View Comments »

lets discuss now  how we can check  how many tables exist in a MySQL database . Step 1) Login to MySQL we will be using user : demo and password as demouser mysql -u demo -p demouser Step 2) use database in which we need to check table , as in our previous post we  Read More…

How to Check table structure in MySQL

September 28th, 2011 by Pankaj Joshi View Comments »

in our previous  post we discussed how to  add more columns in MySQL table , lets see how we can check table structure in MySQL. Step 1) Login to MySQL we will be using user : demo and password as demouser mysql -u demo -p demouser Step 2) use database in which we need to  Read More…

How to Create a Database in MySQL

September 27th, 2011 by Pankaj Joshi View Comments »

Once MySQL Server setup is done , lets start by creating a database , in our example we will see how to create a MySQL Database Step 1) Login to MySQL we will be using user : demo and password as demouser mysql -u demo -p demouser Step 2) Now we will be creating a  Read More…

How to create table in MySQL

September 27th, 2011 by Pankaj Joshi View Comments »

In Our previous post we discussed how to create a database in MySQL , lets see how to create tables in MySQL database. Step 1) Login to MySQL we will be using user : demo and password as demouser mysql -u demo -p demouser Step 2) use database in which we need to create table  Read More…

How to add more columns in exsiting MySQL table

September 27th, 2011 by Pankaj Joshi View Comments »

in our previous  post we discussed how to create table in MySQL Database , lets check now how we can add more columns to existing table . Step 1) Login to MySQL we will be using user : demo and password as demouser mysql -u demo -p demouser Step 2) use database in which we  Read More…

How To Empty Postfix Mail Queue

September 26th, 2011 by Manoj Chauhan View Comments »

This command will delete one specific email from the mailq mailq | tail +2 | grep -v ‘^ *(‘ | awk  ‘BEGIN { RS = “” } { if ($8 == “email@manoj.com” && $9 == “”) print $1 } ‘ | tr -d ‘*!’ | postsuper -d – Deleting the postfix mail queue I would  Read More…

Creating a UTF-8 database

September 20th, 2011 by Manoj Chauhan View Comments »

1. You can create a UTF-8 database with binary UTF-8 collation. CREATE DATABASE test CHARACTER SET utf8 COLLATE utf8_bin; 2. You will also need to set the Server Characterset to utf8. This can be done by adding the following in my.ini for Windows or my.cnf for other OS like linux. It has to be declared  Read More…

Error: RPC MTAB does not exist

August 17th, 2011 by Manoj Chauhan View Comments »

If you stop the ‘rpcidmapd’ service and then do something like ‘umount -a’, then it will also umount the rpc_pipefs. Then when you try to restart ‘rpcidmapd’ service (or the ‘nfs’ service which in turn also starts the ‘rpcidmapd’ service), you get the error: Starting RPC idmapd: Error: RPC MTAB does not exist. Similarly, if  Read More…

How to Copy Files over davfs

August 14th, 2011 by Manoj Chauhan View Comments »

Rebuild Apache with DAV support i.e. –with-dav –enable-dav Edit the http.conf, add virtual hosting as follows and setup password using htpasswd -c /home/manoj/davfs/passwd.dav manoj <IfModule mod_dav_fs.c> # Location of the WebDAV lock database. DAVLockDB //home/manoj/davfs/lockdb </IfModule> NameVirtualHost *:8899 <VirtualHost *:8899> ServerAdmin webmaster@localhost DocumentRoot /home/manoj/davfs/web <Directory /home/manoj/davfs/web> Options Indexes MultiViews AllowOverride None Order allow,deny allow from  Read More…

Taskbar missing in Ubuntu

July 23rd, 2011 by Pawan Kumar View Comments »

Once the Terminal window opens, enter the following command at the prompt: gconftool-2 – -shutdown (Note: There should be no spaces between the two dashes before shutdown.) EDIT – Reader nickrud has suggested a better method instead of shutting down gconfd. Instead use the following command (thanks nickrud!) gconftool – -recursive-unset /apps/panel (Remember: There should  Read More…

PostgreSQL network configuration

June 24th, 2011 by Pawan Kumar View Comments »

This blog is regarding Configure PostgreSQL to accept connections from network .By default, on some distros, PostgreSQL will only accept connections from localhost. When you have only access from localhost (from localhost Apache, by example) everything is ok, but when you need that postgresql accepts connections for other hosts, you need to make some configs.  Read More…

How to increase buffersize in Haproxy

June 14th, 2011 by Manoj Chauhan View Comments »

I changed the value in “include/common/defaults.h” as follows: #ifndef BUFSIZE #define BUFSIZE         33960 #endif Compiled again, and it works fine. or use below command to increase buffer size $ make TARGET=xxx SMALL_OPTS=”-DBUFSIZE=32768 -DMAXREWRITE=1024″ Thanks Manoj

Not able to start Mysql after enabling innodb

June 3rd, 2011 by Manoj Chauhan View Comments »

I upgraded Mysql 5.0 to Mysql 5.5.8 and start mysql. It was working fine but when i enable innodb and try to start Mysql i was not able to start it. I checked the Mysql error logs, saw below errors [root@manoj mysql]# tail /var/log/mysqld.log InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880  Read More…

How to Find and Delete Empty Directories and Files in Linux

May 16th, 2011 by Manoj Chauhan View Comments »

Find empty directories in the current directory using find -empty find . -type d -empty Use the following command to remove all empty directories under the current directory. find . -type d -empty -exec rmdir {} \; Find empty files in the current directory using find -empty find . -type f -empty Note: Typically empty  Read More…