Configure MySQL 5.6 LONGBLOB for large binary data

The reason for this issue is a change in MySQL 5.6.20 as one could read in the change log:

As a result of the redo log BLOB write limit introduced for MySQL 5.6, the innodb_log_file_size setting should be 10 times larger than the largest BLOB data size found in the rows of your tables plus the length of other variable length fields (VARCHAR, VARBINARY, and TEXT type fields). No action is required if your innodb_log_file_size setting is already sufficiently large or your tables contain no BLOB data.

Set or increase the value of the innodb_log_file_size option in my.ini below the [mysqld] section. Its default value is 48M. Setting it to

[mysqld]
innodb_log_file_size=256M

Be careful when changing the value of innodb_log_file_size. Follow these steps to do this safely:

  • Shut the server down cleanly and normally.
  • Shutting down MySQL may not be as simple as just service mysql stop!
  • Following things should be done to shut down mysql server normally and cleanly:
    1. Double check the instance you are going to shutdown!!
    2. Stop Replication
    3. Flush the dirty pages
    4. Check the long running transactions
    5. Dump and reload the buffer pool
  • Move away (don’t delete) the log files, which are named ib_logfile0, ib_logfile1, and so on.
  • Check the error log to ensure there was no problem shutting down.
  • Then restart the server and watch the error log output carefully.
    • There should see InnoDB print messages saying that the log files don’t exist. It will create new ones and then start.
  • Verify that InnoDB is working. If it’s working, then the old log files can be deleted.

Access shell with SSH on cPanel server from Linux

Some of the important server related problems will be solved only using shell access to the server. To access the cPanel server shell using SSH, there must be an SSH client installed on PC. Most of the Linux distros include SSH client software by default. If it is not installed, then it can be easily installed with following commands,

For Ubuntu: apt-get install openssh-client
For CentOS: yum install openssh-clients

After installation, follow these steps to access the cPanel shell with SSH from Linux:

  1. Login to cPanel and go to Security > SSH/Shell Access to generate SSH key pair.
  2. Click Manage SSH Keys > Generate a New Key. You should use a password to protect the key. You will be asked the password each time you use the key.
  3. In Public Keys section click ‘Manage Authorization’ and ‘Authorize’
  4. In Private Keys section click, Vew/Download then download the key (id_dsa or id_rsa) to your PC.
  5. Save it to ~/.ssh directory on your Linux machine under a meaningful name to not overwrite your existing keys for example id_dsa.myjavahost
  6. Now make sure permissions are correct on the key (one-time task) and connect:
    mypc:~$ chmod 600 .ssh/id_dsa
    mypc:~$ ssh -p1033 -i .ssh/id_dsa yourusername@yourservername
    Enter passphrase for key '.ssh/id_dsa':
  1. Provide the password for the key, set up in step #2

You should be logged in by now.

Windows 10 setup: hangs on Checking for Updates

To upgrade Windows from 7.0 to 10, use Microsoft Media Tool to download and upgrade Windows. During this process sometimes setup hangs on ‘Getting Updates’ screen with ‘Checking for Updates’ message.

Possible reason for this may be, the current version of Windows 7.0 may not be activated. So, to complete the setup without activation, follow these steps,

  1. Leave the Windows 10 Setup window as it is
  2. Go to Services (Press Windows+R. This will prompt run dialogue box. In here, type services.msc) and stop the Windows Update Service.
  3. Go to C:\Windows\SoftwareDistribution and delete all of its contents.
  4. Restart the Windows Update Service.
  5. Go back to the Windows 10 Setup window and it should continue.

These basic steps will overcome the activation problem.

Unable to use package manager due to “exclusive lock” error

After update, Synaptic Manager in Ubuntu sometimes gives error

Unable to get exclusive lock. This usually means that another package management application(like apt-get or aptitude) is already running. Please close that application first.

As the message says, it means that it is already running. By default, Ubuntu runs a check after reboot — not immediately, but some time within.

Generally, it is not advised to pause an update. Once an update has started, allow it to run its course. So, wait for some time, at least 30 minutes or more to complete the background update.

In case the update takes a while, open a terminal (Ctrl+Alt+T) and type this

ps aux | grep dpkg | grep -v grep

If it shows any text then it means system is still updating, just wait for next update.

phpMyAdmin gives 404 error in localhost

To run phpmyadmin without getting 404 error, configure apache.conf for phpmyadmin.

gksu gedit /etc/apache2/apache2.conf

Then add the following line to the end of the file.

Include /etc/phpmyadmin/apache.conf

And restart apache

/etc/init.d/apache2 restart

Please read this section in Ubuntu wiki describes the 404 error problem for phpmyadmin.