Re: Source code build bug in 4.0.0 on Linux on Pentium class machines
Hi Rick! I see the msg about the configure adjustment in the next release but until then I have a hack fix at the bottom of this message. Requires no configure -switches, just add one line to configure. On Sat, 24 Nov 2001, Rick Stones wrote: Description: If you build the 4.0.0. system from sources on a Pentium (NOT a Pentium pro) Linux machine then although configure correctly sets the CPU to 586, it still generates Makefiles with -mpentiumpro in them, and you get executables that crash and burn with SIGILL. This seems to be general in many subdirectories, but is easiest to test in the 'client' subdirectory. How-To-Repeat: Red Hat 7.2 clean installed on an Intel Pentium (NOT Pro) machine. Type make, try and execute the resulting mysql client and you get a SIGILL almost immediately (before you have to type anything). Using 7.0 with lots of upgrades and -never- had any kind of crash like that. Using P4 but -do- get all those pentiumpro references. My gcc -v returns exactly the same as yours. Fix: Using the --with-low-memory --host=pentium --target=pentium options to configure gets you round the fault by removing the -mpentiumpro CFLAGS from the Makefiles, but I'm not sure about a proper fix. I tried those switches, plus rm -f config.cache config.log, and get a weird response. Makefile says: build_alias = pentium build_triplet = i586-pc-none host_alias = pentium host_triplet = i586-pc-none target_alias = pentium CFLAGS = -g -O -DDBUG_ON -DSAFE_MUTEX -mcpu=pentiumpro -march=pentiumpro -DCPU=pentiumpro I don't know enough about 'compiler management' to have any idea how this happens or what it really means. Another oddity. 'set |grep HOSTTYPE' returns HOSTTYPE=i386, but dmesg |grep CPU returns CPU: L1 I Cache: 8204K L1 D Cache: 8K CPU: Intel(R) Pentium(R) 4 CPU 1500MHz CPU: Intel Intel(R) Pentium(R) 4 CPU 1500MHz stepping 0a ...and /proc/cpuinfo confirms that. In any case I'm poking through configure. Past cpu_set I can't see where it differentiates between one cpu and another. It -seems- to say -mcpu=$ac_arg but it also doesn't seem to work right. OK, here's a BLOODY hack that simply makes it work. CAUTION! No guarantees! I am -not- a script-geek! It worked for me but have no idea how it might react elsewhere. First, you must make sure all Makefiles are gone. As mentioned below, make distclean doesn't do that correctly. Also rm -f the config files mentioned above. I strongly suggest a new raw source untar. In configure, at line 9832, is 'for ac_arg in $cpu_set;'. (Just before that is where the cpu is picked.) Just -before- the 'for ac_arg..' line put in: cpu_set=pentium; That essentially negates anything the script had already determined. ** Niglet: make distclean does not remove a couple of Makefiles that still have pentiumpro in them. ** Suggest: In mysql-test/mysql-test-run.sh, I think $ECHO Aborting. To continue, re-run with '--force'. should be $ECHO Aborting. To continue, re-run with 'cd mysql-test ; ./mysql-test-run --force'. It's in the Docs but that message is a tad misleading because it doesn't work directly from the root make. Have a :) day! jb -- jim barchuk [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
Re: Query problem
Hello! i have a query and in the where clause i want to compare dates, for example in asp i used select * from table where col_date1 = now and col_date2 = now what is the similar using mysql See http://www.mysql.com/doc/ Look up 'date'. See especially Date and Time Types, Date and Time Functions, and Date Calculations. Have a :) day! jb -- jim barchuk [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
Re: column maximum?
Hello Kurt! Just to expand a little on the 'whys' of ryan's post... On 17 Nov 2001 [EMAIL PROTECTED] wrote: I'm creating a table, and because i'm a fan of single-table databases, its turning out to have many colums. (It will have over 1100). Will this be possible? Will this cause problems? A note: 1020 of the colums will be a numeric value less than 10. I'm creating a database that keeps track of a group of judges scores for something. 20 judges...3 rounds...17 categories...1020 single digit entries. You're thinking in a 'monolithic/block' format. That's not what relational database is all about. You need to break the monolith into smaller more easily managed pieces, and use relational links in the main event table to point towards the smaller pieces. The first reason is the pure size. Looking at the judge's columns, you'll have 20 columns x maybe 30 CHARs each = 600 bytes. Over the course of 1000 events that'll me 600k -just- for the -judges-. If the judge's column is a SMALLINT pointer of 2 bytes, the total expenditure over 1000 events is 40k while the separate judges table is 600 bytes. The next reason is expandability. Yes, you have the judge's name, but where do you put their address, phone number, email address, credential references, home page link? It makes no sense to add columns to a monolithic database for those items because you'll need to -repeat- that data for -every- record in the database. Better to put that info in the 'judge's table' which you can reference at will, and add new columns to as future needs arise. Paul Dubois _MySQL_ at http://www.newriders.com has a good 'relational database design' tutorial chapter. Have a :) day! jb -- jim barchuk [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
Re: Inserting Data on top
Hello Sandeep! I am trying to insert data from a form which has 4 fields such that the data always sits at the top in my database occupying locations : SEC_ID: 1, 2 , 3 4 Everytime i insert data the data gets appended at the end i,e, if the first 4 fields are occupied my data takes the postions 5,6,7 8 but this wont do.. Well, if you have a TABLE that contains x records, and you INSERT y records, you now have x + y records. That is the purpose of INSERT and fortunately there is no way around that fact. :) Can anyone pl help me out with a suitable query to achieve the same?? Sure! Try UPDATE. You will (as it says in O'Reilly,) 'change actual data within a table without altering the table itself.' Meaning you won't be adding or deleting any records, simply adjusting existing records. Have a :) day! jb -- jim barchuk [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
Re: Basic index questions
Hi Chris! I understand that an index is used to speed stuff up, but am foggy on the details. Ayup. one of the beauties of MySQL/RDBMS is that -you- don't really need to know or -do- much except declare the index. :) I assume I set up the index like so in the create table: ... unique index (lname, fname, mname) ? Do I give the index a name? I notice this is optional in the syntax. What's the reason to give/not give an index a name? Best is to real -all- the details http://www.mysql.com/doc/ is the starting point http://www.mysql.com/doc/manual.php?search_query=create+table+indexdepth=0 ..returns cool hits: http://www.mysql.com/doc/M/y/MySQL_indexes.html http://www.mysql.com/doc/C/R/CREATE_INDEX.html http://www.mysql.com/doc/C/R/CREATE_TABLE.html http://www.mysql.com/doc/D/a/Data_size.html ...and lots more. How do I tell my client code to use the index for sorting? Again, that's the beauty, MySQL will simply use it if it's available and you SELECT the right indexed fields. Have a :) day! jb -- jim barchuk [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
Re: how to make LOCATE other functions case-insensitive?
Hi Bennett! On Wed, 14 Nov 2001, Bennett wrote: I did try select * from user where 'Bennett' LIKE emailaddress; but it returned 0 results; in fact, so did select * from user where 'bennett' LIKE emailaddress; I didn't think that through too well, did I. :) See the Doc for 'Pattern Matching' regarding % and _ and such. This works: SELECT * FROM user WHERE emailaddress LIKE '%Bennett%'; (I can't find LIKE documented anywhere on the www.mysql.com/doc/ tutorial page, even though MySQL accepts it as part of valid syntax.) Thanks for your suggestions though. Yes, LIKE is a difficult word to find because it's so common and returns too many hits. A search for 'pattern matching' returns exactly relevant hits. Gauging by the section numbers returned I think the most relevant section 3.3.4.7 is -just- off the end of the list when searching for 'like'. A search for 'select' does return that page in the list. Have a :) day! jb -- jim barchuk [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
Re: Need to understand mysql mechanisms
Hello S! I am sending this mail in order to get things straight about table corruption which I am experiencing with 4.0(as well as previous versions). 1)System specs: PIII x1000MHz, 1GB RAM, HD 37GB SCSI, AHA29160N SCSI controller OK, so this is a possibly a 'fairly' new box, meaning it hasn't been in service for years with no other problems? 4) Corruption is a tossup. The import always works. However, when I run the queries sometimes they all run fine, while other times I get an error 127 on the table it is working on. myisamchk NEVER manages a complete recovery of all records(typically 25% of the records). This makes it 5)Before writing a bug report(the problem may be that this is erratic and even on my PC corruption is not consistent, e.g. I may import a file and get corruption, or I may import another file without corruption) and hence reproducibility may be problematic., I would appreciiate someone setting me then ulimit -a limit says 8192 but when I open a window as a regular user, and do ulimit -a limit it is still 1024. Rebooting (By 'window' do you mean an X-window? If yes, try shutting off xfs and doing things in a plain text terminal. Not a fix, just a bandaid, but it lightens the system load.) In any case my real suggestion is that I was having wacky unrepeatable system errors that that your descriptions remind me of, and memtest86 http://www.teresaudio.com/memtest86/ found bad RAM that -*NO*- other memory tester could confirm. Changed one DIMM and it purrs like a kitten. Have a :) day! jb -- jim barchuk [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
Re: Connection errors and server polling
Hello Melvyn! However - since we replicate our servers, to ensure high availabity, we like to poll if the primary is up. We do this, because when a host is down (not the mysql Big Brother is a bit of an overkill for the 'one' thing you're asking for but it's a dynamite generic 'server monitoring' tool and you might find other uses for it. It can page or email you when 'something' does down. http://www.bb4.com Have a :) day! jb ob-filter-words: table sql database -- jim barchuk [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
Re: Can field names be longer than ONE word?
Hello David! As subject what do I do if I want a field called (for example) Competition ID? I have looked (http://www.mysql.com/doc/C/R/CREATE_TABLE.html) but to no avail. I have tried enclosing it in quotes and 'single quotes' but neither work. Can this be done? Wrong doc. :) Try http://www.mysql.com/doc/L/e/Legal_names.html That says that with a few limitations 'any legal file name' under your OS is fine. But what does 'neither work' mean? Exactly what error do you see at what point in the process? Creating the table? Accessing the table? Do't just type in the error, use copy/paste. Just for fun, try quoting with `backtick.` That's mentioned related to 'special' chars and maybe space is such. Have a :) day! jb ob-filter-words: database sql -- jim barchuk [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
Re:difficulty compiling v4 --without-innodb
Hi Sommai! On Mon, 29 Oct 2001, Sommai Fongnamthip wrote: Did you mean V4 must ran with innodb? Oh! I have bad experience with innodb. It ate a lot my hard disk space. Oh no! Absolutely not required! I think V4 defaults to --with-innodb because './configure --help |grep -i inno' returns '--without-innodb Do not include the InnoDB table handler.' So it's easy to turn off. My problem was that Apachetoolbox created other config files for its own use that I was unable to figure out how to disable. Those other config files kept the default --with-innodb status. Doing a clean reinstall and -not- using Apachetoolbox made those other config files 'not appear' and my './configre --without-innodb' was able to 'hold it's ground.' :) I'm sure there's a way to set my preferences in toolbox but the docs are very thin, it's a pretty complex app, I'm not a shell-gooroo either, and I haven't bothered to try to figure out how to do that yet. Have a :) day! jb -- jim barchuk [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
Re: Newsgroups
Hi All! Do any of the public web archives of the list suit your needs? Have you seen them? It's fine for archived messages but too hard to find new messages, say within the last 7 days. Staying current with MySQL is a lot harder with the mailing list because you have to keep up with the mail each day. A newsgroup is much better because you know the messages can be browsed whenever you want. It puts the messages in a tree and makes viewing pertinent threads a breeze, especially with an offline newsgroup reader like Agent. You see the complete thread without getting inundated with 60-90 messages every day. The newgroup can still be archived to the public web archive. These comments are applicable to the current mysql.com lists, but not to the more general mailing list vs. newsgroup contention. The fact that they aren't threaded is a function of the list-2-HTML software. Gimme MHonArc -any- day of the week. :) The fact that you can't tell what you've read there before is again a matter of no dates printed by the list-2-HTML converter. The -searchable- level of the lists is about five clicks deep into mysql.com, at the bottom of a 120k page. and everyone here wonders why the same questions are asked here over and over and over. LOL! Instead of having a small INPUT box -right- on the opening screen that just -invites- the user to USE the archives.. (I also enjoy the way search page hits have LINK colors = VLINK. Makes it sooo easy to keep track of which hits I've seen and which I haven't. :) ) The real bottom line of the topic is that mailing lists are push technology. The server -sends- them to me when they arrive. Newsgroups are pull, -I- have to keep checking to see if someone posted something. For mysqlf, for 'once in a blue moon' usage, newsgroups are fine. I turn on a subscription, post a question, hang around a week or two to see what answers come in, and unsub. For daily, intense, frequent use I -far- prefer mailing lists simply because replies 'arrive' within minutes of being posted, I don't have to 'go get them.' One factor that hasn't been mentioned is moderation. This list gets spammed a -lot- because list 'membership' isn't required and only the word filters are there. (Try a search for 'spam' and you'll get 470 hits.) But a real, global, newsgroup is just wde open to the folks that have automatic scanners running and looking for 'Oh goody! A new group to spam!.' Usenet is essentially a wasteland because the ISPs don't care who does what. The only viable groups out there are moderated, and that's close to a full time job for a list with this kind of traffic. /RANT :) Have a :) day! jb -- jim barchuk [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
difficulty compiling v4 --without-innodb
Hello All! Having difficulty compiling v4-alpha --without-innodb. I am -not- a compiler-gooroo. All I can do is try to decode error messages. Never had a single problem compiling earlier versions -or- 4-alpha -without- --without-innodb. All of the above happens under both gcc-2.95.3/RH7 rpm and hand rolled 2.96 (I differentiate between them by symlink in /usr/bin.) Compile always works fine when I remove --without-innodb. There's reference to Apachetoolkit below because I did originally compile through that to make the Apache/php/MySQL integration easier and everything worked fine. So I don't mind letting the source reside there. Since then I have done several other successful manual 4-alpha compiles that worked fine. (Trying to get a standard/stable sock location working right.) Here's my configure script: #!/bin/sh cd /usr/local/src/Apachetoolbox-1.5.41/src/mysql-4.0.0-alpha make distclean rm -f config.cache config.log ./configure \ --prefix=/home/mysql\ --with-mysqld-user=mysql\ --with-debug\ --bindir=/usr/local/sbin\ --sbindir=/usr/local/sbin \ --without-innodb After configure, Makefile says: CONF_COMMAND = ./configure --prefix=/home/mysql --with-mysqld-user=mysql --with-debug --bindir=/usr/local/sbin --sbindir=/usr/local/sbin --without-innodb That looks cool. make ends with (wrapping and spacing lines for clarity): c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/home/mysql\ -DDATADIR=\/home/mysql/var\ -DSHAREDIR=\/home/mysql/share/mysql\ -DHAVE_CONFIG_H -I./../include -I./../regex -I. -I../include -I. -g -O -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti -c handler.cc c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/home/mysql\ -DDATADIR=\/home/mysql/var\ -DSHAREDIR=\/home/mysql/share/mysql\ -DHAVE_CONFIG_H -I./../include -I./../regex -I. -I../include -I. -g -O -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti -c ha_heap.cc c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/home/mysql\ -DDATADIR=\/home/mysql/var\ -DSHAREDIR=\/home/mysql/share/mysql\ -DHAVE_CONFIG_H -I./../include -I./../regex -I. -I../include -I. -g -O -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti -c ha_myisam.cc c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/home/mysql\ -DDATADIR=\/home/mysql/var\ -DSHAREDIR=\/home/mysql/share/mysql\ -DHAVE_CONFIG_H -I./../include -I./../regex -I. -I../include -I. -g -O -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti -c ha_myisammrg.cc c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/home/mysql\ -DDATADIR=\/home/mysql/var\ -DSHAREDIR=\/home/mysql/share/mysql\ -DHAVE_CONFIG_H -I./../include -I./../regex -I. -I../include -I. -g -O -DSAFE_MUTEX -fno-implicit-templates -fno-exceptions -fno-rtti -c ha_berkeley.cc make[3]: *** No rule to make target `../innobase/include/../ib_config.h', needed by `ha_innobase.o'. Stop. make[3]: Leaving directory `/usr/local/src/Apachetoolbox-1.5.41/src/mysql-4.0.0-alpha/sql' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/src/Apachetoolbox-1.5.41/src/mysql-4.0.0-alpha/sql' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/Apachetoolbox-1.5.41/src/mysql-4.0.0-alpha' make: *** [all-recursive-am] Error 2 There is an innobase/ib_config.h.in but no .h. Any clues? Thanks much. Have a :)day! jb ob-filter-words: database table sql -- jim barchuk [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
Re:difficulty compiling v4 --without-innodb
Hello Heikki! you probably should #undef HAVE_INNOBASE_DB in some file, maybe sql/handler.h Search with grep where the above has been defined. Having difficulty compiling v4-alpha --without-innodb. I am -not- a Sure did have that. A bunch of them in different files which is part of the reason I had such a tough time figuring out what was actually going on. Also had some other files that did *NOT* look familiar from other previous non-Apachetoolkit compiles. Then I found a reference in the toolkit log files stating 'CONFIGURING FOR INNODB.' Well, given that, toolkit apparently writes some config files, *.m4, that autoconf knows how to deal with but I don't know how to massage back to original. So I wiped the mysql subdir, untarred a new source tree, and configured and compiled clean with --without-innodb. Perfect. Guess I should have taken the easy way out right from the start. :) Apachetoolkit is a bit weird. -Sometimes- it asks me if I want to 'edit the php config file,' or the mysql config, or the apache config. -Or- not ask me, with no rhyme, reason, or consistency (as far as I could tell). Oh well, it worked for what I needed it to do. Thanks much. Have a :) day! jb -- jim barchuk [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
Re: Simple problem: Blank search box returns all records
Hello BaderBay! How do I avoid search problems when a user leaves a search box empty on an Ultradev search page running jserv and attached to a MySQL database? I have three search boxes: Author, Title, and Keyword The user enters the search data into one, two, or all three of the fields, and presses SUBMIT (I use JSP), so the variables for the recordset are (ex. Author) : Name: varAuthor Default Value: % [I also tried 1 ] Run-Time Value: request.getParameter(txtAuthor) The search uses this SQL logic: SELECT Author, Title, Keyword FROM tbJose WHERE Author LIKE '%varAuthor%' OR Title LIKE '%varTitle%' OR Keyword LIKE '%varKeyword%'; The search works perfectly , UNLESS A USER LEAVES ONE BOX EMPTY, then the search RETURNS ALL RECORDS IN THE DATABASE, whether the default value is % or is 1. I do not want this to happen. How might I modify the code? I am a SQL beginner so I need explicit instructions. I'm a noobee too but 'been there done that.' More exactly, where the user leaves *one or more* input fields blank/empty/NULL. First, here's a 'smart URL' that points to the docs: http://www.mysql.com/doc/manual.php?search_query=null I also like lots of (par(en)theses) for clarity. :) SELECT Author, Title, Keyword FROM tbJose WHERE ((Author IS NOT NULL) AND (Author LIKE '%varAuthor%')) OR ((Title IS NOT NULL) AND (Title LIKE '%varTitle%')) OR ((Keyword IS NOT NULL) AND (Keyword LIKE '%varKeyword%')); At least without testing I think I got that right. Someone please correct me if not. Have a :) day! jb ob-Filter-words: databast table sql -- jim barchuk [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
Re: Problem with query
Hi Carl! Paul DuBois writes: NULL basically means unknown value, so saying WHERE x = NULL cannot work, even if x is NULL. That means where one unknown value = another unknown value, which cannot be evaluated with any certainty. :-) It is sort of odd, though, that x = NULL returns something which appears to be undefined rather than something well-defined (such as false all the time) or an error (which could be said to be well-defined, if errors are considered to be valid responses to queries...). Well which would you prefer, false or error? Dealing with errors is annoying if not necessary. 'False' is incorrect -if- the field is allowed to contain 'nothing' because NULL means it does contain nothing. Both 0 and are 'not nothing.' They are distinct values within their set of allowed values. NULL is a 'different' kind of value that is very very useful in many cases. For a field that is allowed to contain NULL: A query that returns NULL means essentially 'do nothing with these results.' A query that returns 0 or , without -further- tests for those values, means 'do something with these values.' When coding it's easier to 'do nothing' rather than test further and later decide you really need to 'not do something.' :) As I just posted to another message, read through the hits returned by http://www.mysql.com/doc/manual.php?search_query=null . As described there dealing with NULL requires a 'different' kind of thinking. It's like thinking about black holes or Heisenberg's box or /dev/null or other places that don't really 'exist' in our normal human plane of reference *but* do in fact exist and can be used. Have a :) day! jb ob-filter-words: database table sql -- jim barchuk [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
Re: Problem with query
Hi Paul! On Sat, 27 Oct 2001, Paul DuBois wrote: At 9:38 -0400 10/27/01, jim barchuk wrote: Hi Carl! Paul DuBois writes: NULL basically means unknown value, so saying WHERE x = NULL cannot work, even if x is NULL. That means where one unknown value = another unknown value, which cannot be evaluated with any certainty. :-) It is sort of odd, though, that x = NULL returns something which appears to be undefined rather than something well-defined (such as false all the time) or an error (which could be said to be well-defined, if errors are considered to be valid responses to queries...). Well which would you prefer, false or error? Dealing with errors is annoying if not necessary. 'False' is incorrect -if- the field is allowed to contain 'nothing' because NULL means it does contain nothing. I think what Carl meant was that it was strange that the WHERE x = NULL query returned a non-empty result set. I noticed that in the original message, too. I don't know what accounts for it. I think WHERE x = NULL 'may' return non-empty results, or not, simply because NULL is undefined and most bets are off for that query. Undefined doesn't mean random. Yes, http://www.mysql.com/doc/W/o/Working_with_NULL.html does say In MySQL, 0 or NULL means false and anything else means true. In this case I take undefined to mean that what appears to work this time may not work next time, depending on the structure of the query, or even if it works consistently with one version of MySQL it may not with another. Quoting page 47 of your book, If you attempt to use NULL with the usual arithmetic comparison operators, the result is undefined. Similarly, quoting http://www.mysql.com/doc/P/r/Problems_with_NULL.html , To look for NULL values, you must use the IS NULL test. 'Must' is a very strong word and I take it as gospel. I think I have less problem with trying to understand what accounts for something that may appear odd to others is that I don't try to think about 'why' when given such clear instrutions. I had a -very- educational experience with NULL with my very first attempt at MySQL -- HTML rendering. TABLE cells that -appeared- to contain something but shouldn't have and really didn't. Had my head spinning for hours until I finally got a grip on the idea that NULL is a Very Strange Thing and that I *must* deal with it only in certain ways. NULL rocks. :) Have a :) day! jb -- jim barchuk [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
Re: insert statement
Hi Curtis! On Sat, 27 Oct 2001, Curtis Gordon wrote: omg! code red!! I JUST installed apache and mysql the other day because my host went down and I didn't want to miss out on dev time! Is is possible that the downloads i grabbed were already infected? I think you're fine. Those were Nimda hits -on- you, not from you. (Code Red looks for default.ida.) You're probably OK because those lines said error - file not found. Have a :) day! jb ob-filter: database sql table -- jim barchuk [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
Re: Weird Error Inserting
Hi All! Unable to insert [ insert into match (league_id,round_id,team_id_1,team_id_2) VALUES ('1','3','2','3') ]: You have an error in your SQL syntax near 'match (league_id,round_id,team_id_1,team_id_2) VALUES ('1','3','2','3')' at line 1. (Yes, I see the reserved word comments.) Debug clue, when the syntax is obviously correct but still fails. Write a small.file and use mysql -p db small.file, where small.file looks like this: insert into match (league_id, round_id, team_id_1, team_id_2) VALUES ( '1', '3', '2', '3') The 'at line' often makes more sense when there're 'more lines' instead of just the one. :) Or of course that can be done from the command line too but it's easier with a more 'fixed' file line number reference. Have a :) day! jb ob-word-filter: database table sql -- jim barchuk [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
Re: MySQL problem with Traffic and Updates
Hi Ryan! Today after my server got a real traffic hit for the first time since I installed PhpAdsNew (a MySQL/PHP Ad software), MySQL was crashed. Here's how it happened: watching the top load levels, I saw it slow creep up about to 3, then rockets quickly to 30s, 40s, and on!! MySQL was at this time taking up 100% of both of the processors in the server. There were about 40 or so MySQL processes spawned at this point. Doing a 'mysqladmin processlist' command on the server showed me a VERY LONG LIST of processes that were open, a lot of which were PhpAdsNew UPDATE commands. The system it is on is a Dual-Athlon 1.2 GHz with 1 GB of memory. I have heard of systems that run at 450 MHz to be able to handle more ad views than this system is taking. I have the latest MySQL and PHP, all on Red Hat 7.1. This is the second ad software that has done this, so I don't think the problem is so much in the software, but something about my MySQL config or setup. Obviously the system should handle the load. At http://www.mysql.com/doc/ do a search for multiple processors. There's a refence to http://www.mysql.com/Downloads/Patches/linux-fork.patch that might help. Have a :) day! jb ob-filter-words: table sql database -- jim barchuk [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
Re: I am getting crazy!!!
Hi Martin! I have been trying to connect to mySQL for a couple of days now with no result! I try to log in via telnet..to my remote server..I get in the system but when I try to log in to the database, nothing!! I use this: mysql -h localhost -u futureenter -p it then asks for a password, I put it in and the return is: Access denied for user: 'futureenter@localhost' (Using password: YES) I also tried it with phpMyAdmin, but still the same thing! I have the right data for it..Do I have to stand in an certain location? If it is a remote server, 'localhost' is still good? Telnet should work fine. Localhost maybe should work, but not necessarily. Depends on how the host has your permissions installed in their server. Try -h domain.com, or just leave it out altogether. In fact try leaving the -u off, maybe your login name is enough. Only your host admin knows for sure. Ask if they have a FAQ page with the promise that if they do you'll never have to ask them another question again. LOL! Have a :) day! jb ob-filter-gunk: table database sql -- jim barchuk [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
Re: Field Naming Standards
H Jeremy! tblNews intpkNewsID intfkUsersID datPosted varSubject txtContent blnBoolean Wow, that's rather cluttered. I'd rather use a readable standard. Won't it be a bit strange when you run SHOW TABLES and you get a bunch things back all that being with tbl? So make them easier to read such as tbl_news and bln_boolean. Or shorten it a little with tb_news and tx_content. It's not as weird as you think. If you get back a column of stuff all prefixed with tbl_ your eye will simply slide over it and ignore it. The table that is returned -without- a tbl_, or the one with the thl_ typo will stand out like a sore thumb as an obvious error and maybe even help fix whatever problem you're troubleshooting. When you program, do you prefix every variable name with var? Every function name with func? Every macro with mac? Vars, no, because there are more of them than anyting else. The word that -doesn't- have a prefix is a var. :) But everything else, yes. Because even though it's clear in my head 'now' what I'm doing, I *know* that six months down the road when I look at it again I won't remember -anything!- LOL! Been there done that wy too many times to not plan ahead for brain-fade. Do the filenames on your computer all begin with file and folders fldr? No, because I have no files on my computer that aren't files, and I have no subdirectories that don't have a 'd' at the top of the line. :) But I don't have any perl scripts that aren't *.pl or SSI includes that aren't *.inc. The point of all this is to make it it easier to read -later-. A tbl_ is clearly a table and a b_ is clearly a boolean without having to think about it or 'remember' or look it up elsewhere. Such as 'I need to test this variable but is it a boolean or a text, now I gotta go find where it's defined.' Writing code is easy. Today. Troubleshooting an obscure error months later, or modifying things to add a new feature is -work-. :) A little up front efort -will- help further down the line. Have a :) day! -- jim barchuk [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
Re: MYSQL CLIENT
Hi June! How can i connect mysql client to the mysql server? Does mysql need to be installed on the client as well? Mysql -is- the client. Mysqld is the server. The client can talk to any server anywhere -if- it has appropriate permissions. You do not need to have mysqld installed locally to talk to a remote database. Have a :) day! jb -- jim barchuk [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
Re: What sites?
Hi Philip! On Thu, 18 Oct 2001, Philip Johannessen wrote: Im currently in a debate with someone who prefers PostgreSQL. He says that MySQL is unstable etc. Can you please give me examples of some well known sites built on MySQL so I can tell him that MySQL rocks? At http://www.mysql.com see 'User Stories' and 'MySQL survey,' and via the sitemap see 'Awards.' Of course it's unstable! Programs are by nature created by humans and therefore imperfect, and by definition 'a series of instructions that contain errors.' That ranges from the silicon right up to the UI, but they're working on it. :) Have a :) day! jb -- jim barchuk [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
Re: newbie can't connect error
Hello Daniel! I had mysql running fine on linux (redhat 7.1 ). Today I get this error: can't connect to local Mysql server through socket '/tmp/mysql.sock.' Shooting[trouble] tips: Does 'cat /etc/my.cnf |grep socket' confirm the path to the sock for both server and client? Should be yes if it was running before. Does 'ps -auxwww |grep mysqld' say something's running? Does 'mysqladmin -p status' confirm that the server running? Check the log for why the server may have stopped. In a pinch, restart the server. Usually works unless there's some more fundamental problem. Have a :) day! jb -- jim barchuk [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
Re: [OT] FAQ and Commercial Announcements
Hello All! would be cool. Or another moderated list that contains announcements for all things MySQL related. I would sign up for that 'though I think a web-site would be better. http://www.mysql.com/documentation/lists.html : [EMAIL PROTECTED] announce This is for announcement of new versions of MySQL and related programs. This is a low volume list all MySQL users should subscribe to. Have a :) day! jb -- jim barchuk [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
Re: Multiple field separators
Hi Charles! I have the following command: mysqlimport -d -c, --columns=DATE,TIME,MSG --fields-terminated-by=, --fields-enclosed-by=, dbase c:\file.txt This reads the following from a text file: 26 Sep 2001, 05:42:24 : Text message to be read. Carl's response was perfect end negated my need to reply :) except for one point. You are not SOL when it comes to '*nix-style' utils. For instance http://www.geocities.com/SiliconValley/Lakes/1401/txtfrmt.htm Browse google for more. Try to find 'plain command line' utilities rather than windows stuff to avoid silly win related formatting incompatibilities. Have a :) day! jb ob-filter-word: table -- jim barchuk [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
Re: Select Insert
Hi Ashwin! Is there any way to select insert at the same time? What I want to do http://www.mysql.com/doc/I/N/INSERT_SELECT.html there? Also, is there any way without me creating new tables with all its fields all the time to copy over the fields from certain tables to new tables? That is copy over its attributes, etc.? http://www.mysql.com/doc/C/R/CREATE_TABLE.html Have a :) day! jb -- jim barchuk [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
Re: RedHat 7.1 refuses to open mysqld]
HiHi! I upgraded from RedHat7.0 to 7.1. Now when I start safe_mysqld it says it starts mysql with databases from /var/lib/mysql, but it can't start completelety as it says it refers to /var/mysql/mysql.sock, which does not exist. Please help. /var/mys It's probably in /tmp, which you should change anyway. http://www.mysql.com/doc/P/r/Problems_with_mysql.sock.html Have a :) day! jb -- jim barchuk [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
Re: newbie Q : importing with accents
Hello Laurent and jeroen! I'm using mySQL/PHP on a macOSX machine and found myslf in trouble while trying to import data from our filemaker pro database. i've got the same problem with a french vocabulary database that I want to import into a mySql database. Has anyone seen http://www.mysql.com/doc/C/h/Character_sets.html ? Have a :) day! jb -- jim barchuk [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
Re: Question of a beginner
Hi Jacques! I'm working with a table that includes a field id INTEGER AUTO-INCREMENT NOT NULL . When I create a new record with the query INSERT, I don't give any value for the id field, the value is automatically given by mySQL. As the database is supposed to be used on the WEB, several queries INSERT can happen simultaneously. How can know the value of the id field corresponding to the record that has been created by MY INSERT query ? Before posting, please check: http://www.mysql.com/manual.php (the manual) 8.4.6.3 How Can I Get the Unique ID for the Last Inserted Row? http://www.mysql.com/doc/G/e/Getting_unique_ID.html Have a :) day! jb -- jim barchuk [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
Re: using test database
Hi Valerio! I am a novice using MySql. I would like to know if and what kind of problem may generate to using de test database of MySql engine (creating tables and data into test database, for example). No problem at all! That's the best way to start learning. Create a database to play with. Add some tables. Learn how to do queries and inserts. Create indices. All the good stuff. Here's a page that'll help get you off the ground: http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html You can't 'hurt' anything by fooling around with your own databases. Just don't touch the 'mysql' db unless you know -exactly- what you're doing. Have a :) day! jb -- jim barchuk [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
Re: Iist number of connections/users
Hello Raj! What is the command to list all the users connected to mysql server? Type mysqladmin with no parameters for command line help and a list of options. The one you need is processlist. Have a :) day! jb -- jim barchuk [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
Re: Corruption of MyISAM table when deleting/inserting ~7000 rows
Hello Tommy! We suspect that the problem is related to the fact that we delete ~7000 rows and inserts the same shortly thereafter. The mysql-manual mentions that you should run an optimize table after deleting many rows from a table, but doesn't list it as an requirement. If you're having an intermittent but serious problem I'd interpret 'should' to mean 'required' as a safety net. If you see any -patterns- logged regarding repairs then that'd be very useful to the developers. They can't improve the software without documentation or exact instructions about how to reproduce the problem themselves. Have a :) day! jb -- jim barchuk [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
Re: MySQL Update Logging ???
Preface #1: Hi MySQL Admin! There's an oddity at http://www.mysql.com/doc/. Entering my.cnf returns no hits. Entering cnf returns all relevant hits. Preface #2: Hi All! Folks, this is the *best* online documentation I have ever ever seen. You can save youself lotsa time waiting for replies here (if there's even gonna -be- a reply!) by checking there -first- and then if there's something you don't understand name the page and why you don't understand it. This is also one of the best user supported lists around but again only if someone else care to write something, and you can understand the answer. You can even add comments to the docs! I haven't tried it yet, it's a 'register by your email address' thing, but this is a -great- idea to build FAQs right into the docs. I'm impressed. I'm not a 'RTFM-you-wimdit-and-go-away' kinda guy. I answer questions -and- point to the relevant docs. You'll almost never see me ask a question because I read all the traffic here, look through the books, and search the docs and the net (google and groups.google) intensively before posting anywhere. It works 99.64% of the time. The ML search but is a PITA and that's a can of worms I don't care to open here. Seriously, the online docs are fantastic. In any case Hello Christopher! Actually yes (if I read the documentation correctly - I have not tried this). In MySql Manual section 4.10.5 Replication Options in my.cnf, I find: binlog-do-db=database_name Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned. (Example: binlog-do-db=some_database) Will ( Others): So what you are essentially saying is that I can use the my.cnf file to turn on my own options. That makes sense. Can anyone help me sort out what the my.cnf file would look like? That's wy to much to go into here generically. See http://www.mysql.com/doc/ and enter cnf. The first two hits contain all the gruesome details. In addition to binlog-do-db you'll probably also need to define log-bin to a path you have write permission. Jeremy posted simply 'No' but http://www.mysql.com/doc/O/p/Option_files.html says that ~/.my.cnf overrides previous cnf options. The server can override the user at the command line but only trying it can prove whether it works or not. Have a :) day! jb -- jim barchuk [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
Re: Unable to connect to mysql server from client
Hi Kishore! I have mysql installed on a Linux server, I am trying to connect to the server using mysql client for windows, I get the following error Host '192.121.2.115' is not allowed to connect to this MySQL server, any idea what permissions I need to change to be able to connect? http://www.mysql.com/doc/A/c/Access_denied.html Scroll about halfway down to see that -exact- error message. Have a :) day! jb -- jim barchuk [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
Re: Problem with MySQL 3.23.40 Install..Source Compiled
Hi Bob! I use Caldera Linux and have a 4 machine LAN. The Lan includes 3 Linux and 1 WinNT install. Now, no matter what I do safe_Mysqld continues to start version: 3.22.32-log .. This is more of a *nix question than a mysql question but whatever. :) I use redhat but the concepts are the same. Here are the steps I took to compile and install ver 3.23.40. to the same directory as ver. 3.22.32 which I hoped would be overwritten. I installed both versions to /usr/share/mysql.. .42 is 'current'. What got me started with learning this trick was when Apache used to change its -entire- directory structure every few minor releases. The answer is to define your own directory structure in a small shell script rather than on a command line. That way you don't have to fool with all your other support files such as rc.d just to upgrade someone else's software. My /root/bin/build.mysql-3.23.42 looks like this: cd /usr/local/src/mysql-3.23.42 ./configure \ --prefix=/home/mysql\ --with-mysqld-user=mysql\ --with-debug\ --bindir=/usr/local/sbin\ --sbindir=/usr/local/sbin (I do make, make test, make install, and restarting manually. You can add those lines if you like.) The point is to have the same Makefile for each release. (Now that I look at that I'm not sure why I set bindir and sbindir to the same place but that was at least a year ago that I started using this method.) In any case with each new release I create a new /root/bin/build.*, edit the cd line, and run it. That way I can keep previous source trees and build files for one or two releases. After restarting if anything screws up I can quickly cd to /usr/local/src/mysql-[previous release] and make install and restart and there's minimal downtime. It -is- a good idea, after each new build.[version], to run a line like diff Makefile ../[previous.version]/Makefile ...just to double check that -previous- configs are maintained and see what -new- options you might/should deal with. basedir=/usr/share/mysql/libexec bindir=/usr/share/mysql/bin pid_file=/var/lib/mysql/mysqld.pid Exactly. But rather than editing Makefile or configure.in and -forgetting- some detail once in a while it's easier to edit -your- script to maintain your directory structure. And I'm particularly lazy so I always take the easier route. :) Also I expected the prefix= switch in the ./configure to overwrite version 3.22.32..Instead it created a sub/sub directory like SO.. /usr/share/mysql/share/mysql Whats That Never seen it do anything like that. I have a lot of house cleaning to do... OK the trick is to clean out everything and have a fresh start. Run this command line: find /* |grep mysql /root/bin/remove.mysql (Or redirect to someplace that you're comfortable.) Edit that file and remove lines that relate to your current **DATABASE** and rc.d and such files. Add rm -f to the start of each line for each file that was found. Make -sure- you are not deleting your *database* tree! Change permissions to make that script executable. *Triple* check it *again* to make sure you don't delete anything you need. Yes, I keep using those !*stars*! to emphasise disabling the 'shoot self in foot' feature while the 'foot nailed to floor' option is still enabled. :) Actually, running a backup just before doing anything serious like this is a PGI. Run mysqladmin -p shutdown. Run that remove.mysql script and blip, your system is clean. Untar the source again and rebuild from a script to retain -your- directory structure and preferences. I also use similar techniques to 'convert' from the rpm system to a 'compiled' version of an application because redhat is often several months to a year to 'forever' behind in upgrades. HTH. Have a :) day! jb -- jim barchuk [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
Re: can't change to run as ...
Hello Chris! I can run safe_mysqld as user MySQL to start the mysql daemon. However, when I try to use safe_mysqld as user root, I get the message, Can't change to run as user 'MySQL'. Any hints much appreciated. Thanks in advance. From rc.local: su - mysql -c '/usr/local/sbin/safe_mysqld --log' Have a :) day! jb -- jim barchuk [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
Re: Can't delete from very fat table: ERROR 1030: Got error 22 fromtable handler
Hello root! Description: Can't delete from incredibly fat table. Synopsis: unable to delete table data, running out of disk space for it! Well, that pretty much wraps it up, doesn't it? This is a hardware problem, not a software problem. The software must read the old table and create and entirely new table -before- it deletes the old table. So it takes 10M - 1k of free drive space to delete 1k from the original table. Try deleteing a 'several months' worth of data at one shot as you mentioned. You can mysqldump the table and edit it manually and reload it but that still requires a lot of drive space. If you can dump the table, you can delete the real table and very likely have enough drive space to edit and reload but that takes a bit of faith, crossed fingers, and a few heart thumping moments. If you can dump the table but not edit it you can ftp it over to another machine that has enough drive space to edit it. Then ftp it back and reload it. (By coincidence my htdig froze up last night during the nightly update. I usually have about 500M free but forgot to clean up a few things yesterday and left only about 200M free. Gonna write a cron to log free space during that period to find out the the real limit is.) Have a :) day! jb -- jim barchuk [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
Re: intro mysql book
Hello All! Can someone recommend an intro MySQL book. I'm looking for a book with info on MySQL Yes, as others have said, the Paul Dubois book is -excellent.- Teach Yourself MySQL in 21 Days ...SAMS..by Maslakowski.. (Takes you from Ignorant to Working Project). Avoid it like the PLAGUE. A 'printed disaster'. I've been reading tech books for 25 years and have *never* before seen such a poor piece of work. Have I made my point? :) No? Read on! The sample perl is -wrong-. The scripts flat out -fail- -wc compilation. As printed it simply literally does not work. The CD does not match the book, and -both- are -wrong-. The sample HTML *was* literally copy/pasted from FrontPage (meta name=GENERATOR content=Microsoft FrontPage 4.0). Totally -filled- with font and width foolishness that takes twice as much printed space as necessary and that I had to -squint- through to figure out what was supposed to be going on. Other comments I sent to the author: (The HTML on the CD was, as gently as I can put it, fairly hysterical. :) The idea of a few lines of INPUT... TEXT... with no FORM /FORM tags just broke me up. :) But that was less important to me because I know enough about HTML to easily figure it out, and the book was far more correct in those aspects.) The more serious problems for the SQL-newbie start with Listing 21-2 on page 406, AddCustomer.pl. There is a 'my $dbh' line, and several 'do' lines. But a few lines down there are several '$dbi-do' lines. There is no 'my $dbh', and I don't know exactly what kind of line to add for that. Bear in mind that I'm reading that as a raw virgin newbie. I spent -hours- trying to figure out what I was doing wrong. At this point I -KNOW- I am reading untested software. Some errors I figured out, but the most -important- aspects of this script, the GRANTs, is totally uncommented, and I can't get it to run at all, just lots of lines of errors in the server logs that I won't bother including here. There is a line that says '# Create the user in the MySQL database', but there is no reference to -opening- the mysql.user database, that I 'think' should be there. I think that's where the my-dbi should be. Then there's the 'print Location:' line that references 'CustomerAdd.html' that as far as I cn see does not exist, and I can't quite guess what it's supposed to mean. That \nURI at the end of the line sure looks weird, not the way I've ever used Location. And this appears to be not the correct use of Location. The 'print Location' should be the -last- thing sent to the user, after which the script should end. The client will -not- receive anything sent after that. Yes, the line says literally (wrapped): print Location: http://CustomerAdd.html\nURI: http://CustomerAdd.html\n\n; ; There's a line on page 396, 'Quantity INT, NOT NULL,' clearly an error showing that this is untested. I seem to recall other minor errors but can't find any at a quick glance. No errata has ever been posted to samspublishing.com even though I was told a year ago that it'd ready 'in a few days.'. I will obviously never buy another Sams book either. Check the author's info at http://www.samspublishing.com/authors_sams.cfm. Not there? Oh. Biggest waste of $40 and hours or reading I ever spent in my life. Nuff said? To be fair, I did learn how to create a database, import some data, log in to the server, and do a few simple queries. But that's it. Have a :) day! jb -- jim barchuk [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