≡ Menu

mysql logoHere is step by step explanation on How to Check and Repair a MySQL Database Through Console SSH with Mysqlcheck and Myisamchk are similar in purpose, there are some essential differences. Mysqlcheck as well as Myisamchk can check, repair and analyze MyISAM tables. Mysqlcheck can also check InnoDB tables.

step 1: Log in as ‘root’ via SSH and:
step 2: Shows you if any need repair:

step 3: Recover MySql Database
try ‘safe-recover’ first:

and, if neither that nor this works:

Then use the ‘force’ flag:

If those are not MyISAM tables try Mysqlcheck:

to repair one database:

to repair one table in database:

ref: vps.net

{ 1 comment }

If you try to upload a file through http to your web site running on Apache2/PHP5/mod_fcgid, and in your browser you get the error:

In Apache’s error log you see something like

First check in your php.ini that upload_max_filesize has a big enough value for your upload. By default it’s

Then open your Apache vhost configuration and add the FcgidMaxRequestLen directive with a big enough value (in bytes), for example

which equals roughly 2 MB.

The default value is

which is very small (see http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen).

Finally restart Apache.

{ 0 comments }

How to CHMOD Files and Folder

Set chmod a Folder or a file

Set chmod all folders and files

If you really want to do is set the directories to 755 and either leave the files alone or set them to 644 for this you can use the find command e.g.

to change all the directories to 755:

to change all the files to 644:

{ 0 comments }

If got message like MySQL Error: 1 (Can’t create/write to file ‘/tmp/#sql_7425_0.MYD’ (Errcode: 17)) or Warning: session_write_close(): write failed: No space left on device

you can check:

  • Make sure that /tmp isn’t out of space
  • Make sure that /tmp is chmod 1777
  • If you’re using a virtual /tmp partition (/tmpDSK) make sure it’s not corrupt – if so replace it

If your /usr/tmpDSK is corrupted. You should stop all processes that have files open on /tmp such as MySQL and other applications using:

Delete all un-necessary files and then run the following command:

{ 0 comments }

If you can not access into your server via ssh, and said : Connection refused

First step check your firewall whether the firewall has allowed ssh port ?

If you don’t have any firewall configuration, check your ssh server status

and then checking log at

if there is logs like the following errors.

Fixed by :

Restart your ssh server

{ 0 comments }

How to Fix FTP Not Working or FTP Connection Refused in Kloxo, please try the following command.

{ 0 comments }