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

Working With Designers: Tips for a Successful Collaboration

Now that the competition between businesses keeps on getting higher and higher, you need to get a grip and equip your company with talented individuals. If you have a team of designers that can ensure well-designed and consistent visuals for your brand, you can be steps ahead of your competitors. Collaborating with designers can benefit […]

9 Tips For Designing Your Business Logo

Whether you are just starting a business and need a brand new logo or if you are in the process of a redesign and just need a refreshed logo, it’s important to put thought and effort into your business’ logo. Logos help with brand recognition and can help customers identify your company over any competitors […]

The Most Common Website Design Mistakes Small Businesses Make

Many small business owners try to save money wherever possible. They may prepare their own taxes, repair their own copiers, and decorate their own offices. However, one do-it-yourself task that small businesses should think twice about is designing their own websites. Websites take on many roles for a small business. These roles include: Providing information: […]

5 Reasons You Need To Hire A Top-Rated Web Development Company For Your Next Web Business Project

Without a doubt, technology is influencing our future. It has already established itself in various areas, making life simpler and more enjoyable in certain respects. Nowadays, along with proper functioning and competent web creation, you need an organized digital marketing strategy that clears the path to success.  It takes a lot of time, effort, and […]