• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Separate MySQL Database Setup on Rackspace Cloud Server

By Abhishek Ghosh August 22, 2014 11:09 am Updated on August 22, 2014

Separate MySQL Database Setup on Rackspace Cloud Server

Advertisement

Here is a Step by Step Guide on How To Setup a Separate MySQL Database Server on Rackspace Cloud Server and Connect From FTP Server Easily. For scalability on cloud computing platform, we need to distribute the load. To run WordPress like CMS, it is almost mandatory to separate the application server from FTP server. In our case, the application server is MySQL Database Server; MySQL by default is not ready to accept connection requests even within the same network. First, we will explain the logical approach for running a separate MySQL Database setup on Rackspace Cloud and Secondly we will provide you the needed commands. We need only the ServiceNet IP address (= Private Network) of both the Server Instances. There is no bandwidth charge for connecting to the server. Possibly it is better to judge your need of amount of RAM before going for this setup. An one GB PVHVM for MySQL Database instance is quite fine for most of the WordPress websites with medium traffic load. Keep in mind – you need to tweak the MySQL instance later. Otherwise MySQL will use a limited small amount of RAM!

 

Principle of Running a Separate MySQL Database Setup on Rackspace Cloud Server

 

The server which will be used as MySQL database server, name it accordingly to avoid confusion. You can change the default welcome message on SSH too. Often the things go wrong only for getting confused with more than 3-4 servers!

By default, MySQL Server keeps the bind-address in /etc/mysql/my.cnf to localhost. We need to change it to this database server’s ServiceNet IP address (= Private Network). Understand it – instead of localhost or 127.x.x.x.x we will use the specific IP address. We could use the public IP address, but we – (i) want to reduce our bill (ii) disallow anyone outside Rackspace to connect to our MySQL Server.

Advertisement

---

Second thing is related to creation of database – we will run the SQL queries to create database, give permission using the FTP server’s ServiceNet IP address (= Private Network).

Make it clear. There is no other big deal.

Separate MySQL Database Setup on Rackspace Cloud Server

 

Commands For Running a Separate MySQL Database Setup on Rackspace Cloud Server

 

After successfully spinning up the two servers (FTP and MySQL server), ssh to the server which you’ll run MySQL only. Run these commands :

Vim
1
2
3
apt-get update
apt-get install mysql-server
# keep note of the root password

Now run this command :

Vim
1
mysql_install_db

After this step, on earlier versions, we used to run :

Vim
1
mysql_secure_installation

Now you will get the needed commands as output after running mysql_install_db command. Just copy paste and run it or run the above one. You will need to enter the MySQL root password that you provided above. Afterwards, it will ask questions. To all of these questions except changing the password and allowing remote connection, you should just hit ENTER/RETURN key to select the default options which will remove some test databases and secure it.

Now open the config file :

Vim
1
nano /etc/mysql/my.cnf

Search the word bind-address with ^ + W (on Mac, keyboard mapping can differ on other OS) and change it to this MySQL Server’s ServiceNet IP address from default localhost value :

Vim
1
2
3
4
# before
bind-address        = localhost
# after
bind-address        = your_service_net_IP

Save it using ^ + O, exit with ^ + X. Restart MySQL :

Vim
1
2
3
service mysql restart
# check status
service mysql status

Forget this server’s ServiceNet IP address! Now your work is with only the FTP server’s ServiceNet IP address. If you have multiple FTP servers, you have to repeat the steps. Examples are given with easy to guess words, change them :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# login to mysql as root
mysql -u root -p
# change the database name from wordpress to difficult one
CREATE DATABASE wordpress;
# change the wordpressuser, service_net_IP (=FTP server's IP), password
CREATE USER 'wordpressuser'@'service_net_IP' IDENTIFIED BY 'password';
# how much you want to grant access?
GRANT SELECT,DELETE,INSERT,UPDATE ON wordpress.* TO 'wordpressuser'@'service_net_IP';
# normally we give all
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'service_net_IP';
# mandatory
FLUSH PRIVILEGES;
# check
show databases;
# exit
exit

Exit the SSH session. SSH to your FTP server, install the web server software you want (Apache, nginx…) and only install MySQL client :

Vim
1
apt-get install mysql-client

You can login from this server to that database server with this command :

Vim
1
mysql -u wordpressuser -h database_server_service_net_IP -p

There should be no error. You’ll proceed to install WordPress or whatever, use database server’s ServiceNet IP to connect (instead of localhost as database name). After WordPress get installed, you can go to Rackspace Cloud Control Panel and switch off Public IP address of the Database Server. First, we will never need it as we can access MySQL from the allowed server, Secondly, you can add public IP at anytime (or loadbalancer) to SSH on need, Thirdly, it increases the security and finally – the number of white listed IP address is limited in the whole World, we should release which we will not need.

This Article Has Been Shared 385 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Separate MySQL Database Setup on Rackspace Cloud Server

  • Private Cloud Computing – Guiding Steps To Start

    Private Cloud Computing becoming an indispensable Component of any sized Enterprise. Cloud Computing Expert has written a handy guide where and how to implement Private Cloud in your business.

  • Father of Cloud Computing John McCarthy – Down the memory lane

    Father of Cloud Computing John McCarthy has left this World on 23rd October, 2011. Let us think for a moment for him who conceptualized Cloud Computing in 1961.

  • Grid Computing – What it is, How it Works

    Grid computing is a form of distributed computing, in which a virtual supercomputer works in coordinated way. There is difference between Grid and Cloud Computing.

  • MyBB Forum on Free Heroku Cloud : Basic Guide

    MyBB Forum on Free Heroku Cloud is a basic guide which will help most of the users to run MyBB Forum software with free SSL on Heroku Cloud in this text guide.

  • Create Own Software Repository With Rackspace Cloud Files

    Create Own Software Repository With Rackspace Cloud Files. The SSL of Cloud Files is Free, access is API based, its hosted on Akamai – what you want more ?

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • The Importance of Voice and Style in Essay Writing April 1, 2023
  • What Online Casinos Have No Deposit Bonus in Australia March 30, 2023
  • Four Foolproof Tips To Never Run Out Of Blog Ideas For Your Website March 28, 2023
  • The Interactive Entertainment Serving as a Tech Proving Ground March 28, 2023
  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Separate MySQL Database Setup on Rackspace Cloud Server," in The Customize Windows, August 22, 2014, April 1, 2023, https://thecustomizewindows.com/2014/08/separate-mysql-database-setup-rackspace-cloud-server/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT