简体   繁体   English

Amazon EC2:MySql数据库存储?

[英]Amazon EC2: MySql Database storage?

I do have a Linux instance in Amazon EC2. 我在Amazon EC2中确实有一个Linux实例。 After installing the Linux instance, I simply installed apache and set up a MySQL database inside it via console. 安装Linux实例后,我只需安装apache并通过控制台在其中建立一个MySQL数据库。 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. 我可以像在台式机中一样通过phpMyAdmin访问。 Is my database in Amazon EBS ? 我的数据库在Amazon EBS吗?

  2. How do I know the storage price for the information stored inside my mysql database? 我如何知道存储在mysql数据库中的信息的存储价格?

  1. Normally Linux store MySQL information /etc/mysql/my.cnf file, then find datadir path inside the file. 通常,Linux存储MySQL信息/etc/mysql/my.cnf文件,然后在文件内部找到datadir路径。 You can read the file using cat command. 您可以使用cat命令读取文件。

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 EC2实例使用EBS进行存储,您可以在此处查看价格存储的详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM