PeakGen
PeakGen

Reputation: 23025

Amazon EC2: MySql Database storage?

I do have a Linux instance in Amazon EC2. After installing the Linux instance, I simply installed apache and set up a MySQL database inside it via console. Now I do have questions.

  1. Where is my database is located exactly? I can simply access it via phpMyAdmin like in the same way we do in desktop PCs. Is my database in Amazon EBS ?

  2. How do I know the storage price for the information stored inside my mysql database?

Upvotes: 0

Views: 3962

Answers (1)

Rizky Ariestiyansyah
Rizky Ariestiyansyah

Reputation: 766

  1. Normally Linux store MySQL information /etc/mysql/my.cnf file, then find datadir path inside the file. You can read the file using cat command.

The result will be like this

$ cat /etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
[mysqld]
#
# * Basic Settings
#
user   = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket  = /var/run/mysqld/mysqld.sock
port   = 3306
basedir  = /usr
datadir  = /var/lib/mysql
tmpdir  = /tmp
language = /usr/share/mysql/english
  1. EC2 instance use EBS for storage you can check price storage detail here

Upvotes: 2

Related Questions