Tag Archives: MySQL

Importing MySQL Databases Via SSH Command Line On Self Managed Servers

SANGKRIT.net not only offers you Managed and Fully Managed servers but it also lets you subscribe self-managed server option which is only recommended for command line experts. Because self-managed servers are without a control panel such as cPanel, Plesk, or Simple Control Panel.

These self-managed servers do not have phpMyAdmin installed which is used for managing MySQL databases. So in order to manage databases, you are required to use the SSH command line to import .SQL backup files.

This post guides you through importing MySQL databases via SSH.

Continue reading Importing MySQL Databases Via SSH Command Line On Self Managed Servers

What Is Increased Time To 1st Byte? How It Affects Your Website’s Speed?

An increased time to 1st byte means your website is running too many SQL queries or non-optimized SQL queries which can also include server-side calls to third-party APIs.

If you’re a WordPress user, there are a number of plugins you can check out to decrease the number of database queries and speed up your website. And if you are not using WordPress then you need to check and optimize your database then use some website cache functionality. For this, you may buy expert’s support via system@sangkrit.net on per hour per terminal basis. Continue reading What Is Increased Time To 1st Byte? How It Affects Your Website’s Speed?

How To Find Your WordPress Hostname & Server IP Address?

Not generally but many a times website owners require knowing their hostname and server IP address, it is only useful in certain situations like many security plugins and SSL certificate extensions asks you for your IP and host information to set up configuration settings and there are many more reasons.

Continue reading How To Find Your WordPress Hostname & Server IP Address?

How To Run Many WordPress Installations In One Database?

Unlike to SANGKRIT.net’s hosting accounts, there are many hosting providers who give you a limited amount of MySQL databases and resources. So in this tutorial we will be telling you how you can run multiple WordPress installations on a single MySQL database. Yes, a single database can run multiple websites including single and multisite WordPress installations or even you can also run other CMS application like Mediawiki with in that. Let us see how.

Continue reading How To Run Many WordPress Installations In One Database?

Best Plugins For Optimizing & Managing Database Tables In WordPress

Generally there are two ways webmasters use for optimization database tables, some do it via phpMyAdmin which works from your webserver or your web hosting account and the other way is using a database optimization plugin which is more easy and user friendly way. There are hundreds of database optimization plugins available in WordPress plugin repository which confuses the new WordPress users.

Continue reading Best Plugins For Optimizing & Managing Database Tables In WordPress

Easiest Way To Clean Unnecessary Tables In WordPress Database

WPDBTotalCleaner is the new WordPress plugin which provides you a very easy way to clean up unnecessary Database tables from your WordPress site. The plugin is simple, lightweight and is compatible with bot single and multisite WordPress installations.

Continue reading Easiest Way To Clean Unnecessary Tables In WordPress Database

How To Change WordPress Site Domain Name By Editing Its Database ?

We have already discussed about changing your website domain name or URL by editing functions.php file and by editing wp-config.php file. Now this tutorial explains you how you can update your website web address to new one (when you are migrating your website to a new domain) directly by updating your WordPress site’s MySQL database.

Continue reading How To Change WordPress Site Domain Name By Editing Its Database ?

Top 5 Plugins For Migrating Your Blog To WordPress

Thinking of migrating your blog to WordPress, here are 5 cool plugins that can help you doing that in a better and easy way possible and ofcourse I am takling about WordPress.Org self hosted blog not WordPress.Com. If you are migrating your blog from Blogger then you must read this post.

Continue reading Top 5 Plugins For Migrating Your Blog To WordPress

Add Debug Bar Showing Query, Cache, And Other Helpful Information On Debugging In WordPress

WordPress developers launched WordPress.Com’s debug bar for Self Hosted WordPress Blogs . It adds a debug menu to WP admin bar that shows query, cache, and other helpful debugging information. Good for developers.

Continue reading Add Debug Bar Showing Query, Cache, And Other Helpful Information On Debugging In WordPress

How To Grant Privilege To Any MySQL Database User ?

GRANT command is be used for giving privilege to any user for accessing database.

GRANT PRIVILEGES ON DATABASE OBJECTS TO USER@HOST IDENTIFIED BY ‘PASSWORD’;

Example:

For granting privilege to user  admin Use:

GRANT ALL PRIVILEGES ON *.* TO ‘admin@localhost’ IDENTIFIED BY ‘secret’;

For specifying the username and password which is used while staring MySQL is:

mysql –h hostname –u username –p password

When you don’t want users to access any other database tables then replace* (as shown below) with database name of that particular user whom you want to limit access to other database tables:

GRANT ALL PRIVILEGES ON ‘store’.* TO ‘admin@localhost’ IDENTIFIED BY ‘secret’;

Run given command with root permission. In the given command ‘store’ correlates to the name of database to which the privileges are assigned.

Listing MySQL Databases

For showing all database:

SHOW DATABASES;

In case you need to filter database by name:

SHOW DATABASES LIKE ‘pattern’;

For complex filtering of database use WHERE Clause:

SHOW DATABASES WHERE conditions;

With WHERE clause one can use regular expressions like ‘<‘ and ‘>’ operators, string functions etc. for filtering records returned by SHOW DATABASES.