I've started learning using Django with Cassandra.
我开始学习使用Djano和Cassandra。
I will develop many websites on Cassandra, since I need the scalability (If start with Cassandra from early development, I dont need to think about migration to Cassandra)
我将在Cassandra上开发许多网站,因为我需要可扩展性(如果从早期开发开始使用Cassandra,我不需要考虑迁移到Cassandra)
But a new website must be less visitor, so I need many database (probably hundreds) running on a machine.
但是新网站必须少访问者,所以我需要在机器上运行许多数据库(可能是数百个)。
In MySQL, I just need:
在MySQL中,我只需要:
CREATE USER 'username'@'localhost' IDENTIFIED BY 'pass';
CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL ON dbname.* TO 'username'@'localhost';
I've tried looking at Cassandra documentation to create many database in one server, but nothing found
我试过看Cassandra文档在一台服务器上创建了很多数据库,但没有找到
2 个解决方案
#1
2
bin/cassandra-cli create keyspace dbname;
bin / cassandra-cli创建密钥空间dbname;
but, if you want "many database running on one machine" instead of "one database running on many machines" then you probably don't need Cassandra.
但是,如果你想“在一台机器上运行许多数据库”而不是“在许多机器上运行一个数据库”那么你可能不需要Cassandra。
#2
1
Cassandra doesn't have anything called 'database', so searching for this term won't help much.
Cassandra没有任何称为“数据库”的东西,所以搜索这个词并没有多大帮助。
You can have multiple Keyspaces on one Cassandra cluster (though this is unusual).
你可以在一个Cassandra集群上拥有多个Keyspace(尽管这很不寻常)。
You can also have multiple Column Families within a Keyspace. This is very normal, and you could use this mechanism to partition data for hundreds of different websites.
您还可以在Keyspace中拥有多个列族。这很正常,您可以使用此机制为数百个不同的网站分区数据。
However, as jbellis says, Cassandra is designed for massive scalability across a cluster of machines.
然而,正如jbellis所说,Cassandra旨在实现跨机器群的大规模可扩展性。
#1
2
bin/cassandra-cli create keyspace dbname;
bin / cassandra-cli创建密钥空间dbname;
but, if you want "many database running on one machine" instead of "one database running on many machines" then you probably don't need Cassandra.
但是,如果你想“在一台机器上运行许多数据库”而不是“在许多机器上运行一个数据库”那么你可能不需要Cassandra。
#2
1
Cassandra doesn't have anything called 'database', so searching for this term won't help much.
Cassandra没有任何称为“数据库”的东西,所以搜索这个词并没有多大帮助。
You can have multiple Keyspaces on one Cassandra cluster (though this is unusual).
你可以在一个Cassandra集群上拥有多个Keyspace(尽管这很不寻常)。
You can also have multiple Column Families within a Keyspace. This is very normal, and you could use this mechanism to partition data for hundreds of different websites.
您还可以在Keyspace中拥有多个列族。这很正常,您可以使用此机制为数百个不同的网站分区数据。
However, as jbellis says, Cassandra is designed for massive scalability across a cluster of machines.
然而,正如jbellis所说,Cassandra旨在实现跨机器群的大规模可扩展性。