Category Archives: News

Unknown table engine ‘InnoDB’

If You are facing problem with Unknown table engine 'InnoDB' on to your mysql Database. You can do following to get rid of this problem. First look at the ib_logfile0 and ib_logfile1 in /var/lib/mysql. If they have been set to size different from the default, that probably will prevent mysqld's startup. The default for innodb_lkog_file_size is 5M. Add this in my.cnf
[mysqld]
innodb_log_file_size = 12M
And then Proceed by doing following
/etc/init.d/mysql stop

mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak # these are your
mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak # log files

/etc/init.d/mysql start
 ...

extract .xz format Linux

If the file is just something.xz (without .tar) then use
unxz something.xz
Otherwise use
*.tar.bz2)	tar xvjf filename.tar.bz2) ;;
*.tar.gz)	tar xvzf filename.tar.gz) ;;
*.tar.xz)	tar Jxvf filename.tar.xz) ;;
*.bz2)		bunzip2 filename.bz2) ;;
*.rar)		unrar filename.rar) ;;
*.gz)		gunzip filename.gz) ;;
*.tar)		tar xvf filename.tar) ;;
*.tbz2)		tar xvjf filename.tbz2) ;;
*.tgz)		tar xvzf filename.tgz) ;;
*.zip)		unzip filename.zip) ;;
*.Z)		uncompress filename.Z) ;;
*.7z)		7z filename.7z) ;;
 ...

Change MySQL root Password

Change MySQL root Password

Method #1: Use mysqladmin command to change root password

If you have never set a root password for MySQL server, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows: $ mysqladmin -u root password NEWPASSWORD However, if you want to change (or update) a root password, then you need to use the following command: $ mysqladmin -u root -p'oldpassword' password newpass For example, If the old password is abc, you can set the new password to 123456, enter:
$ mysqladmin -u root -p'abc' password '123456'

Method #2: Changing MySQL root user password using mysql command

This is an another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update or change the password using the...

How to Add New Hard disk to Linux Machine

How to Add New Hard disk to Linux Machine  I am going to divide each part as follows 1. Plan the layout of the filesystem with the new drive 2. Partition the new hard drive 3. Format the new partitions 4. Test the new space 5. Copy data from old to new partition (optional) 6. Edit /etc/fstab 7. Reboot 8. Remove old data (optional) Here is the details about each one. 1. Plan the new filesystem. Where would you like to use the new space? Do df to print a summary of free/used space on each of the existing mounted partitions. Do du on selected directories to find their size. For example, I would consider using new hard drive space in...

Delete Files Older Than x Days on Linux

Delete Files Older Than x Days on Linux The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them.   Command Syntax
find /path/to/files* -mtime +5 -exec rm {} \;
Note that there are spaces between rm, {}, and \; Explanation
  • The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results.
  • The second argument, -mtime, is used to specify the number of days...