hismis

hismis

(0 comments, 4 posts)

This user hasn't shared any profile information

Posts by hismis

MySQL: Repair & Optimize all Tables in all Databases

0

MySQL tables can crash quite easily, especially when your server unexpectedly shuts down or crashed, or when you're forced to copy data around when it's still being accessed.

Luckily, there's a simple command to automatically check, repair and optimize all tables in all databases when you're running a MySQL server on Linux / Unix / BSD.

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

That's all there is to it!

SSH how to empty a text file?

0

just copy /dev/null to that file. eg: cp /dev/null <filename>

Exclude a directory to tar

0

Here is an example how to backup your site, and a exclude a directory :

tar -cf backup.tar –exclude={/home/yoursite/public_html/wp-content/uploads/*} /home/yoursite/public_html/

 

backup.tar : Backup file name.

To exclude more than one directory  :  – exclude={”/proc/*”,”/sys*”,”/tmp/*”,”/home/user/*”}

How to automatically add row number in query result? (Mysql)

0

Here’s how you do it:

select @rownum:=@rownum+1 ‘rank’, p.* from player p, (SELECT @rownum:=0) r order by score desc limit 10;

Try it …..

hismis's RSS Feed
Go to Top