General Question..
Hello all, Hope you are doing well, I have a general question creating foreign keys , I'm creating FK from catalog tables to relation tables with them, when I create a FK in innodb engine on MYSQL a new field with the same name of the FK is created, in this case if I create for example 3 FK the table will have 3 fields more, my Question is, is it right? How should be filled these fields? Are they autofilled when I start to fill the table? Should I ignore them? Best Regards. Saludos Arturo Hinojo P NO imprimas este correo a menos que sea necesario. Please consider the environment before printing this page.
general question
Hi, I am using a MySQL database on a web site, and I would like to know what happends if someone searches in the database using a form, but after a few seconds MySQL starts the query, that user hit the Stop button of the browser. Will MySQL continue its searching and also create the cache, or it will stop automaticly? If it will also stop, can I do something to let it continue searching in order to create the cache and the next time another visitor searches for the same thing it will get the results from the cache? Sorry if this is a stupid question and thank you very much. Teddy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: general question
Octavian Rasnita [EMAIL PROTECTED] wrote on 07/28/2005 02:18:05 PM: Hi, I am using a MySQL database on a web site, and I would like to know what happends if someone searches in the database using a form, but after a few seconds MySQL starts the query, that user hit the Stop button of the browser. Will MySQL continue its searching and also create the cache, or it will stop automaticly? If it will also stop, can I do something to let it continue searching in order to create the cache and the next time another visitor searches for the same thing it will get the results from the cache? Sorry if this is a stupid question and thank you very much. Teddy Here is what happens with nearly all web requests: 1) The browser (or some other tool) sends a message to a web server to get something. This usually because the user specifically asked for something, because an HTML page has tags in it for other content (like images), or by some other user action or client-side programming. Because you are specifically asking for something from the server, the specially formatted request is called either a Uniform Resource Locator (URL) or, in a more general sense, a Uniform Resource Identifier (URI). 2) the web server receives the URI and begins the process of providing what was requested. In the case of a scripted response, like your example, it make take some time for the server to complete assembling it's response. 3) the server responds with data/the browser receives the data. (Hopefully the browser will know what to do with whatever it asked for.) In your sample scenario, you said that between steps 2 and 3: 2.5) user clicks STOP in the browser. There aren't any messages in most of the internet protocols (HTTP, FTP, GOPHER, WAIS, etc) to cancel a response. The simplest thing for to do was to just ignore the response if it ever came. So to answer your question, the server doesn't know that the user is no longer interested in the information so it continues to process the request to its full and complete resolution. With some servers there are ways to detect if the browser is maintaining an open connection with the server (waiting on a response) but most server-side scripts do not check that status. Because they don't check that status, the script will not detect that the user has hung up waiting on it's response until it is ready to send the actual response data. The query completes, the cache is filled, and whatever effort went into formatting the response is just wasted. Since the user doesn't want it, the response is sent to the bit bucket. Make sense? Shawn Green Database Administrator Unimin Corporation - Spruce Pine
Re: general question
Octavian, I am using a MySQL database on a web site, and I would like to know what happends if someone searches in the database using a form, but after a few seconds MySQL starts the query, that user hit the Stop button of the browser. Will MySQL continue its searching and also create the cache, or it will stop automaticly? Interactivity between the webserver and the database is server-side. So, when the user clicks on the stop button, it should simply ignore the response client-side. In other words: The server will complete his job and send you the result but your browser will ignore it. It´s just my thoughts. I´m not sure about it, but the logic is this. If it will also stop, can I do something to let it continue searching in order to create the cache and the next time another visitor searches for the same thing it will get the results from the cache? If you use query cache in server side (on database or on your programing language), yes. It should works. If you use cache base on proxy or in the client browser. Once the result was ignored, there is no page to cache. I hope this help you, Ronan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
replication general question
I have two mysql boxes setup. Fast machines, I think they are dual 3ghz with boat loads of ram. They are not real busy servers but they have some pretty good sized tables, one of them with a few million rows. My question is, I have Nagios setup to monitor the seconds behind master on the backup server. Usually the boxes are pretty current, within ten or twenty seconds. Other times though they seem to get way behind, like I just bumped the nagios warning email level up to 600 seconds. It doesn't seem to have anything to do really with usage because it usually happens in the middle of the night. Does Mysql do re-indexing or something? What could I do to figure out why the replicatant box is getting so far behind? --ja -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: replication general question
What type of drives to you have on your system? That is often more important than CPU speed. My guess is that there are nightly maintenance crons slowing down disk access. I have never monitored replication via the seconds-behind-master function as we do not use 4.1, so I can't speak for how accurate it is.. Atle - Flying Crocodile Inc, Unix Systems Administrator On Thu, 23 Jun 2005 [EMAIL PROTECTED] wrote: I have two mysql boxes setup. Fast machines, I think they are dual 3ghz with boat loads of ram. They are not real busy servers but they have some pretty good sized tables, one of them with a few million rows. My question is, I have Nagios setup to monitor the seconds behind master on the backup server. Usually the boxes are pretty current, within ten or twenty seconds. Other times though they seem to get way behind, like I just bumped the nagios warning email level up to 600 seconds. It doesn't seem to have anything to do really with usage because it usually happens in the middle of the night. Does Mysql do re-indexing or something? What could I do to figure out why the replicatant box is getting so far behind? --ja -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: replication general question
I don't think network latency would be an issue. This is within a protected network dmz so it has it's own switch. Here is the nagios script stuff. Might be more than what you need but let me know if you are able to use some of it. I have two on the server. first, I have: [EMAIL PROTECTED] jabbott]# more secondsBehind.sh #!/bin/sh mysql -pMYSECRET -e show slave status\G | grep Seconds Then I have this that I run in the rc.local. This sets up a port that listens for a connection on port 5151. I have hole open in my firewall into my dmz for port 5151 [EMAIL PROTECTED] jabbott]# more socket.pl #!/usr/bin/perl use IO::Socket; $server_port = 5151; $server = IO::Socket::INET-new(LocalPort = $server_port, Type = SOCK_STREAM, Reuse = 1, Listen= 10) or die Could not be a tcp server on port $server_port : [EMAIL PROTECTED]; while ($client = $server-accept ()) { my $sysArg = `/home/jabbott/secondsBehind.sh`; # uncomment the next line for debugging print $client is the new connection\n\n; print $client $sysArg\n; print connect \n; close ($client); } close ($server); Then, on the Nagios side I have this: $ cat /usr/lib/nagios/plugins/mysql-replication-lag.pl #!/usr/bin/perl -w use strict; use lib nagios/plugins ; use utils qw($TIMEOUT %ERRORS); use IO::Socket; $ENV{'PATH'}=''; $ENV{'BASH_ENV'}=''; $ENV{'ENV'}=''; my ($ip_address,$port,$warn,$critical) = @ARGV; # Just in case of problems, let's not hang Nagios $SIG{'ALRM'} = sub { print No Answer from Client\n; exit $ERRORS{UNKNOWN}; }; alarm($TIMEOUT); my $sock = new IO::Socket::INET( PeerAddr = $ip_address, PeerPort = $port, Proto= 'tcp', ); unless ($sock) { print Socket could not be created. Reason: $!\n; exit $ERRORS{'UNKNOWN'}; } my $result = $sock || Could not read socket\n; close($sock); alarm(0); print $result; unless ($result =~ /^\s*Seconds_Behind_Master:\s*/i) { exit $ERRORS{'UNKNOWN'}; } $result =~ s/\D//g; exit $ERRORS{'CRITICAL'} if ($result$critical); exit $ERRORS{'WARNING'} if ($result$warn); exit $ERRORS{'OK'} 1; __END__ On Thu, 23 Jun 2005, James Green wrote: Checked for network latency? I have replication running on similar hardware hooked up to the same switch, and have never seen it rise above 0 seconds behind. Not that I check often, I have no need to... Is your nagios script open for public use - I was about to have to write something for this task myself. Thanks, James On 23/6/2005, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have two mysql boxes setup. Fast machines, I think they are dual 3ghz with boat loads of ram. They are not real busy servers but they have some pretty good sized tables, one of them with a few million rows. My question is, I have Nagios setup to monitor the seconds behind master on the backup server. Usually the boxes are pretty current, within ten or twenty seconds. Other times though they seem to get way behind, like I just bumped the nagios warning email level up to 600 seconds. It doesn't seem to have anything to do really with usage because it usually happens in the middle of the night. Does Mysql do re-indexing or something? What could I do to figure out why the replicatant box is getting so far behind? --ja -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: replication general question
Hello. I haven't heard about periodical MySQL jobs, but Unix boxes usually have some midnight cron jobs (updating of locate database for example). [EMAIL PROTECTED] wrote: I have two mysql boxes setup. Fast machines, I think they are dual 3ghz with boat loads of ram. They are not real busy servers but they have some pretty good sized tables, one of them with a few million rows. My question is, I have Nagios setup to monitor the seconds behind master on the backup server. Usually the boxes are pretty current, within ten or twenty seconds. Other times though they seem to get way behind, like I just bumped the nagios warning email level up to 600 seconds. It doesn't seem to have anything to do really with usage because it usually happens in the middle of the night. Does Mysql do re-indexing or something? What could I do to figure out why the replicatant box is getting so far behind? --ja -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: DBs and developments, general question
I guess it depends what the code is written in. If the application is based on a lot of Oracle Stored Procedures then you would have to port those stored procedures to a language suitable for MySQL. If the application was written in Java or Perl using JDBC or DBI then porting the application would be easier. However, you would still have to take into consideration the limitations of MySQL when porting the code like: no views, no subqueries (until 4.1), and things like that. Does that make sense to you? Kindest regards, Shayne -Original Message- From: EWAGW [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 4:21 PM To: [EMAIL PROTECTED] Subject: DBs and developments, general question Hi list, I am still very much a newbie so here goesI am still a bit shaky on how to connect to dbs and general concepts so please excuse any glaringly wrong statements.. If an application is developed in Oracle is there a special language for development with Oracle dbs? I understand that oracle db can be migrated to a MySQL db. If an app is already developed using oracle is there anyway of migrating this code to mysql code? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
DBs and developments, general question
Hi list, I am still very much a newbie so here goesI am still a bit shaky on how to connect to dbs and general concepts so please excuse any glaringly wrong statements.. If an application is developed in Oracle is there a special language for development with Oracle dbs? I understand that oracle db can be migrated to a MySQL db. If an app is already developed using oracle is there anyway of migrating this code to mysql code? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
General Question on Upgrading
I got version 3.23.56 of mysql with my redhat installation as an rpm package and now want to upgrade to the latest 4 version. My question is: how I can upgrade my current installation myself without going through the rpm package installer? Thanks, -Jalil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: General Question on Upgrading
søndag 04. januar 2004, 22:45, skrev [EMAIL PROTECTED]: I got version 3.23.56 of mysql with my redhat installation as an rpm package and now want to upgrade to the latest 4 version. My question is: how I can upgrade my current installation myself without going through the rpm package installer? Thanks, -Jalil I guess you can install the tarball in /usr/local. You will then have a directory called something like mysql-standard-4.0.17-pc-linux-i686. Make a symlink to it call mysql so you will have /usr/local/mysql Inside that directory remove the data directory, and make a symlink called data to the directory where you have your databases for the old installation. When the new database is up and running you need to run mysql_fix_privilege_tables since there has been some changes since 3.23 This is a *very* rough description that may not suit you setup, but it should give you some ideas. See the README and INSTALL-BINARY files in the tarball. Regards, Arne -- Arne K. Haaje | www.drlinux.no Bregneveien 9 | 1825 Tomter | M: 92 88 44 66 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
General question about rotating growing tables
Hello, I have a simple database schema with a table of log entries that grows quickly. Every month I'd like to break last month's entries off into a new table for that (last) month. I know creating new tables within an existing schema is not recommend database design, but in this case it seems to make sense. I've used triggers and stroed procedures in Oracle to do this kind of table rotating and it was pretty simple. What I'm considering with MySQL is using Cron and the MySQL client app to select the appropriate date range into an hash, write the hash into a newly created table, and then delete the selected rows from original table. My question is, is this recommended logic, or is there a better way to skin this cat using MySQL? Sincerely, Eric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: General question about rotating growing tables
How about Create newtable select * from oldtable where conditions_are_met; Qmail List wrote: Hello, I have a simple database schema with a table of log entries that grows quickly. Every month I'd like to break last month's entries off into a new table for that (last) month. I know creating new tables within an existing schema is not recommend database design, but in this case it seems to make sense. I've used triggers and stroed procedures in Oracle to do this kind of table rotating and it was pretty simple. What I'm considering with MySQL is using Cron and the MySQL client app to select the appropriate date range into an hash, write the hash into a newly created table, and then delete the selected rows from original table. My question is, is this recommended logic, or is there a better way to skin this cat using MySQL? Sincerely, Eric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: General question about rotating growing tables
MySQL can do embedded SQL like that? I'm using 3.23. If so, can the embedded query have a WHERE clause as well (something like WHERE datetime date_sub(NOW(), interval 1 month). Thx a lot - Original Message - From: gerald_clark [EMAIL PROTECTED] To: Qmail List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 04, 2002 10:49 AM Subject: Re: General question about rotating growing tables How about Create newtable select * from oldtable where conditions_are_met; Qmail List wrote: Hello, I have a simple database schema with a table of log entries that grows quickly. Every month I'd like to break last month's entries off into a new table for that (last) month. I know creating new tables within an existing schema is not recommend database design, but in this case it seems to make sense. I've used triggers and stroed procedures in Oracle to do this kind of table rotating and it was pretty simple. What I'm considering with MySQL is using Cron and the MySQL client app to select the appropriate date range into an hash, write the hash into a newly created table, and then delete the selected rows from original table. My question is, is this recommended logic, or is there a better way to skin this cat using MySQL? Sincerely, Eric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: General question about rotating growing tables
But there would be no way to variably create the newtable table name correct? Thx - Original Message - From: gerald_clark [EMAIL PROTECTED] To: Qmail List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 04, 2002 10:49 AM Subject: Re: General question about rotating growing tables How about Create newtable select * from oldtable where conditions_are_met; Qmail List wrote: Hello, I have a simple database schema with a table of log entries that grows quickly. Every month I'd like to break last month's entries off into a new table for that (last) month. I know creating new tables within an existing schema is not recommend database design, but in this case it seems to make sense. I've used triggers and stroed procedures in Oracle to do this kind of table rotating and it was pretty simple. What I'm considering with MySQL is using Cron and the MySQL client app to select the appropriate date range into an hash, write the hash into a newly created table, and then delete the selected rows from original table. My question is, is this recommended logic, or is there a better way to skin this cat using MySQL? Sincerely, Eric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
general question
Why only port 3306 is used by MySQL? Is there some standard used like used for FTP, localhost ports ? Thanks !!! -- Paras - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: general question
Yes, and it is the same standard used to assign ports -- RFC 1700. Paras Mukadam wrote: Why only port 3306 is used by MySQL? Is there some standard used like used for FTP, localhost ports ? Thanks !!! -- Paras - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mySQL++/General Question
Mike Gleason Jr Couturier writes: Hello all ! I've got 2 questions : Can we insert ASCII characters in an INSERT statement... like INSERT INTO guy(name) VALUES('ascii codes here'); so that the ascii code of a ';' will display a ';' in the database... understand !? And is there a place on the net that we can browse all errors no. of a Connection or Result or any objects that we can create... Thanks ! Mike You can achieve the above with ASCII codes with ostrstream class, which is independent of MySQL, being a standard STL class. Regarding the errors from Connection and Result, just browse our on-line manual at www.mysql.com. Those are the same ones that come from server or C API. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mySQL++/General Question
Hello all ! I've got 2 questions : Can we insert ASCII characters in an INSERT statement... like INSERT INTO guy(name) VALUES('ascii codes here'); so that the ascii code of a ';' will display a ';' in the database... understand !? And is there a place on the net that we can browse all errors no. of a Connection or Result or any objects that we can create... Thanks ! Mike - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MyODBC General Question
Good Day: I was just wondering, if I'm using mm.mysql.jdbc-1.2c to connect to a database w/JAVA do I also need MyODBC installed and configured also? Or is mm.mysql.jdbc-1.2c all I need? Thanks alot.. Greg __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php