Thứ Năm, 27 tháng 3, 2014

Calculating Maximum Connections for MySQL Server

Calculating Maximum Connections for MySQL Server Backup your my.cnf file The my.cnf file is the MySQL configuration file that needs to be modified to optimize the performance of MySQL database servers. Make sure you always backup a copy of this very important configuration before changing it. Determine the advisable value for max_connections How high should we set max_connections? Well, it depends on how much memory (RAM)...
Read More

Thứ Tư, 26 tháng 3, 2014

Delete IPTables Rules By Line Number

Delete IPTables Rules By Line Number First off list all IPTable's rules by chain number: iptables -vnL --line-numbers Then delete the line you want: iptables -D INPUT 22 This will delete chain line number ...
Read More

Thứ Hai, 24 tháng 3, 2014

Change MySQL Table Prefix Tools

Change MySQL Table Prefix Tools Description This script makes it possible for you to change table prefix for MySql databases. Features Add prefix to unprefixed tables Rename/change prefix Remove prefix This is a quick modification of another script found at the below address. http://www.nilpo.com/2009/01/web-development/mysql-table-prefix-changer-tool/. Download Change...
Read More

Find and Delete Duplicate Posts (Title) in WordPress

Find and Delete Duplicate Posts (Title) in WordPress The first and fastest (in other words: simplest) thing to do is to search for duplicate entries in the database. For example with the following SQL query. Find Duplicate Posts SELECT a.ID, a.post_title, a.post_type, a.post_status FROM wp_posts AS a    INNER JOIN (       SELECT post_title, MIN( id ) AS min_id      ...
Read More

Thứ Bảy, 22 tháng 3, 2014

Backup and Restore a single table using mysqldump

Backup and Restore a single table using mysqldump Backup a single table from a database mysqldump -u -p database_one table_name1 table_name2 table_name3 > /var/www/backups/table_name.sql Restore the table into another database mysql -u -p database_two < /var/www/backups/table_name.sql You can dump a query as csv like this: SELECT * from myTableINTO OUTFILE '/tmp/querydump.csv'FIELDS TERMINATED BY ','ENCLOSED BY '"'LINES...
Read More

Thứ Sáu, 21 tháng 3, 2014

How to get $1/yr Exabytes Ebiz Power Hosting - Save 99%

Host your Business Email and Website and enjoy 99.9% OFF ! With $1 you get 1 YEAR Hosting Using  Promotional Code: POWER99 Visit Exabytes Now When you order, maybe you can get error : "We are placing an automated call to your phone number now. This is part of our fraud checking measures. You will be given a 4 digit security...
Read More

Thứ Tư, 19 tháng 3, 2014

How to Create/Restore Backup In Kloxo

How to Create/Restore Backup In Kloxo Backup/Restore is a core part of Kloxo. You can take backup of your entire hosting and you can trivially restore it exactly on another server. In a cluster setup, you can take backup in one cluster configuration, and when restoring, you can tell Kloxo to re-arrange the resources on different servers. Backup/Restore is also an extremely important aspect of web-hosting, and delivers...
Read More

Chủ Nhật, 16 tháng 3, 2014

[Step by step]Create a MySQL Database, Username, Password, and Privileges from the command line

Create a MySQL Database, Username, Password, and Privileges from the command line Step 1: Login to MySQL ( you will need an account ) user@server:~$ mysql -u mysql_user -p Enter password: Step 2: Create the Database mysql > create database db_name; Step 3: Verify that it’s there mysql > show databases; Step 4: Create the User mysql > create user db_user; Step 5: Grant privileges while assigning the password mysql...
Read More

Thứ Sáu, 14 tháng 3, 2014

Fix Cpanel Email Disk Space Usage show incorrectly

 Fix Cpanel Email Disk Space Usage show incorrectly By default , In Cpanel Email Disk space usage is recalculated every four hours. To update Email Disk space usage, try running /scripts/generate_maildirsize on the affected account. The syntax would be: # /scripts/generate_maildirsize --confirm --allaccounts --verbose $USER  Replace $USER with the actual cPanel account username (the cPanel user, not the domai...
Read More

Thứ Tư, 12 tháng 3, 2014

Fix Kloxo awstats 500 internal server error

If you get a 500 error when accessing awstats, then the fix is to reset permissions, NOT by using the permission fix tool within the admin console, but you will need root access to fix this. So if your host uses kloxo and you are getting 500 errors then chances are you wont be able to fix it from a client account. Run command below:     #cd /home/kloxo/httpd/awstats/wwwroot/    #chmod 755 cgi-bin...
Read More

Update PHP 5.3 for Kloxo

Update PHP 5.3 for Kloxo You can follow the steps below to update your php version to 5.3  for Kloxo. Install repository Creat file /etc/yum.repos.d/ius.repo [ius]name=IUS Community Packages for Enterprise Linux 5 - $basearchbaseurl=http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/$basearchenabled=1gpgcheck=0 Creat file /etc/yum.repos.d/epel.repo [epel]name=Extra Packages for Enterprise Linux 5 - $basearchbaseurl=http://download.fedoraproject.org/pub/epel/5/$basearchenabled=1gpgcheck=0exclude=nginx*...
Read More

Thứ Năm, 6 tháng 3, 2014

How to change Mysql data directory location?

How to change Mysql data directory location? Mysql is most famous open source RDBMS (Relational database management system) software used by millions of websites.Most of website with very large Mysql database experience storage problem because /var partition is to small which holds Mysql data files and folder by default.If you are experiencing such a problem then you have to move your Mysql data directory to other linux partition...
Read More

Thứ Ba, 4 tháng 3, 2014

Mass convert a project to UTF-8 using Notepad++

Mass convert a project to UTF-8 using Notepad++ Lately, I had to convert the encoding of a multimodule maven project from our default Cp-1252 encoding to UTF-8. The most dificult task however was converting all our source files from Cp-1252 to UTF-8 and preferably on Windows :) . I’ve been looking into applications that would auto-convert...
Read More