Category Archives: News

Find and Change File Permissions Recursively, Linux / UNIX

To find all files in /home/user/demo directory, enter: $ find /home/user/demo -type f -print To find all files in /home/user/demo directory with permission 777, enter: $ find /home/user/demo -type f -perm 777 -print Finally, apply new permission using the -exec option as follows: $ find /home/user/demo -type f -perm 777 -print -exec chmod 755 {} \; To select directories and subdirectories use the following syntax: $ find /home/user/demo -type d -perm 777 -print -exec chmod 755 {} \;...

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...