Some MySQL tricks that could help you with your blog!

Do it manually is the lesson we are going to attend today.
And because not everybody loves plug-ins or scripts to do what he will do, this post is to show you how to make some tricks directly from the source.

hand_MySQL

I) NOFOLLOW

If you want to transform your links to NoFollow do this :

update wp_posts set `post_content` = replace(post_content, ‘

II) SELL INCONTENT LINKS

You can also use it to sell in content links.
A- Find the relevant anchor text

Select post_name, post_title, guid, from wp_posts where post_content like ‘%Your link  text%’;

This will give you the all the post that has this keyword.

B- Add hyperlink

update wp_posts set `post_content` = replace(post_content, ‘Your link  text’, ‘nofollow” href=”https://blogprocess.com” >Your link  text’)

III) BACKUP and RESTORE

Having a large MySQL database make it very hard and sometimes impossible to backup and restore using the conventional phpmyadmin or any other program.But moving your website should not stop at this point.

First you need to have shell (ssh) access to your server.And you can use any free program like Xshell, Tunnelier or PuTTY to connect your server Then follow the steps:

[dbuname] : is your database username.
[passW] : is the password for your database (note there is no space between -p and the password).
[dbname] : is the name of your database.
[backup.sql] : is the file name for your database backup.

A- To Backup Mysql Database

$ mysqldump -u [dbuname] -p[passW] [dbname] > [backup.sql]

B- To Backup Mysql Database with compress

If your mysql database is very big, you might want to compress the output. Just use the mysql backup command below and choose the output to gzip, then you will get it as gzip file.

$ mysqldump -u [dbuname] -p[passW] [dbname] | gzip -9 > [backup.sql.gz]

C- To Restore Mysql Database
To restore the database you need to create the database in target machine then use this command

$ mysql -u [dbuname] -p[passW] [db.to.restore] < [backup.sql]

D- To Restore Compressed Mysql Database

gunzip < [backup.sql.gz] | mysql -u [dbuname] -p[passW] [dbname]

You May Also Like

Add author name and URL in facebook link sharing

Facebook is the most obvious way to grab more traffic to your blog and it is very important for every webmaster to optimize his website for facebook. And one of the last Facebook solutions is the ability to show your web page’s meta in facebook using the open-graph including data like author name and even a backlink […]

9 Creative Worship Visual Design Tips Your Church Must Follow

Over the years, churches have changed in the way they interact with the congregation. Technology is partially responsible for this transition and visual presentations have become an integral part of worship and sermons. But do you know what really works when it comes to designing worship visuals that members would love? While the content is […]

Ways to Optimize your blog for Mobile Searching

Would you believe this? The number of people accessing the web through their mobile phones has doubled from last year and at present; 22 million people search the net for various reasons everyday. WOW! That is an awesome number and it promises to grow exponentially with each passing day with most of the mobiles today […]

Increase Your Clients Engagement with CometChat

In order to be a successful business owner or webmaster, you need to interact with your visitors and increase client engagement. In fact, interaction transforms your visitors into flowers and then loyal fans. The interaction with your visitors may take various forms. For instance, you can simply reply back to their comments. But what if […]