• 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 365 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic 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

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

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 (21K Followers)
  • Twitter (5.3k 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

  • What You Need to Know About the Microservices March 4, 2021
  • Fix Missing/Bad FileProvider for Freshchat (Android error code 354) March 3, 2021
  • Basics of Data Protection on the Internet March 2, 2021
  • What is Standard Software February 28, 2021
  • WordPress Link to text Fragment February 27, 2021

 

About This Article

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

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

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

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

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