How to split a mysqldump file of multiple databases to singlefile databases... SOLVED with script

2012-02-20 Thread Andrés Tello
Today I needed to split a mysqldump -A into it several databases. I didn't have access to the original source, so I only had the texr file to work. It was a webhosting server dump, so there was a LOT of databases... I split the file with this little script I made: file=myqdl dump file nextTable=

Re: Unique ID's across multiple databases

2010-09-14 Thread Johnny Withers
I may have missed what you are trying to do here. NoSQL is really a bad name and should really be renamed to NoREL instead. NoSQL implementations are not used just because of limitations of traditional RDBMS when it comes to sheer traffic volume, they are also used because they scale horizontally

Re: Unique ID's across multiple databases

2010-09-13 Thread Johan De Meersman
On Sun, Sep 12, 2010 at 9:45 PM, Kiss Dániel n...@dinagon.com wrote: offset + increment thingy is good if you know in advance that you'll have a limited number of servers. But if you have no idea that you will have 2, 20, or 200 servers in your array in the future, you just can't pick an

Re: Unique ID's across multiple databases

2010-09-13 Thread Kiss Dániel
This is actually more for failover scenarios where databases are spread in multiple locations with unreliable internet connections. But you want to keep every single location working even when they are cut off from the other databases. The primary purpose is not load distribution. On Mon, Sep 13,

Re: Unique ID's across multiple databases

2010-09-13 Thread Johan De Meersman
Hmm, that's a very interesting scenario, indeed. One bad connection will break the chain, though, so in effect you'll be multiplying the disconnecting rate... I think you'd be better of with a star topology, but MySQL unfortunately only allows ring-types. This is gonna require some good thinking

Re: Unique ID's across multiple databases

2010-09-13 Thread Fish Kungfu
I could be way off here, but how about letting your unique id be a calculated column of the the server's MAC address concatenated with an auto-increment id column? I hope this helps... ~~Fish~~ On Mon, Sep 13, 2010 at 7:26 AM, Johan De Meersman vegiv...@tuxera.bewrote: Hmm, that's a very

Re: Unique ID's across multiple databases

2010-09-13 Thread Fish Kungfu
I had some coffee and realized that actually, using a UUID might be something to look at. There have been quite a few discussions about using a UUID as a unique id and it does have some gotchas. Just Google: mysql uuid Have a great day ~~Fish~~ On Mon, Sep 13, 2010 at 7:30 AM, Fish

Re: Unique ID's across multiple databases

2010-09-13 Thread Kiss Dániel
Hell, yeah. :) Actually, the ID system I described below works quite well according to my tests. I feel very comfortable with it both from primary key size and dynamically increasable database number point of views. What I actually don't like in it is the concatenated unique ID (ID + SID) pairs.

Re: Unique ID's across multiple databases

2010-09-13 Thread Kiss Dániel
Well, thanks, but I'm afraid using UUID's (even with hex compression) is kind of a suicide, when it comes to performance. This is a good summary about the issues: http://www.mysqlperformanceblog.com/2007/03/13/to-uuid-or-not-to-uuid/ So, some kind of auto_increment or sequencing must be the

RE: Unique ID's across multiple databases

2010-09-13 Thread Jerry Schwartz
-Original Message- From: Kiss Dániel [mailto:n...@dinagon.com] Sent: Sunday, September 12, 2010 1:47 PM To: mysql@lists.mysql.com; replicat...@lists.mysql.com Subject: Unique ID's across multiple databases Hi, I'm designing a master-to-master replication architecture. I wonder what

RE: Unique ID's across multiple databases

2010-09-13 Thread Jerry Schwartz
-Original Message- From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De Meersman Sent: Monday, September 13, 2010 7:27 AM To: Kiss Dániel Cc: Max Schubert; mysql@lists.mysql.com; replicat...@lists.mysql.com Subject: Re: Unique ID's across multiple databases Hmm

RE: Unique ID's across multiple databases

2010-09-13 Thread Jerry Schwartz
-Original Message- From: Kiss Dániel [mailto:n...@dinagon.com] Sent: Monday, September 13, 2010 11:49 AM To: Jerry Schwartz Cc: Johan De Meersman; Max Schubert; mysql@lists.mysql.com; replicat...@lists.mysql.com Subject: Re: Unique ID's across multiple databases Well, not exactly. I do

Re: Unique ID's across multiple databases

2010-09-13 Thread Johnny Withers
Schubert; mysql@lists.mysql.com; replicat...@lists.mysql.com Subject: Re: Unique ID's across multiple databases Well, not exactly. I do not own all the databases. Some of them are placed at customers, some of them are at my data warehouse. So, neither NAS or Fibre Channel is a solution

Re: Unique ID's across multiple databases

2010-09-13 Thread Kiss Dániel
Schwartz Cc: Johan De Meersman; Max Schubert; mysql@lists.mysql.com; replicat...@lists.mysql.com Subject: Re: Unique ID's across multiple databases Well, not exactly. I do not own all the databases. Some of them are placed at customers, some of them are at my data warehouse. So, neither NAS

RE: Unique ID's across multiple databases

2010-09-13 Thread Jerry Schwartz
From: Kiss Dániel [mailto:n...@dinagon.com] Sent: Monday, September 13, 2010 3:17 PM To: Jerry Schwartz Cc: Johan De Meersman; Max Schubert; mysql@lists.mysql.com; replicat...@lists.mysql.com Subject: Re: Unique ID's across multiple databases Well, that would be the plan, yes. :-) Anyway, I'll

RE: Unique ID's across multiple databases

2010-09-13 Thread Daevid Vincent
-Original Message- From: Kiss Dániel [mailto:n...@dinagon.com] Sent: Monday, September 13, 2010 5:59 AM Well, thanks, but I'm afraid using UUID's (even with hex compression) is kind of a suicide, when it comes to performance. This is a good summary about the issues:

RE: Unique ID's across multiple databases

2010-09-13 Thread Wm Mussatto
On Mon, September 13, 2010 15:37, Daevid Vincent wrote: -Original Message- From: Kiss D�niel [mailto:n...@dinagon.com] Sent: Monday, September 13, 2010 5:59 AM Well, thanks, but I'm afraid using UUID's (even with hex compression) is kind of a suicide, when it comes to performance.

Re: Unique ID's across multiple databases

2010-09-13 Thread Johan De Meersman
On Mon, Sep 13, 2010 at 8:59 PM, Johnny Withers joh...@pixelated.netwrote: This sounds like a good job for a 'NoSQL' system. Maybe? I can't help but blink at that. How exactly is NoSQL going to fix issues that are related to topology, not inherent SQL limitations ? Which particular

Unique ID's across multiple databases

2010-09-12 Thread Kiss Dániel
Hi, I'm designing a master-to-master replication architecture. I wonder what the best way is to make sure both databases generate unique row ID's, so there won't be ID conflicts when replicating both directions. I read on forums about pro's and con's using UUID's, also about setting the

Re: Unique ID's across multiple databases

2010-09-12 Thread Marcus Bointon
On 12 Sep 2010, at 19:47, Kiss Dániel wrote: - SID adds only 2 bytes in this case to the size of the primary key item. It can be even 1 byte if I'm sure I'll never exceed maximum 255 servers. But anyhow, it is still way smaller than the 16 byte of a UUID field, even if using BIGINT's.

Re: Unique ID's across multiple databases

2010-09-12 Thread Max Schubert
Server offset + increment works really well, is simple, and well documented and reliable - not sure why you would want to re-invent something that works so well :). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Unique ID's across multiple databases

2010-09-12 Thread Kiss Dániel
You may be right. I'm not arguing that offset + increment is working. I'm just wondering if that's the optimal solution when you do not know how many servers you will have in your array in the future. In my view, the offset + increment thingy is good if you know in advance that you'll have a

possible to select from multiple databases?

2006-05-05 Thread Bing Du
Hello, I have two separate databases that I need to query data from. In the following SELECT statement, 'title' and 'db_entry_name' are in database1, and 'projectID' is in database2. If they were in one database, this SELECT should work. How should I tweak it to get data from both database1

RE: possible to select from multiple databases?

2006-05-05 Thread Jimmy Guerrero
-Original Message- From: Bing Du [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 4:09 PM To: mysql@lists.mysql.com Subject: possible to select from multiple databases? Hello, I have two separate databases that I need to query data from. In the following SELECT statement, 'title

Re: possible to select from multiple databases?

2006-05-05 Thread Eric Braswell
Bing Du wrote: I have two separate databases that I need to query data from. In the following SELECT statement, 'title' and 'db_entry_name' are in database1, and 'projectID' is in database2. If they were in one database, this SELECT should work. How should I tweak it to get data from both

Relication from multiple databases

2006-01-13 Thread Jeff
Anyone know if it's possible to do replication from more than one database? Example: System A: Database 1 System B: Database 2 System C: Replication of SYSA:DB1, Replication SYSB:DB2 Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Relication from multiple databases

2006-01-13 Thread Atle Veka
No, unfortunately you cannot have multiple masters on a single replication slave. You can however have multiple daemons running on system (C) via mysqld_multi. Atle - Flying Crocodile Inc, Unix Systems Administrator On Fri, 13 Jan 2006, Jeff wrote: Anyone know if it's possible to do

Re: Relication from multiple databases

2006-01-13 Thread Gleb Paharenko
Hello. MySQL allows to have only one master for replication. But if it is possible in your production environment, you can replicate from A to B (database names can be rewritten with replicate-rewrite-db), and replicate the whole stuff to C. I agree, this is not an ideal workaround,but hope this

Running select on multiple databases serially.

2005-08-22 Thread George Cherian
Hi, I asked this question in in the mysql-cluster list, but I think this is not really related to clustering. So I am asking it here. Please bear with the cross posting. I need to run a particular 'select' on multiple machines, and then reorder them. The query is: 'select * from table

Re: Running select on multiple databases serially.

2005-08-22 Thread George Cherian
On Mon, Aug 22, 2005 at 01:46:23PM +0530, George Cherian wrote: I need to run a particular 'select' on multiple machines, and then reorder them. The query is: 'select * from table where parent_name = 'parent' order by name limit 10. This query has to be sent to 10 servers - in series,

Re: Running select on multiple databases serially.

2005-08-22 Thread SGreen
George Cherian [EMAIL PROTECTED] wrote on 08/22/2005 04:46:02 AM: On Mon, Aug 22, 2005 at 01:46:23PM +0530, George Cherian wrote: I need to run a particular 'select' on multiple machines, and then reorder them. The query is: 'select * from table where parent_name = 'parent' order by

Re: Running select on multiple databases serially.

2005-08-22 Thread George Cherian
On Mon, Aug 22, 2005 at 09:57:44AM -0400, [EMAIL PROTECTED] wrote: You are correct in your analysis that you would get better performance if you ran the queries asynchronously. Just remember that each query thread will need its *own* connection. Even if you are querying two databases on

Re: Running select on multiple databases serially.

2005-08-22 Thread George Cherian
On Mon, Aug 22, 2005 at 08:03:08PM +0530, George Cherian wrote: So I am surprised that no one has done this before. I am very new to database - (about last week, is when I started getting into the intricacies), so at present I am confused why there isn't such a solution. I had created a

Re: Running select on multiple databases serially.

2005-08-22 Thread Pooly
Hi, I'm not sure of what you are looking for, and what do you know. Did you read this ? http://dev.mysql.com/doc/mysql/en/c.html It could give you some clues on how to do your queries from your library. I've never seen any library able to query several servers at the same time. Usually people

Running a query on multiple databases

2005-05-03 Thread Mahmoud Badreddine
Hi, I would like to run a query on two tables that reside in two distinct databases: select * from db1.table1 join db2.table2; This lists both tables adjacent to one another rather than in a sequential fashion as one would get if both tables came from the same database. Is there a way to

Re: Running a query on multiple databases

2005-05-03 Thread SGreen
Mahmoud Badreddine [EMAIL PROTECTED] wrote on 05/03/2005 01:43:55 PM: Hi, I would like to run a query on two tables that reside in two distinct databases: select * from db1.table1 join db2.table2; This lists both tables adjacent to one another rather than in a sequential fashion as

RE: Running a query on multiple databases

2005-05-03 Thread Jay Blanchard
[snip] I would like to run a query on two tables that reside in two distinct databases: select * from db1.table1 join db2.table2; This lists both tables adjacent to one another rather than in a sequential fashion as one would get if both tables came from the same database. Is there a way to

Re: Running a query on multiple databases

2005-05-03 Thread Andrés Villanueva
That's exactly what a join does... join two or more tables as one, but you usually define a common field to join the tables by... If both tables have the same definition and you want to know how to display the data of one of them after the other you need to do a: select * from db1.table1 union

Re: mysqldump specific tables from multiple databases?

2005-03-01 Thread Gleb Paharenko
Hello. is it possible to mysqldump specific tables from multiple databases in a single run? No. database. I can not (even off hours) lock the entire database (main one) long enough to do a full dump with locks so I see my options as: You may write your own sql file in which you're

mysqldump specific tables from multiple databases?

2005-02-28 Thread Sid Lane
all, is it possible to mysqldump specific tables from multiple databases in a single run? what I am trying to do is get replication slaves to a starting point but am somewhat challenged by the nature of our architecture. specifically, we have a large number of relatively-static (updated only

Re: Performance impact -- multiple databases Vs multiple tables...

2004-12-01 Thread Brent Baisley
I'm not sure if you have a problem with one large InnoDB table or one large file. With InnoDB you can specify multiple files, limit the size of each file and even specify the location of each file. So you could limit your InnoDB files to say 1GB each (or lower/higher) and specify which disk

Performance impact -- multiple databases Vs multiple tables...

2004-11-30 Thread Alok Gore
Hi All, I tried digging for this information in the archives but could not find anything. I am in to developing an app. that uses very high amount of data (Close to 80 GB per machine). It has 3-4 logical tables. But I have to partition them in to multiple tables because the mysql table size

Re: Performance impact -- multiple databases Vs multiple tables...

2004-11-30 Thread Brent Baisley
If you are hitting file size limits, you probably want to look into using the InnoDB table type. That will allow you to work around file size limits and have a database of just about any size you need. You won't end up having a 30GB file, but multiple smaller files which will be transparent to

Re: Performance impact -- multiple databases Vs multiple tables...

2004-11-30 Thread Gleb Paharenko
Hello. Think about merge storage. http://dev.mysql.com/doc/mysql/en/MERGE_storage_engine.html Alok Gore [EMAIL PROTECTED] wrote: Hi All, I tried digging for this information in the archives but could not find anything. I am in to developing an app. that uses very high amount

Re: Performance impact -- multiple databases Vs multiple tables...

2004-11-30 Thread alok gore
(By partitioing the data set and having one mysql server handle one data set). This option is only applicable if we have multiple databases. Thanks in advance, -Alok. On Tue, 2004-11-30 at 22:38, Brent Baisley wrote: If you are hitting file size limits, you probably want to look

Re: Multiple Databases or One?

2004-10-08 Thread SGreen
David Blomstrom [EMAIL PROTECTED] wrote on 10/07/2004 05:37:08 PM: I'm working on several websites that will be driven primarily by two databases - Geography and Animals. The Geography database will feature information about nations, provinces and states, such as capitals, population, etc.

Multiple Databases or One?

2004-10-07 Thread David Blomstrom
I'm working on several websites that will be driven primarily by two databases - Geography and Animals. The Geography database will feature information about nations, provinces and states, such as capitals, population, etc. The Animals database features lots of taxonomic tables (orders, families,

Merge multiple databases into one

2004-06-30 Thread Murray Scoulding
Hello, I am trying to see if replication (or some open source software) can help me I have a multiple external databases that have the exact same table structure. They need to be merged into a central database on a nightly basis. The only difference between the external and central

Multiple Databases

2004-06-17 Thread David Blomstrom
I'm working on a rather large database - four or five tables - that will power eight different websites. There will also be a few additional supplemental tables on various sites, but I'd speculate that 90% of the data will be exactly the same on all eight sites. With that in mind, would you

Re: Multiple Databases

2004-06-17 Thread Garth Webb
4 or 5 tables is pretty small. We've got about 200 tables here, some containing over 100 million rows which still runs well on a simple PIII test server. You are definitely better off having one database serve this data. If you want a backup, the MySQL replication stuff works very well. On

multiple databases: design question

2004-03-21 Thread TO
What are the advantages and disadvantages of using multiple databases, versus placing all tables in one uber-database? I understand and appreciate the organizational value of multiple databases, but what other issues are involved? I ask this because I'm considering moving from tables across

RE: multiple databases: design question

2004-03-21 Thread Matt Chatterley
) and scalability pov too, to split it up into multiple databases. Thanks, Matt -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of TO Sent: 21 March 2004 15:14 To: [EMAIL PROTECTED] Subject: multiple databases: design question What are the advantages and disadvantages

Re: When does using multiple databases make sense?

2004-01-08 Thread Steve Folly
On 8 Jan 2004, at 04:12, Paul F wrote: Greetings, I am wandering under what circumstances it is sensible/beneficial to use multiple databases for a single project, and why. The reason I ask is because I am re-developing an existing database with MySQL that someone else created with another

Re: When does using multiple databases make sense?

2004-01-08 Thread robert_rowe
for each company then I would not need the overhead of this field. We chose the company field over the multiple databases because many of our clients are vertically integrated and do cross charging (an entry from one company posts to another company). This inter-company stuff is easy

Re: When does using multiple databases make sense?

2004-01-08 Thread Matt Fuller
a different database for each company then I would not need the overhead of this field. We chose the company field over the multiple databases because many of our clients are vertically integrated and do cross charging (an entry from one company posts to another company). This inter-company stuff

When does using multiple databases make sense?

2004-01-07 Thread Paul F
Greetings, I am wandering under what circumstances it is sensible/beneficial to use multiple databases for a single project, and why. The reason I ask is because I am re-developing an existing database with MySQL that someone else created with another engine (DBISAM) and chose to have 5 separate

select statement with multiple databases

2003-11-06 Thread Jay Frumkin
Hello all, I am fairly new to MySQL. I have a problem, that I have not been able to figure out. I've tried searching the net and reading the manual, but all to no avail. I have two databases (A and B) which have the same structure but different field names. The code from mysqldump follows

Re: select statement with multiple databases

2003-11-06 Thread Jeremy Zawodny
On Thu, Nov 06, 2003 at 10:36:08AM -0800, Jay Frumkin wrote: Hello all, I am fairly new to MySQL. I have a problem, that I have not been able to figure out. I've tried searching the net and reading the manual, but all to no avail. I have two databases (A and B) which have the same

Getting data from multiple databases

2003-09-09 Thread Scott Haneda
I have 2 databases, in each is a table called 'resources', my cleint has asked that they always be identical to each other. Database1 will be the master by which all else is made equal. My question: Should I just create website #2 to talk to Database #1, I am hesitant to do this as I have a

multiple databases creation

2003-08-14 Thread Kai Li
Hi, I know that Mysql handles large database very well, but there is a project that requires more than 2000 small databases(about 20 talbes with a few rows) to be created within a Mysql server. Could somebody tell me does it make sense? Thanks for your consideration. likai

Re: multiple databases creation

2003-08-14 Thread Mike . Kent
: Subject: multiple databases creation 08/05/2003 08:12 PM

RE: multiple databases creation

2003-08-14 Thread Dan Muey
Hi, Howdy I know that Mysql handles large database very well, but there is a project that requires more than 2000 small databases(about 20 talbes with a few rows) to be created within a Mysql server. Could somebody tell me does it make sense? Err.. Sure it makes sense I guess

JDBC Question [Using Multiple databases]

2003-03-19 Thread Mark C. Roduner, Jr.
Scenario: The current JDBC Connection is jdbc:mysql//localhost:3306/=xql?user=rootpassword=myrootpass The database `xql` contains 1 table, `settings` Another database, `login` contains 1 table, `users` 'm' is a Matcher Object, that contains the users Name

Re: JDBC Question [Using Multiple databases]

2003-03-19 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark C. Roduner, Jr. wrote: Scenario: The current JDBC Connection is jdbc:mysql//localhost:3306/=xql?user=rootpassword=myrootpass The database `xql` contains 1 table, `settings` Another database, `login` contains 1 table, `users` 'm' is a Matcher

Re: performance for single/multiple databases

2002-04-11 Thread Jeremy Zawodny
On Wed, Apr 10, 2002 at 12:12:32AM -0500, Truong Thai wrote: I have a performance question between having a single database for all tables or splitting up tables into multiple databases. The hosting service I use charges extra for multiple databases. Using PHP/MySQL for website. I

insert...select across multiple databases

2002-03-18 Thread David Piasecki
This one has been troubling me for some time now. For my project the most ideal and quickest solution to archive data is to do an insert...select followed by a delete on the original table. The problem is, I'd like my archive tables to exist in another database (makes it a lot easier on the

Multiple databases

2002-03-03 Thread Rebecca Hall
Hi, I was recently assigned to finish a project started by a previous employee. The objective is to collect data from numerous geographic locations, and then analyze the data at the central office. The goal is to look for combined corporate trends and present statistical results and

Re: Multiple databases

2002-03-03 Thread Arjen Lentz
Hi Rebecca, On Mon, 2002-03-04 at 05:19, Rebecca Hall wrote: I was recently assigned to finish a project started by a previous employee. The objective is to collect data from numerous geographic locations, and then analyze the data at the central office. The goal is to look for combined

Including/Excluding multiple databases from the Binary Log?

2002-02-18 Thread Peter Campbell
I am reading the documentation about the binary log, in particular binlog-do-db=database_name binlog-ignore-db=database_name (a) Can these be specified in the my.cnf file? (b) Can multiple databases be specified, either as a list or via multiple entries in the configuration? We're running

Table appearing in multiple databases

2001-05-21 Thread Scott F. Crosby
Is it possible to place the same table in multiple databases, by linking the MYD file from one database to the next? I can see obvious problems with such a technique, so I thought I'd ask here. Thanks, -- Scott F. Crosby E-Mail : [EMAIL PROTECTED] Web : http://www.skroz.net It's some kind

Locking with multiple databases

2001-03-15 Thread Carter, Robert L (MN65)
I am running Ver 8.8 Distrib 3.23.22-Beta on RedHat Linux. I have two databases, foo and bar. Below I show the output of mysqladmin processlist. Pid 5 is executing a long-running select from the event table of db foo. Pid 1 (started after pid 5) is attempting an insert in the same event table.

multiple databases performance

2001-02-14 Thread Carlos Proal
Hi all, glad to be back in the list :) I have a question related with a huge project, i could have these 2 schemes: 1) just one database with several tables database | tables DB_1 | user, profile, supplier, dept, etc... a lot of tables 2) several databases with few tables