Newbie - View several databases as one
Hello, I have an application that stores the information in several MySql databases and I am starting to look at the information and I found a problem. Information is stored everyday in threed different sessions. Each session creates a new database with several tables in it. The problem is that i don't care about sessions and I would like to view all the information that is soted as it would be a unique database. Somebody told me that this could be done with MySQL but as he was no an expert he was not able to give more details. Does anyone now if there is any feature that allows to do so? thnaks in advance. -- View this message in context: http://www.nabble.com/Newbie---View-several-databases-as-one-tf2697982.html#a7524188 Sent from the MySQL - General mailing list archive at Nabble.com. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Master Switch (Or Write by SQL_THREAD only)
Is there a way to allow the SQL_THREAD to write while holding everything else ? iptables -A INPUT -p tcp --dport 3306 -s MASTER_IP -j ACCEPT iptables -A INPUT -p tcp --dport 3306 -j REJECT -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Weird error with stored function
Hi, It seems that the problem was the following: In mysql_stmt_execute() sp_cache_flush_obsolete() is called to flush the statement cache (or something similar). But the proper sp_cache_routines_and_add_tables() functions won't be called from open_tables(), because thd-lex-query_tables_own_last is other than NULL. Inserting the line thd-lex-mark_as_requiring_prelocking(NULL); into Prepared_statement::execute(), after the call to thd-set_n_backup_statement() seems to fix the problem. Now I'd like to know how to submit this patch, and if somebody with more than a few hours of experience with the MySQL codebase can see some possible pitfalls in this fix. Thx ImRe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 23 November 2006 12:14 To: 'mysql@lists.mysql.com' Subject: Weird error with stored function Hi, I am trying to use stored functions through the prepared statement C API. I have one application that issues relatively long running queries, while the other is doing some inserts, updates, and short queries. If the second application somehow calls a stored function (either directly through a prepared statement, or indirectly through a trigger) while first is in the middle of a query, then I receiving an error like this one: FUNCTION gi.get_country does not exist Anybody have seen something like this before? How can I circumvent it? I'm on windows, running MySQL 5.0.27-community-log. I am using InnoDB for my database, and the server SQL mode is sql-mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SU BSTITUTION,ANSI,ONLY_FULL_GROUP_BY Thanks in advance ImRe -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql_fetch_row problem
Hello all! Im am programming on С++ for mysql. I've got a problem with mysql_fetch_row() function. When I want to make a query foe MySQL server I do this: mysql_real_query() then mysql_store_result() and then mysql_fetch_row() All was well, but today my program has fallen with an error in mysql_fetch_row(). mysql_real_query() mysql_store_result() work properly, but mysql_fetch_row returns NULL. I just don't know what to do. I've watched all my code near this function and mde query from another client and it is well. This is my code: MYSQL_RES *res; MYSQL_ROW row; std::stringstream ost; ost SELECT Uid,Login,Password,Server,Ips,Logged_in,Locked,Deleted,Multilogin FROM user_auth WHERE Login = 'login';; string query(ost.str()); if( mysql_real_query( mysql, query.c_str(), query.length() ) != 0) { syslog(LOG_ERR,Tbilling Error. Mysql_real_query() call: %s, mysql_error( mysql )); return -1; } if( (res = mysql_store_result(mysql) ) == NULL) { syslog(LOG_ERR,Tbilling Error. Mysql_store_result() call: %s, mysql_error( mysql )); return -1; } syslog(LOG_ERR,Number of rows is %d,mysql_num_rows(res)); if( ( row = mysql_fetch_row(res)) == NULL) { syslog(LOG_ERR,Tbilling Error. Mysql_fetch_row() call:%s, mysql_errno( mysql )); return -1; } -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How to keep myqsl backup server
I need to create an application where i will be requiring a backup server like when one server fails i can switch automatically to the other server hosted somewhere else , now the data needs to be consistent on both the servers, one sol is i keep automated backups on the primary server and restore it by a script on the backup server You want replication, which will automatically keep your data up-to-date between two servers in near-real-time. See http://dev.mysql.com/doc/refman/5.0/en/replication.html Note: You will need to configure master-master replication if you want to start writing to the other server if the master fails, otherwise your data will be inconsistent. but i need to know how will i switch between servers and if i use domain names instead of ips how will i make immediate switch. You probably shouldn't use DNS entries for an application that requires immediate fail-over; configure your application to connect to an IP address, then change this IP address if you have to fail over to the backup server. -- Alex -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Das offizielle MySQL 5 Handbuch
If you don't understand the title of this announcement then you're probably not exactly the target group I'm aiming at, but still I'd like to inform you about a new MySQL Press book that's just hit the shelves of the bookstores: Das offizielle MySQL 5 Handbuch. As you might have guessed, that's the German translation of the MySQL 5 reference manual. The translation covers MySQL 5.0 and MySQL 5.1, including features such as Partitioning. This book marks a new record among MySQL Press books, in number of pages and weight: Its 1339 pages weigh 1906 grams (67 ounces). But yet, this wasn't enough to cover everything, so there are an additional 500 pages on the accompanying CD-ROM. The Handbuch costs EUR 59.95 and can be found in bookstores or on the internet, for example at the Addison Wesley Germany pages: http://www.addison-wesley.de/main/main.asp?page=deutsch/bookdetailsProductID=117584 Regards, Stefan -- Stefan Hinz [EMAIL PROTECTED] MySQL AB Documentation Team Lead. Berlin, Germany (UTC +2:00) Skype:stefanhinz Cell:+491777841069 Desk:+493082702940 Fax:+493082702941 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysqldumpslow output interpretation
Hi List, Any update on this Thanks Anil Hi List, Below is the output of mysqldumpslow. In the output query execution time is showing -ve value how to interpret the below output i.e how to interpret -ve value for query execution time please advice Count: 1 Time=4294967223.00s (-73s) Lock=0.00s (0s) Rows=0.0 (0), ebizb11[ebizb11]@ UPDATE MM_EMAIL,MM_GROUP SET MM_EMAIL.STATUS='S' WHERE MM_EMAIL.EMAILADD=lower('S') AND MM_GROUP.ID=MM_EMAIL.GROUPID AND MM_GROUP .DEPTID=N Count: 1 Time=4294967223.00s (-73s) Lock=0.00s (0s) Rows=0.0 (0), ebizb11[ebizb11]@ SELECT LIST.NAME,DEPT.NAME FROM MM_LIST LIST, MM_DEPARTMENT DEPT WHERE LIST.DEPTID=DEPT.ID AND LIST.LISTTYPE = 'S' AND LIST.STATUS = 'S' AND LIST.CREATEDDATE DATE_SUB(NOW(),INTERVAL N DAY) Thanks Anil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
WTO ISCO database
Does anyone has a database dump of the World Trade Organisation’s International Standard Classification of Occupation. -- Leandro Guimarães Faria Corcete DUTRA +55 (11) 9406 7191 (cel) Administrador de (Bases de) Dados +55 (11) 2122 0302 (com) http://br.geocities.com./lgcdutra/+55 (11) 5685 2219 (res) BRASILmailto:[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Having Problem With Load Files and AutoNumber id fields
Argh... I am autogenerating a load file after parsing and massaging a text file I get from an AS/400 system. My first field is an id that is on auto_number so I put a tab at the begging of the line for each one of my records... it throws a warning for each line... if instead of putting an autonumber I put a random number it works perfectly. How can I get it to work? Sample line in my load file that works: 1 306600121001001467 SMART ALARMS INC201 MILLWAY AVE UNIT #8 \N \N VAUGHAN ON L4K 5K8 0 1999-9-1 00:00:001999-9-1 00:00:00 Sample line that does not work: 306600121001001467 SMART ALARMS INC201 MILLWAY AVE UNIT #8 \N \N VAUGHAN ON L4K 5K8 0 1999-9-1 00:00:00 1999-9-1 00:00:00 My code that generates the sample line that does not work: tempfile.puts \t#{record[0,22].strip}\t#{record[22,32].strip}\t#{record[54,32].strip}\t#{record[86,32].strip}\t#{record[118,32].strip}\t#{record[150,30].strip}\t#{record[180,2].strip}\t#{record[182,7].strip}\t0\t2000-01-01 00:00:00\t2000-01-01 00:00:00 How can I get mysql to put the auto_numbers in for me? Why is it even accepting my numbers? Thanks :-) Does anyone also know how I can see the warnings created by loadfile? All I just see is the summary with skipped and warnings. Thanks :-) -- John Kopanas [EMAIL PROTECTED] http://www.kopanas.com http://www.cusec.net http://www.soen.info -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Newbie - View several databases as one
On 11/24/06, Algomez [EMAIL PROTECTED] wrote: Hello, I have an application that stores the information in several MySql databases and I am starting to look at the information and I found a problem. Information is stored everyday in threed different sessions. Each session creates a new database with several tables in it. The problem is that i don't care about sessions and I would like to view all the information that is soted as it would be a unique database. Somebody told me that this could be done with MySQL but as he was no an expert he was not able to give more details. Does anyone now if there is any feature that allows to do so? I don't know of any feature like that, in fact, from what you said I can say there's something VERY wrong about your DB model, separate databases are (AFAIK) suppose to separate data that's not interconnected. You can always use more than one connection at your application and treat the results in order to join them, but that's not really a fix and can greatly impact the speed of the process. Other than that, I don't think there's a way to do this... Maybe someone with more knowledge can contribute. Anyway, I'm not an expert, but a great friend is a DBA and he once told me that if you have to CODE the creation of a database for any purpose besides restoring a backup, something is wrong. -- Daniel da Veiga Computer Operator - RS - Brazil -BEGIN GEEK CODE BLOCK- Version: 3.1 GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V- PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++ --END GEEK CODE BLOCK-- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]