Re: [linux-lvm] System Suggestions
On Wed, Mar 06, 2002 at 07:40:09PM -0800, Petro wrote: [snip] We have 10 of the 3ware cards, and while the drive is GPLd and in the kernel, we have not been satisfied with the stability of the system What were the stability problems? We haven't had a chance yet to qual the latest firmware, etc., but we went with dumb IDE expansion cards (we're only using 4 ide drives per system) and we're getting better speed (RAID0 or 1+0 depending) than we were off the 3ware card. So you're doing software RAID now? Some more specifics would be appreciated. What 3ware cards? 7410s? What type of drives? What motherboard? Were you doing RAID 1+0? Do you run your application-specific benchmarks, or general benchmarks? Have any actual numbers? Thanks, Maurice sql, query - 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: How to add mysql to my startup
On Tue, Sep 25, 2001 at 01:16:05AM -0700, Rodney Broom wrote: From: Bertrand TACHAGO [EMAIL PROTECTED] % cp /usr/local/mysql/support-files/mysql.server \ /etc/rc.d/init.d/mysql.server % chmod 544 /etc/rc.d/init.d/mysql.server I had done it but it doesn't work % ln -s /etc/rc.d/init.d/mysql.server \ /etc/rc.d/rc3.d/S99mysql What is the importance of this command? It links one file to another. Try this: % man ln Also see 'man chkconfig' and 'man ntsysv' which can simplify the maintenance of those links. For example, you should be able to run this to add mysql to the default run levels: /usr/sbin/chkconfig --add mysql.server And run this to check it: /usr/sbin/chkconfig --list mysql.server Maurice - 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: Problem with UPDATE statement
On Fri, Aug 10, 2001 at 02:19:21AM -0400, Julian Simpson wrote: In what way is it mangling my query? and why won't the same query work from my php script. I would accept this if it was just any interface but myphpadmin is supposed to be in line with mysql standards. update cdrequest set albumfill = hot shots II, releasedatefill = 20010708 where requstID = 2; i get: You have an error in your SQL syntax near '\hot shots II\, releasedatefill = 20010708 where requstID = 2' at line 1 I can't see any reason for the error. Your web based interface is mangling your query. Hi Julian. I'd recommend taking the suggestion and try the query through the command-line interface. If it works there, then you've isolated the problem to the interface you're using. Divide and conquer. BTW, should requstID be requestID? -- Maurice Aubrey [EMAIL PROTECTED] Watch the costs and the profits will follow. - Andrew Carnegie MySQL 3.22.32: up 21.9 days, processed 1,514,328,327 queries (799/sec. avg.) - 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: Antwort: Re: howto insert an image as blob?
On Mon, Jul 30, 2001 at 12:30:34PM +0200, [EMAIL PROTECTED] wrote: plz tell me if the following statement is correct (just for the fact i cant find a solution for the problem in jsp at once) insert into pictures (picturename,picturedata) values (testpicture, c: \temp\testpicture.gif); picturename is defined as char(50) - picturedatea is defined as blob No, you're just inserting the string c:\temp\testpicture.gif into the blob column. MySQL won't go out to the disk and fetch the image for you. You'll need to read it from disk yourself. -- Maurice Aubrey [EMAIL PROTECTED] Watch the costs and the profits will follow. - Andrew Carnegie MySQL 3.22.32: up 11.1 days, processed 766,672,358 queries (797/sec. avg.) - 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: Record ID
On Thu, Jul 26, 2001 at 10:17:56AM +0200, Peter Wiherkoski wrote: Hello, what is the best way to handle record id in MySQL? Has MySQL some kind of automatic record id? if you need a record id which increments automatically, then you can use the int types( tiny, medium or int) with the attribute that it be unsigned and auto_increment like this: record_id mediumint unsigned not null auto_increment regards shane Yes, but that is not a very god way to do this. Se my posted AUTO_INCREMENT problem in table Huh? You had a problem with an auto_increment column because you mistakenly inserted too large a value. As long as you're careful not to do that, it works fine. -- Maurice Aubrey [EMAIL PROTECTED] Watch the costs and the profits will follow. - Andrew Carnegie MySQL 3.22.32: up 7.1 days, processed 504,202,203 queries (824/sec. avg.) - 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: Waste of data while using MySQL database
Hi Andis. I have no experience with this, but once your UPS kicks in can you schedule a graceful shutdown after some number of minutes? On my Red Hat 7.0 machine, I see this in /etc/inittab: # When our UPS tells us power has failed, assume we have a few minutes # of power left. Schedule a shutdown for 2 minutes from now. # This does, of course, assume you have powerd installed and your # UPS connected and working correctly. pf::powerfail:/sbin/shutdown -f -h +2 Power Failure; System Shutting Down # If power was restored before the shutdown kicked in, cancel it. pr:12345:powerokwait:/sbin/shutdown -c Power Restored; Shutdown Cancelled Maurice On Wed, Jul 25, 2001 at 10:01:27AM -0700, Andis wrote: Hi! I have LAN with some PC, which use MySQL database. Sometime power supplay failure occurs. I have back-UPS too, but them can't hold power for 2 or more hours and because it server loose power supplay and just stop (without correct system shut-down). I got such problem: I waste data in this situation (users waste what them did). As I understand, MySQL server don't write data on disc immediatly, but after some time. What can I do for saving data regularly (for example once at hour or something like that)? With best regards - Andis Grasis Latvia -- Maurice Aubrey [EMAIL PROTECTED] MySQL 3.22.32: up 6.0 days, processed 412,923,893 queries (802/sec. avg.) - 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: How to create table in msql DB through cgi script
You need to prepare and execute all of the SQL statements. You're just assigning SQL strings to a variable and printing them out -- you need to actually execute them. Only the last statement, select * from test_1, is actually being run. Read through the perl DBI manual: http://search.cpan.org/doc/TIMB/DBI-1.19/DBI.pm Consider setting the RaiseError attribute so you can skip the error checking code. On Sat, Jul 21, 2001 at 03:58:25AM -0700, Joseph Maxwell wrote: Hello, I have a database set up on my web site at my ISP server. Connection to the DB can only be made from the localhost. So I have to do everything through CGI. They have the perl DBI and php3 that I can use to access the database. They provided a script to access the DBI which I modified to create 'TABLES' to the DB, however it did not work. The script and modified lines (indicated by a '#' at the end of the lines) are provided below. If anyone would tell me what is amiss in the coding, and how to correct it, I'll appreciate it. Thanks. -- Joe -- Script == ___ #!/usr/local/bin/perl ### # # mysql_connect.pl # # uses the perl DBI module # # replace database name user name and password with the correct values # ### # # set output to unbuffered and print the correct content-type # $|=1; print Content-Type: text/html\n\n; # # we need to use the DBI module # use DBI; # # replace database name user name and password with the correct values # set up the variables to connect to the database # $user='alchemy'; $passwd=''; $dbname='URW'; $dsn = DBI:mysql:$dbname; # # this establishes the connection to the database and lets us know if it worked # print Attempting to connect to the database...BR; $dbh = DBI-connect($dsn, $user, $passwd); if ( !defined $dbh) { print Fatal Error!BRCould not connect to database.BR; print Database: $dbnameBR; print User: $userBRHR; exit 1; } else { print Successful connection to database: B$dsn/BBR\n; } # # generate our SQL commmand # any SQL command can go here (select, create, alter, etc) # replace table with correct value # $command =CREATE TABLE test_0 (ID INTEGER(6), name VARCHAR(20), address1 VARCHAR(40), address2 VARCHAR(40), city VARCHAR(25), state VARCHAR(16), postalcode VARCHAR(12), country VARCHAR(30); # print Command: $commandp\n; # $command =CREATE TABLE test_1 (ID INTEGER(6), sex CHAR(1), birth date, weight SMALLINT(3), remarks VARCHAR(255); # print Command: $commandp\n; # $command =SHOW TABLES; # print Command: $commandp\n; # $command =DESCRIBE test_0; # print Command: $commandp\n; # $command =select * from test_1; # print Command: $commandp\n; # # # create a statement handle and prepare to execute the SQL statement # $sth = $dbh-prepare($command); if ( !defined $sth ) { print Can't create Statement Handle Object $dbh-errstrBR\n; exit 1; } # # execute the command # $rv = $sth-execute; print Return Code: B$rv/B.$dbh-errstr. BRHR\n; exit; --- Returned message in Netscape Attempting to connect to the database... Successful connection to database: DBI:mysql:URW Command: CREATE TABLE test_0 (ID INTEGER(6), name VARCHAR(20), address1 VARCHAR(40), address2 VARCHAR(40), city VARCHAR(25), state VARCHAR(16), postalcode VARCHAR(12), country VARCHAR(30) Command: CREATE TABLE test_1 (ID INTEGER(6), sex CHAR(1), birth date, weight SMALLINT(3), remarks VARCHAR(255) Command: SHOW TABLES Command: DESCRIBE test_0 Command: select * from test_1 Return Code: Table 'URW'.test_1' doesn't exist -- Maurice Aubrey [EMAIL PROTECTED] MySQL 3.22.32: up 2.1 days, processed 147,097,454 queries (801/sec. avg) - 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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: transactions support in mysql
The various table types are discussed here: http://www.mysql.com/doc/T/a/Table_types.html Maurice On Wed, Jul 18, 2001 at 02:12:37PM +0530, Chandrashekhar wrote: Thanks for your prompt reply. I would like to know which version of mysql does supports transactions. and is it stable? Thanks again. with regards, chandrashekhar - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Chandrashekhar [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 12:01 PM Subject: Re: transactions support in mysql On Wed, Jul 18, 2001 at 11:40:15AM +0530, Chandrashekhar wrote: Are transactions supported in mysql.Please guide me. They are. See the manual: http://www.mysql.com/doc/ Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 -- NEW MySQL 3.23.29: up 31 days, processed 239,255,297 queries (86/sec. avg) - 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: query to display per page
Hi Sommai. On Mon, Jun 11, 2001 at 04:52:01PM +0700, Sommai Fongnamthip wrote: Dear, I am preparing my web page to display search result. How could I use SQL command to handle display specific row per page and next button at the bottom page (like most search engine display result). See the LIMIT clause of the SELECT statement: http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SELECT That allows you to specify the row offset and the maximum number of rows to return. For example: SELECT * FROM search_results WHERE sid = ? LIMIT 50,25 That would fetch 25 rows starting at offset 50 (offset is zero-based). In order to know if you should display the next button, you'll want to fetch one more row than you need (e.g. if you'll be displaying 25 rows per page, fetch 26 instead). If you get that extra row, you'll know you have more to display. Maurice - 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: Table won't update
Here are some ideas for an improved debugging methodology. First, take the query that you think should be working, substitute in hard-coded values, and test it through the mysql command-line client interface. So, for example, run the update sitesats set... query and use hard-coded values for $arate, $areview, $apositive, and so on. Check whether the rows you expected to be updated were updated. If that works, then you know it's not the query as such. Next, take the exact same query and place it in your PHP document. Still refrain from doing any variable substitutions. Verify again that the update worked. Finally, one by one, add the variables back in. Maurice Aubrey On Mon, Jun 11, 2001 at 05:39:43PM -0700, Vladimir Kravtsov wrote: The table sitesats won't update and shows no errors! (even though there are two instances of echo(mysql_error())) html body ?php require('../common.php'); if (!isset($areview)) { echo(You must review the site); } else { if (!isset($apositive)) { echo(You must review the site); } else { if (!isset($anegative)) { echo(You must review the site); } else { connectdb(); mysql_select_db(xtopsites); $sql = update sitesats set arate='$arate', areview='$areview', apositive='$apositive', anegative='$anegative', validated='2' where id='$id'; $query = mysql_query($sql); echo(mysql_error()); if (!$query) { echo(mysql_error()); } else { echo(Review stored successfully.); } } } } ? /body /html Any ideas? - 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: INSERT.
On Fri, Jun 08, 2001 at 12:43:16AM +0100, Jorge Oliveira wrote: Hi, I have two tables in my database: #TB1 ID_tb1 (auto-incremented) ID_tb2 name address #TB2 ID_tb2 (auto-incremented) method status I need to run a query that inserts values into #TB1 and #TB2, having #TB1.ID_tb2 equal to #TB2.ID_tb2. Since #TB2.ID_tb2 is auto incremented, I don't know how to get the same value inserted at #TB1.ID_tb2... Sounds like you need to insert into TB2 first. Then retrieve the value of ID_tb2. If you're using the perl DBI, I believe it's in $sth-{'mysql_insertid'} (see perldoc DBD::mysql). Finally, do your insert into TB1. -- Maurice Aubrey [EMAIL PROTECTED] - 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