Bug: BINARY, NULL, and GROUP BY
Hours after I left this mailing list, I found a bug in 3.23.47. Since it's so easy to reproduce the bug here, I'll let this example speak for itself: CREATE TABLE t1 (txt varchar(10) default NULL); INSERT INTO t1 VALUES ('aaa'); INSERT INTO t1 VALUES (NULL); SELECT BINARY txt AS t FROM t1 GROUP BY t; On my Linux systems, and MySQL compiled with gcc 2.95.3, this invariably leads to a segfault. Removing the non-null row from t1 solves the problem, as does removing the row with null. Without BINARY everything works. I'm no longer on the list, so if you reply to this mail with comments or questions that you think I should read, please be sure to include my address. //Carl - 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: 4208 Golden Investment Opportunity 185261
[EMAIL PROTECTED] writes: OTC News Alerts' Last 3 Picks have gained 358%! Here is our next Hot Pick! That's it. I'm out of here too. //C - wonders what the list owner gets for letting the spam in. 10%? -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. mysql - 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: 'got file handler' error
Gokhan Yenikaya writes: I met 'got file handler' error while accessing the database. I couldn't repair the damage on the related file and I lost the damaged part. What could be the reason? Just about anything, I'd say. Are you using the latest version of MySQL? Was it MyISAM, InnoDB, or some other table type? You're not using the 2.2.14 Linux kernel, right? And ermm.. well, that's all I can thin of now, except.. you didn't run myisamchk on the table while mysqld was running. No... nobody does that. Except me, once, and it didn't do much good. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: apostrophe's in PHP MySQL
Sherwin Ang writes: another approach is using the str_replace() function, just replace the single quote ' with two single quotes '' and database inserts should be fine. Very funny. Let's say you're making this query: DELETE FROM t1 WHERE str_field = '$value' with your way of doing things, the user would just have to supply the value \' OR 1 to turn the query into DELETE FROM t1 WHERE str_field = '\'' OR 1 which would delete every single row in the table. If there weren't a good reason for addslashes() to exist, it probably wouldn't. //C - paranoid, but for good reasons -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: recovering (with keycache) MyISAM-table problem
[EMAIL PROTECTED] writes: Description: Found block with too small length at 1928; Skipped How-To-Repeat: There's no real point in sending bug reports that don't say anything about what's wrong or how to reproduce the error. That your table is corrupted could be because of a power outage, a user error, a hardware error, or because of some bug that has already been fixed (you're using a slighly outdated version of MySQL). If you get a newer version and see if you can repeat whatever actions caused the table to break, and then post information on what you did, it might be possible for someone here to see if it is indeed a bug. //C - mostly blaming himself if something crashes. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: command mysql -u $user without typing it ????
Matthew Darcy writes: If I want to connect to the database as root then I understand I must do mysql -u root -p Unless you're logged in as root, in which case mysql -p is enough. but I would like test1 2 and 3 to be able to type mysql and be either logged in as their unix username, ie test2 types mysql and connects to the database as test2 (mysql account) or at least be prompted for the password for test2. Unless you have a broken version of mysql, not specifying a username is equivalent to specifying -u `whoami`. If you want the users to be prompted for a password, try alias mysql=mysql -p //C - thinks that'll do it. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: command mysql -u $user without typing it ????
Matthew Darcy writes: I was aware of the user table as a standard table. I did a select on it and it all looked fine. Loads of Y's and % for host Yet this user still cannot connect. The only explaination is corruption. It sounds to me like you haven't removed the @localhost entry, but you want user@% to be matched when you connect from localhost. Could that be it? If so, section 4.2.8 is your (rather dull) friend. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 MAX makes MYSQL Crush (??)
Rezal writes: hello, i got a really long text to put in mysql n when i use longtext field, it isnt enuff Can u help me pls ?? thx in advance I'll do my best to decipher your message... you have something that's bigger than the maximum size of a LONGTEXT and you want to put in in the database? That doesn't make much sense. Why would you want to store more than 4 gigabytes per table row? And what sort of data is that anyway? Since you'll probably not have very many objects of that size, why not use the file system? //C - giving his screen a funny look -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 Question about working with datetime column
Brian Snopek writes: I'm fairly certain now() runs off system time...so you can adjust your system time on the server to reflect your time zone... The computer should know what timezone it's in. You can unset TZ before running safe_mysqld to get MySQL to run on UTC, but that is a kludge, really. The root of all problems is that MySQL uses local time instead of UTC, and that causes all sorts of annoying problems, especially when daylight savings time is toggled, or when doing replication, or when dealing with people from other timezones, or... you get my point. Until the MySQL team gains respect for timezone issues, we'll be stuck with a MySQL that can't distinguish UTC from local time, and we'll be forced to do all timezone calculations on the application side. The approach I'll be taking is to run MySQL with TZ set to local time, and allow local time t obe used where it's not critical, but compensate for TZ differences in the handling of sessions, job control, and everywhere else where time differences are involved. if thats not possibly, or not wanted, in place of now, you can use.. DATE_SUB(NOW(), INTERVAL 2 HOUR) Except that you'd have to extract the correct offset from your current local timezone. And of course you must know what TZ the server has. The number of hours might not be an integer, btw, but I'm pretty sure the number of seconds will. //C - earlier than usual -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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
About spam
[EMAIL PROTECTED] writes: HTML I'm getting seriously sick of the amount of spam on this list. I don't know what MySQL employee is responsible for managing this list, but assuming that there is such a person, could he/she _please_ do something about the problem? When every other list owner can figure out how to restrict posting to subscribers only, how hard can it be? As far as I have seen, it's quite rare with serious posts from non-subscribers, whereas the spam and empty bug reports arrive at a rate that's on the order of mails per day. //C - annoyed -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 Query time question
Greer, Darren (MED) writes: Correction on the query: SELECT count(*) as count FR OM userdata WHERE status = 'A'; Ah. That does make a difference. MySQL is of course forced to go through all of your data, counting the number of rows with status 'A'. I don't believe an index would do you much good, since it'd add so much to the size of the index file and slow down updates and inserts. Is there any way you could just store that number in another table, maybe? You'd have to update it every time you insert or update the big table, but if that's only done in a few places it should be doable. If that won't work, but it's not important with perfect accuracy, you could run that evil SELECT once a day or however often you like, and cache the result. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 Query time question
I didn't think/read far enough. One more attempt is due. Correction on the query: SELECT count(*) as count FR OM userdata WHERE status = 'A'; I didn't see that it was on that column you had an index, so forget I said 'of course'. Have you used EXPLAIN to figure out if the index is actually used in the query? If you haven't already, consider running an ANALYZE TABLE just so MySQL can get some idea of the distribution for the indexed columns. It might help the optimizer make a better decision if it's not already doing what's best. If the status column only has a few different values, an index will not be used because the overhead of using the index will be greater than the benefit. If this is the case, you'll be better off without the index, and you could consider one of the two options I rambled about in my previous mail. //C - sorry 'bout that. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: count(distinct
Ilic writes: SELECT count(distinct ip) FROM pole_voti It does'nt work. Why ? What's your MySQL version? Check the docs to see what version is required for count(distinct). I think it was added in 3.23.early, so it might be time to upgrade. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 Query time question
Greer, Darren (MED) writes: If I move the status to another table, and then wanted to get a count of everyone who is of status 'A', how would that be any quicker? Would I join the tables? Communication error - reattempting. I meant that if you want to get the count of the number of 'A's often, you could store that number (the count of the number of 'A's) in another table. There'd be no change to your existing table, but there'd be no need to look in it just to get the count. I really have no idea what types of queries you perform or how often, so I'm not really in a position to suggest anything. I just wanted to raise your awareness of the possibility of such a solution. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. mysql - 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: serious password problem
Robert A. Knop Jr. writes: ERROR 1045: Access denied for user: 'rknop@localhost' (Using password: YES) mysql select * from user where user='rknop'\G *** 1. row *** Host: % User: rknop localhost is a special value (meaning connection over unix socket rather than TCP/IP), and it's not matched by % in this case. You need to grant access to user@localhost as well. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. mysql - 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: serious password problem
Robert A. Knop Jr. writes: localhost is a special value (meaning connection over unix socket rather than TCP/IP), and it's not matched by % in this case. You need to grant access to user@localhost as well. (Is this in the manual? If so, I didn't find it. Heh, it turns out that I was wrong about what happens. The real reason you need to add localhost is the interaction between host and user in the mysql privilege system, and the defaults. On http://www.mysql.com/doc/A/c/Access_denied.html I found it in the paragraph that starts If you can't figure out. The page which discusses how things work is http://www.mysql.com/doc/C/o/Connection_access.html It's probably a good idea to remove the entry for ''@'localhost'. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 connection
naveed abdul writes: Can't connect to local Mysql server through socket '/var/run/mysql/mysql.sock' Along with that you get an error code which you should look up (using perror). Without knowing what the error is it's sort of hard to tell you what to do about it, but the most common problems seem to be that mysqld is not running or just plain old messed up file permissions. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Changing part of field
Greg Peretti writes: I have a database that has a emailaddress field. A large number of the entries are from home.com, Excite's ISP. Since Excite is out of business, Comcast is converting them all to comcast.net next month. Is there a simple way to change all home.coms to comcast.nets while retaining the front part of each email address in our database? A link to the pertinent section of the manual would be most helpful. String functions: http://www.mysql.com/doc/S/t/String_functions.html Something like this should work: UPDATE t1 SET email = CONCAT(SUBSTRING_INDEX(email, '@', 1), '@comcat.net') WHERE email LIKE '[EMAIL PROTECTED]' //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: UPDATE SQL statement
James Lowe writes: ERROR: Query failed (Unknown table 'disclosure' in where clause) Is it perhaps because it is an UPDATE? According to the manual, MySQL 4.1 will have multi-table updates. A while back Monty stated a target release date. I'm not quite sure about it, but I think it'll be Q2 2002. //C - forgets things -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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
STDDEV_POP
I noticed that STD() returns the sample standard deviation, which is the sensible thing for it to do. However, when working with data points sampled from a larger population (or a distribution), it's a bit of a hassle to type STD(x)*COUNT(x)/(COUNT(x)-1), and I noticed that Oracle has a function STDDEV_POP() which returns the population standard deviation, so I thought that maybe it'd be a good idea to implement this in MySQL as well. What do you think? //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Largest System
Phillip B. Bruce writes: Simple question. What is the largest hardware implementation that is know for mysql to run on? How well does mysql scale on large platform systems such as Sun E10k, HP Superdome as an example. I would suppose that the number of possible file descriptors and table locking would prevent MyISAM from scaling well with the number of tables (given that you have a fairly constant [number of table and amount of data] per CPU.) InnoDB ought to fare better. This is just speculation, but I, too, would be interested in seeing some real-life examples of MySQL running on high-end machines. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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's the behaviour of mysql when no room on filesystem for databases
Didier Brisebourg writes: It seems that INSERT is blocking my process when there is no more free space in the file system that contains my databases. Can anybody clarify this point, and tell me how to prevent this blocking point ? For info on full disks, see the manual: http://www.mysql.com/doc/F/u/Full_disk.html In general, if you don't want problems, don't let MySQL run out of space. Not inserting the data is hardly acceptable, so there's really not much MySQL can do except wait for the user to solve the problem. As administrator you should've been aware that the disk was about to get full before it actually did, and so you should've had time to make more room for the database. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Function in index
Kittiphum Worachat writes: Is it possible to use function such as year() in index key (like use subpart for string field that it work) Nope, you'll have to have a column with just the information that you wish to index (except in the case of strings, of course). Also, you yourself will have to make sure that the data in that column is what it's supposed to be (with respect to what's in the longer column). //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. mysql - 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: Very Urgent
SHAM SUNDAR writes: When i cannect from my java program i use to get error General Error: 22.Can u pls help in this.My mysql version is 3.23.46 perror 22 will tell you that error 22 is 'Invalid argument', but since you don't state what you're trying to do that is of little help. Maybe if you post excatly what you're doing and what goes wrong, someone with experience of JDBC (I would guess that that's what you're using) will be able to help you. Oh, and generally: Please use the subject line more wisely. Few people read all the mails on this list, and you risk having all the people who know the answer skip your mail just because they don't know what it's about. A subject like very urgent will, at least in me, trigger thoughts along the lines of So this person is in a hurry, which means he/she hasn't done any research or tried to solve the problem. And probably the problem description is something along the lines of 'it doesn't work'. Not that I haven't made the same mistake myself, but that's all the more reason for me to react, right? Finally, a reminder to everyone: If you have a problem, you should always consider buying a support contract from MySQL AB. Hell, even if you don't have a problem, consider buying one just to support them. After all, without the money they wouldn't be able to do as much developing as they do. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Very Urgent (sic)
Im's sending this to the list, since I got it in a private mail and I don't see myself as a substitute for the combined wisdom, knowledge, and willingness to help that is the MySQL mailing list. SHAM SUNDAR writes: I won't do sql operations using JDBC like insert,delete,select and update.When i create connection object it is throwing General argument. I am able to connect with the same username and password by mysql prompt.But not using JDBC with the same username and password.Can u pls help it is very urgent.If i give different password it is throwing authentication failed. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 Locking...
Shannon Kendrick writes: Does anyone know of a way to lock at the row level instead of table level using MySQL 3.23.46 Yep, use InnoDB instead of MyISAM tables. //C - person of few words. But surprisingly seldom. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: temporary table permissions?
Paul Chvostek writes: The only catch is ... it won't go in PHP. The code looks fine, and I suspect it's just a permission problem. Indeed it seems that you need to have CREATE to do that. There might be a good reason for it, but the only thing I can think of is disk usage. Do I *realy* need database CREATE permission on the db server even to create TEMPORARY tables? Or would I be ahead to simply slurp all the data into an array in PHP and sort it there? Well, I guess it depends on what you need to do. One possibility would be to have a database that you only use for temporary tables, and give the user CREATE on that. It's a pretty clean solution, except that it'd give you two rows in mysql.db instead of just one, and you'd have to use database.table[.column] when accessing it. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 help
Mattias Persson writes: I have two tables, one for the articles and one with orderrows. When I update the price in the article table i want to make a query to update the price in orderrows on all rows with a certain orderstatus. Can anyone please help me!!! From the manual: [...] new features of MySQL 4.1 [...] we will also include simpler additions, such as multi-table UPDATE statements. For now, you will have to consider doing it with one query per changed price (or whatever), or just normalize your data a bit more, so that you never store the same piece of information in two places. You could possibly use a INSERT...SELECT to a temp table, and then REPLACE from that, although you'll probably need to do table locking to avoid losing simultaneous updates to the table. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Locked out
David VanHorn writes: At 08:58 PM 12/16/01 -0700, Doug Thompson wrote: This should help: A.4.2 How to Reset a Forgotten Password http://www.mysql.com/doc/R/e/Resetting_permissions.html Works ok up through step 2. mysql -h localhost mysql gives me error 1045 again. Can't get in with mysqladmin either. What exactly are you doing and at what point does it fail? Could you post the contents of your terminal window after failing? //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Location of text file for loading data in to table
Inderpal Singh writes: When using the command: LOAD DATA LOCAL INFILE xxx.txt INTO TABLE [TABLE NAME]; where should the txt file be located? That's up to you to decide, but as _always_ when you do something to a file, you must give some sort of valid path (absolute or relative or whatever) //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 server not starting!
Dipali Chittar writes: InnoDB: Operating system error no 13 is a file operation perror 13 will tell you that it's a permission problem. Check your file permissions and ownership, as indicated by the installation notes. BTW, your time seems to be off by 12 hours. Unless I'm mistaken you're located in India or somewhere around there, and it's evening rather than early morning right now. //C - has a computer that drifted 23 minutes in a few weeks when ntpd was not running. Has anyone else noticed that setting the default rule to 'ignore' screws up the rules for all IPs? -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. MYSQL MYSQL MYSQL - I hate that bloody 'spam filter'. - 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: matching an option from SET list
Wiliam Stephens writes: My two columns are set up as follows: res_places SET('North','West','South') res_places_re SET('Aber','Cardiff','Bangor') And I'm currently using the following MySQL query: SELECT * FROM gd_records WHERE (res_places 3) AND (res_places_re 1); Which turns out very strange resutls. I saw you post this a while back, and at first I couldn't see anything wrong, but then I realized that you probably don't want to match 3 out of 4 values for the first set and every other for the second. That is, you're doing a bitwise AND (), when what you want is probably just a plain equality (=). //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Problems installing mysql-4.0-alpha on my Redhat
Nilesh Parmar writes: I get the following messages on the console. [1] 28102 $ starting mysql daemon with databases from /var/lib/mysql 011213 :16:56:43 mysqld ended I've not idea why do I get the message mysqld ended. Because it did. You'll have to look in the log file to find out why. Make sure you've taken all the steps necessary for installation, such as setting the right owner for the data directory and running mysql_install_db Error 2002: Can't connect to MySQL server through socket /var/lib/mysql/mysql.sock. Well, since the server fails to start that error is to be expected. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: connecting to mysql from different computer
[EMAIL PROTECTED] writes: More so will i need to open MySQL server on my local machine before running MySQL client to connect to the remote machine e.g. A client is a client and a server is a server. The point of separating the two is that you can then run the client somewhere and and the server elsewhere. So no, you do not need to have mysqld running locally to connect to a remote server. An decent analogy would be that you do not need to have a web server running to surf the web. I'd recommend you not to run anything that you do not need. Each additional server or daemon is a potential security hole. This is certainly true for mysqld, where the default privileges are very permissive. //C - pissed off at procter gamble for screwing up his shampoo. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: A News Group Perhaps.
Tony Buckley writes: I am not a great fan of Newsgroups - they get spammed too much and messages get lost or archived. Some ISPs carry them, some don't. All too hit and miss for a resource on which I rely and am very grateful for. I agree, but sadly enough the spam part is true for this list as well. I completely agree with whomever proposed to have this list modified to accept mails from subscribed people only, and to require that subscribed email addresses are valid. I'm sure it'd be possible to allow bug reports from people not on the list. As for people who post questions to the list without being subscribed, I think that they should either join and contribute to and/or learn from the discussion, or just buy a support contract instead. Something that would be really great is if someone would gather all relevant things that are being said on this list and make one huge FAQ out of it. Carsten's FAQ is good, but it's not as big as it could've been, had someone paid him to create it. Then again, if MySQL would pay someone to make a really good FAQ, they'd probably lose a lot of support contracts. Not that I believe them to be that greedy/cynical, but anyway. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: ADV: Dear Future Millionaire: (very OT in a way)
Etienne Marcotte writes: How come this passed the spam filter? Which word it had that was on the mandatory words list ? EEek! Noo... but that can't be.. or...? Is the whole thing about the MySQL database just a hoax to get people to subscribe to this list so that the people at MySQL can get rich by sending us spam? :-o //C - In insane conspiracy theory generation mode -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: unknown data base
josep writes: mysqlselect* from phpbook; No data base selected Hmm.. unless you typed that in rather than copied pasted, there's something really odd going on. Anyway, it looks like you're trying to select stuff from the table phpbook, but you haven't selected a database yet. Maybe you're intending to do a SHOW TABLES? Unknown database Just a hunch: Have you actually CREATEd the database? That is, have you done a CREATE DATABASE phpbook? Note that it's legal to grant permissions on databases that haven't been created yet. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Does Mysql Have TRIGGER ??????
Pragneshkumar Gandhi writes: Does Mysql Have TRIGGER ?? Calm down. There's no need to run around like a headless chicken (or whatever one does with 6 '?'s). It doesn't, and IMHO the manual is clear on this: The planned update language will be able to handle stored procedures. Our aim is to have stored procedures implemented in MySQL 4.1. We are also looking at triggers. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: ERROR 1006: please help
Jacob writes: mysql create database jake; ERROR 1006: Can't create database 'jake'. (errno: 13) mysql Can someone tell me what could be the cause of this I followed the instructions to a T to get it all setup but now its not working i do appreciate any help. That's premission denied. Check the permissions on the data dir. Maybe you did a chown -R ... * instead of chown -R ... . when you gave it to the user? //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Does Mysql Have TRIGGER ??????
Pragneshkumar Gandhi writes: It doesn't, and IMHO the manual is clear on this: The planned update language will be able to handle stored procedures. Our aim is to have stored procedures implemented in MySQL 4.1. We are also looking at triggers. Hi Carl Troein Sorry Boss LOL. Hey can u suggest me some alternate Not really... It depends on what you want to do, but generally if you want something to happen with MySQL you'll have to do it yourself. :-o Maybe someone else on this list has a suggestion. I suggest that you reply to the list rather than to me directly, since I'm likely not to notice that mails about MySQL aren't posted to the list. //C - just passed the his last bloody exam. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: ALTER TABLE error
Steve Osborne writes: ERROR 2000: Access denied for user: '@localhost' to database 'dbname' Can anyone give me some insight as to why I cannot do this? Do I require root privileges to do this (right now I am logged in as a user, as this remote server is an ISP)? What unix user you are is irrelevant. However, what MySQL user you are is not. You should read the chapters on privileges and security, and ask your ISP to do so too. You shouldn't be able to connect as the anonymous user. BTW, your clock is off by ~65 minutes. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 LIKE when I'm using Ukrainian
Andrew Kharchuk writes: I'm using ukrainian language filling the database. The next problem occured: when i'm using LIKE '$text' at the 'SELECT SQL statement with some 2 letters in ukrainian letters in $text, mysql server regard them as another letter (it make no distinction between them). Have you configured MySQL to use the correct charset? If not, have a look in the manual on how to do that. Oh, and October was 2 months ago. Please set your date to something closer to now. And you could install ntpd or something similar if you don't want to have to set the date and time manually. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Trouble with InnoDB: Error message file errmsg.sys doesn't have enough messages?
I don't think it's a version problem because the R PM was mysql-3.23.33-4 and the tarball is mysql-max -3.23.46-pc-linux-gnu-i686.tar.gz. 33 != 46 I'd be surprised if that's not the reason for the problems you're having, especially considering how much has changed since 3.22. //C - points to the section on line length in the netiquette FAQ. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: optimize for SELECTs on multiple large tables
Florin Andrei writes: SELECT tbl1.col1, tbl2.col2 FROM tbl1, tbl2 WHERE \ tbl1.col3 = tbl2.col4 AND tbl1.col5 = '123'; The problem is, MySQL-3.23.46 takes forever to return from SELECT (i let it run over night, in the morning i still didn't got any results, so i killed the query). What're the table structures (most importantly: what indices exist)? What does the data look like? What did EXPLAIN return? Anything else we should know? (that's a catch-all question from a sleepy and intoxicated person, in case you're wondering) //C - scratching his beard -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: queries on particular table produce errors
Alex Pukinskis writes: mysql ALTER TABLE 'group' RENAME groups; ERROR 1064: You have an error in your SQL syntax near ''group' RENAME groups' at line 1 It should be ` (backtick) rather than ' (apostrophe/single quote). This is explained i the manual section on table/column names if I'm not completely mistake (could very well be, tho). //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: mysqladmin reload not rebuilding GRANT information
Sinisa Milivojevic writes: We found that, if you alter the permission tables (user) /etc/hosts (so that it can do IP-address-to-hostname mapping for the hosts named in user) say mysqladmin reload, mysql doesn't pick up the changes - you have to shut it down totally restart it. mysqladmin reload only reloads info from MySQL privilege tables. Does this mean that mysqld keeps its own cache of hostnames, and that it never checks to see if it has gone stale? If so, one might have to shut down and restart the server at regular intervals (once an hour or whatever) if one relies on host names (maybe not a good idea unless you can control the DNS server and/or hosts file) for additional security. This, of course, assuming that the name-address mapping isn't absolutely constant, but it rarely is. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: mysqladmin reload not rebuilding GRANT information
Sinisa Milivojevic writes: Yes, that is so. But you do not have to restart MySQL. Just run: FLUSH HOSTS D'oh. I should've read the manual before posting. Sorry. To those who hasn't seen it already, I wish to point out that section 5.5.5 has some useful information about MySQL's host cache. The only thing that seems to be missing is some way to have entries live a fixed about of time, but since you can FLUSH HOSTS every now and then, or turn off the caching completely I don't think it's a real problem. //C - learning -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Size of table's MYD file?
Nissim Lugasy writes: Why is it that when I delete records from a table in the database, the size of the table's MYD file does not get smaller. It's still the original size. Do I have to flush the table to get the accurate size? OPTIMIZE TABLE is what you want. But doing it after each and every DELETE might be considered overkill, at least if you're not deleting a majority of the rows. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Comparing an alias ...
Julio Faerman writes: Hi ... I am need the following query to work : SELECT min(my_colum) as MINIMAL_VALUE WHERE MINIMAL_VALUE 10 The query is not EXACTLY as this one, but i think it is enough to get you the idea of my problem... What would this mean? The WHERE clause is what determines what rows will be used in the GROUP BY functions, e.g. MIN(). How do you know what rows to use when you need to know what rows to use before you can figure out the criteria for what rows to use? Trying to express in words what you wish to accomplish, I'd say that you want the smallest of all my_column such that this value is greater than ten. This would be equivalent to WHERE my_column 10, but if that's what you want I suppose you wouldn't be asking. Someone suggested HAVING, but as far as I can see using HAVING to accomplish MIN(column)constant is equivalent to WHERE columnconstant. //C - not wearing his glasses -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: linux, mysql and intel processor or amd processor
Barbara Ferrell writes: i am setting up a musql database on linux. if you had a choice which processor would you use. does it really matter. i keep reading that linux runs better with an intel processor. Who is claiming that? While it's true that the first and main platform for Linux is x86, I have seen nothing to support that it has better performance or stability on Intel's CPUs over AMD's. This of course assuming that you have no broken or flaky components. If you want to get maximal performance/price, I suggest that you head over to www.anandtech.com and read Anand's test of the 760 chipset, where he tests MySQL performance on several x86 systems. As with all benchmarks one should be careful when interpreting it, and keep in mind that new CPU models appear often. We recently invested in an x86 Linux system to be used as a MySQL/web server, and for about $2000 we got a dual AthlonMP @ 1.2GHz, 1GB RAM, 100GB IDE HD, and a nice-looking fulltower with lots of fans. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Changing the socket location?
Stephen P Toothman writes: I was wondering is there anyway to change the socket location from /tmp/mysql.sock to something else, other than recompiling :-)? If there is not I would like to highly recommend it as an option. Change it in the config file (my.cnf). It's right there. Just be sure to have all your clients properly configured too. And _please_ check your computer's date setting. Unless your mail was delayed by almost 2 weeks, it's off by that much. Some people like to sort their mail by date, and when the date is off by that much the mail ends up hundreds or even thousands of positions wrong in the list. //C - about to change to pine. Seriously. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: html ina text feild
Webmaster writes: I've set up a database with a text feild and want to call that information with html code embeded into the text( eg. br). Do I need to change the type of field ?. At the moment the html code is being returned as plain text. An HTML document is just a sequence of bytes, as is any other data that a computer handles. A TEXT field holds such a sequence and does absolutely no conversion of it. You're not giving a lot of information on what you're trying to do and what goes wrong, but most likely what you get out is exactly what you put in. Could it be that you've done some unwanted pre- or postprocessing of your data, such as escaping some HTML entities? //C - vague -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: html ina text feild
sherzodR writes: No, you don't have to change the type of field. If you want more HTML embedded, you could save those HTMLs together w/ the text in your database, or... if you just want the br / tags, then, assuming your text has a new line character (\n), you have to do some sort of substitution. Ah, the joys of communication. This was probably closer to what it was he wanted to know than my reply. In PHP, there's htmlentities() and nl2br() which are useful in various situation. Or... one could just allow users to type in any html and see what happens. :-o //C - doesn't trust users. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Security problem in Access database
Jack writes: 1. What should i do if i want to limit the user which can only edit the record belongs to him/her. i mean user can only update to his own record but not the others!! This sort of security is best handled at the application level. If you don't want your users to access the database directly, only relying on the database's user system is usually not a good and/or feasible solution. 2. Is there anyway that the PHP can pass the Windows Domain Username and password to Mysql's User table? Well, if you can get them from somewhere I'm sure it wouldn't be too hard to add users to MySQL. The question is just how you would get them. Even Windows doesn't store its passwords in plaintext, so you'd have to either a) obtain the passwords from elsewhere, in which case you could just as well get the usernames from elsewhere too, or b) crack the users' passswords, and if you can do that that easily you could just as well not use passwords at all. I guess the real solution would be to modify MySQL to use a Windows box to authenticate its users. I'm not sure what's been going on with Kerberos and stuff like that lately, but it ought to be possible to add this feature to MySQL. Unless you can pay someone to do it, I guess you'd have to do it yourself, though. 3.I had made a login page for the user, but when the user input the password which i assigned to her, it prompts incorrect password then later on i found out that the user table's password field had encryted . So what can i do if i want to make a login page to user which the password will be able to match the password in Mysql.User table. See 1. //C - hungry -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Yet another can't connect problem
Dennis Herndon writes: Ok, I have read through the manual and archives and still I cannot find this problem I'm having. can't connect to local MySql server through socket ' var/lib/mysql/mysql.sock' (2) Error code 2: No such file or directory Make sure the socket really there. Shouldn't it be /var/... and not var/... ? Oh, and unless your mail system had some sort of a problem, your date is off by almost exactly one day. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 to log to the database with password.
Nicolas BEAUMONT writes: I have problem to manage the users of my MySQL server. I connect to the database mysql as superuser and I try to create a new user on another database called PVE. I use : GRANT ALL PRIVILEGES ON PVE.* TO web@'%' IDENTIFIED BY 'PVEweb' WITH GRANT OPTION; The answer is : Query OK, 0 rows affected (0.00 sec) My first question is, is it normal to see 0 rows affected ? Yes. When I try to connect to the database as web, I can't use my password. [root@lipve php]# mysql -u web -p Enter password: ERROR 1045: Access denied for user: 'web@localhost' (Using password: YES) localhost is a special value not matched by wildcards. You need a separate row in the user table for web@localhost. It might also be wise not to allow access from every computer in the world, unless you have good reason to do so. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 into dumpfile
CRAUSAZ Yann writes: For a project in my school, I have to store files into a MySql DB, and to retrieve them to special locations. My problem is that I'm unable to write the files anywhere else than in (something like) /var/lib/mysql (the standard location of MySql). The error message is cannot create/write a file, even if I'm logged as root !!! Who you are logged in as is completely irrelevant, as the OUTFILE/ DUMPFILE file access is done entirely by mysqld and not by the client. Assuming that you have set up the FILE privilege in a safe and sensible way, you just need to consider the file system permissions. Make sure whatever file you try to dump to is really writable by whatever user mysqld runs as. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: affected rows and found rows
Ivano Luberti writes: I would know in what cases found rows and updated rows could be different: what i think is that if i get no error code the two number would be the same, but if the update fails (example key violation) the two number would be different. From the manual: If you set a column to the value it currently has, MySQL notices this and doesn't update it. UPDATE returns the number of rows that were actually changed. In MySQL Version 3.22 or later, the C API function mysql_info() returns the number of rows that were matched and updated and the number of warnings that occurred during the UPDATE. I believe this answers your question. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Is converting string to integer possible?
Jerry writes: Hi I have 2 text columns VARCHAR 50 and I put a date in them in format mmddhhmmss MySQL does have a DATETIME type, which would probably be better suited to your needs. Is there a way to force string to be read as interger (same as CINT in VBScript, but I need to to this in mySQL). Yes, string_expression+0 will be an integer. It's not pretty, but it works. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Is converting string to integer possible?
Sergei Golubchik writes: Is 14 number digit to much to use 14 digit number is ok - MySQL uses longlong internally and can handle up to 9223372036854775807. Of course, your platform should support it, but it, probably, does. That makes me wonder... what happens if longlong is not supported or is less than 64 bits wide? I have no experience of gcc on AmigaOS, but I would expect it to support longlong (heck, even SAS/C does as far as I can remember (don't quote me on that - although I own a copy of it I have hardly used it in a year or more)). On a side note to Jerry, I checked my uptime this morning, and my Amiga1200 has now been running for 59 days without a single reboot. I have yet to see windows do that. :-D And... oh my, it's freaking snowing outside. Aarrghhh! //C - doesn't like cold weather -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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
OT (was: Is converting string to integer possible?)
Jerry writes: How did you know I have an Amiga??? I know everything about everybody. I'm god. :-) Or actually, I just looked at the mail headers. But hey, you can still call me god if you want to. ;-D //C - more diabolic than divine -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. mysql - 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: Move a column
David Lidström writes: Hi! Is it not possible to move a mysql column to after another existing Column by using the CHANGE statement in ALTER TABLE? ALTER TABLE enum_test CHANGE ostron ostron int(4) NULL DEFAULT '0' AFTER newCol_2 Moving oysters around, eh? :-) As far as I know, there is no way to move columns around, although you can do it by dropping the column and recreating it in a different position. the workaround is to CREATE TABLE ... SELECT ... and then remove the old table and rename the new one. The only downside to this is that for a brief moment your table will not be there. Oh, and I suspect you'll get into all sorts of problems if you're using foreign keys. Generally, I avoid trying to move columns about, if only so that a dump of the structure won't be different without there being a real (i.e., significant) difference. Also, the order of the columns might have some archeological curiosity value. ;-) //C - listening to Iron Maiden while drinking tea. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: corrUPted tabLE questions...
Jim Ray, @WD writes: I have a tabel that seems to be corrupted. Is there a way to fix it? It is running on a Lynx box. Atari Lynx? Does MySQL really run on that? Or did you mean Linux? Hmm... Anyway, look in the manual. REPAIR TABLE is good place to start, as is myisamchk. And make sure that you don't repeat whatever you did to get the table corrupted. killall -9 mysqld is a BAD idea, as is messing with the table files when mysqld is running. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 on auto_increment
Alex Dowgailenko writes: If the colum is set to unique, it will fill in 2. If not, it'll automatically goto 4 (or vice versa if I'm mistaken). I knew that if record at the Largest number of index being delete, the number will be reused, but i have a question: what happen if i delete the record which the index number is between the largest and the smallest, let say i have 3 records within my table, by some reason, i got to delete the record in index 2 which is between 1 and 3, then will it leave a index gap between or it will move the record of index 3 up to index 2??? You're both wrong. You should test it, and see for yourselves that unless you're using the old and obsolete ISAM table format, auto_increment values are NEVER reused. This, of course, is true if the auto_increment is on the first part of an index, and you don't delete all rows in the table with a DELETE without a WHERE. //C sql -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: default values
Mark writes: When I do a describe statement, I see some default values assigned automatically to columns in the table. What statement will assign a column to blank, so that there is no default value assigned? Short answer: you can't. There was a long thread about this a week or two ago, and apparently the lack of default-free columns is due to some internal details, as well at to the paradigm of letting applications verify data instead of having the RDBMS do it. Note though that for strings, ENUMs and SETs you can specify a default of '', the special ENUM value '' and the empty set respectively. Also, columns that can be NULL can have a default of NULL. On an altogether unrelated matter: Your time zone is set to pacific time, but your time reveals that you're somewhere on the American east coast. You might want to correct your TZ. //C - defaults to being tired -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: GUI for OSX
Patrick Stroud writes: Is there a GUI for MySQL that runs on OSX? I don't know if there are any platform-dependent GUIs that have been ported, or if there is a Java GUI, but I do know that if you have a web server and PHP, you can use e.g. phpMyAdmin. I use it and I like it, but others might prefer other GUIs. //C - ponders pizza -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: width and height performance
florian writes: i have to store a dataset of 20 elements. the data is a int(1). i would have about 800 000 datasets. now the question is what performs better with mysql? is it better to have 800 000 rows with 21 columns or 160 000 000 rows with 3 columns? That's 16M rows, not 160M rows, and using INT(1) makes little sense when you can save 3 bytes per value by using TINYINT(1). Anyway, I don't think I can answer your question without knowing more about what you'll do with your data. If the 20 numbers in a set will be representing different things, it makes sense to have 20 columns to save space and time, but if you're going to e.g. search for all sets that have a member greater than x, it's a pain to handle. Normally, though, I think that having 20 columns is a better way to do it, if you're going to treat those 20 values as one set, which always has the same number of members (20). //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 connect via IP, but can via hostname
Alex writes: Yea, but even doesn't check grant tables I think, It just hangs up, waits about 30-40 seconds, and then says something like 'Error 3303: failed to connect (110)' (not sure about numbers, is there any way to find more detailed desription for 3303 error somewhere?) CT The error codes are somewhere in the source, as far as I know, CT but I haven't actually located them myself. 110 is a system CT error, 'Error code 110: Connection timed out'. I don't recall CT what you were trying to do, but did you enter the correct IP CT address, and if so is the route to that computer possibly blocked CT by some sort of firewall? I've tried the simplest way: mysql -h 127.0.0.1 it doesn't works :( First of all, let's take this back to the list so that someone else can figure out the answer and/or benefit from it. I have no idea what's wrong. Surely the loopback device (lo0) is up, right? Does your config say something about what post to use? When you try to connect, does netstat -a give you any useful information? //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: About huge numbers
Gyulay Gabor writes: Please let me know, how to handle huge numbers. I'll give you a suggestion or two, but first of all I must ask you to set your time to something more correct. If you're in the UK (or Portugal), your time is off by about 7 hours. If you're elsewhere, I guess your time zone setting is wrong. The problem is that I need to store numbers with lot more than 16 decimal digits - e.g. 1234567890123456789012345.12 I already tried a decimal type but it caused errors (I mean MySQL simply cutted the end of the numbers and stored only the first 16 digits :() The maximum range of DECIMAL and NUMERIC values is the same as for DOUBLE - I wonder how this fits with the exactness of DECIMAL, it being stored as a string and all. The reason is why we need this that there're several currencies (like italian lire) which requires this kind of precision. You must be dealing with incredible amounts of money. :-) One more question is how to transfer these values through the MySQL C api ? I have some suggestions on how to store your numbers. You want to go beyond 64 bits per number, so there's not much MySQL will be able to do with your numbers other than storing and comparing them. If you know that all numbers you'll be handling can be represented with no more than 36 decimal digits, you could use two BIGINT columns. This is rather messy, but it can be done and you'll be able to add and subtract two numbers fairly easily. Another way to store the numbers is in a BLOB big enough to hold any number that you might want to put there. Use this if your application really handles the numbers as radix 256 numbers (like for instance the big number routines in Numerical Recipes). Finally, if you handle numbers as strings, I can't see a better solution than storing the numbers as strings in the database. To be sure that comparison works, you'll want to either prefix numbers with a byte(or two) stating their number of digits, or pad them to the same length. What to do really depends on how big numbers you want to use. If you want really big numbers, I suggest that you consider adding support for them to MySQL. I'm sure that there are more people who would like to see MySQL capable of handling arbitrarily big numbers, although I can see how this would take lots and lots of work. How does your application handle such big numbers anyway? The highest floating point precision I'm aware of (under normal circumstances, that is) has onle 80 bits, and quite a few of those are used for the exponent. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Zip Code proximity search
Adam Nelson writes: [...] POWER(SIN(((z.dblLon-o.dblLon)*0.017453293)/2),2) $iRadius This runs rather slowly over the 76 thousand zip codes in the US. 2) Compute the max/min latitude/longitude and then query on that range (proximity becomes a square, but that's not a big deal) Does anyone have any recommendations (or a better query that doesn't have to use a function for every row). Since you have to within a square to be within the circle, you could restrict to the bounding box, and make sure that MySQL only runs that complicated expression for points within it. You'd need to index at least one of latitude and longitude. BTW, I don't want to spend time loooking at it, but... does your expression really work near the poles? //C - three-dimensional -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Timestamp allways zero zero
Olav Drageset writes: I cannot get timestamp to contain a time value different from zero. $tid = NOW(YY-MM-DD HH:MM:SS); $sql .= VALUES ('$domainName', '$payPerYear', '$nxtPayDay', '$tid', You're trying to INSERT the string constant 'NOW(YY-MM-DD HH:MM:SS)' which will be converted into the number 0. Lose the quotes, and the stuff between the parentheses. (NOW() doesn't take any arguments.) //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 get GRANT to work
KEVIN ZEMBOWER writes: mysql grant all on zope.* to zope identified by xxx; Query OK, 0 rows affected (0.00 sec) mysql select * from user where user=zope; | %| zope | 34577362486f3680 | N | N | N | N | N | N | N | N | N| N | N | N | N | N | My questions: 1. Why didn't this work? It did work. You granted all privileges on the database zope, but the privileges in the 'user' table are the _global_ privileges. Those are what you set with GRANT ... ON *.* ... To see the ones you set, have a look in the table 'db'. 2. If it had worked, would I have seen something other than zero records affected in response to the GRANT command? For some reason you always get a 0 back from GRANT. There's probably some internal reason for this. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: order by, group by
DL Neil writes: All keywords used must be given in exactly the order shown above. For example, a HAVING clause must come after any GROUP BY clause and before any ORDER BY clause. As far as I understood the original post, the question was if there's a way to get MySQL to perform an ORDER BY prior to doing the GROUP BY. In ANSI SQL this would be pointless, since you have to group by all returned fields that are not 'functions for use with group by'. In MySQL you can do something like SELECT a,b FROM table1 GROUP BY a to get the value of b for an arbitrary row for each a. This is mostly useful when you want a large number of columns returned and you know that whatever you're grouping by is unique, i.e. COUNT(*) would be 1 for every returned row. However, it would sometimes be useful to be able to extract the top value of something for each value of something else, _along with additional information about that top value_. For instance, you might want to know the top score for every week's quiz, and along with that the name of the best student. This would typically be done with a subselect, along the lines of SELECT date,score,name FROM quiz WHERE (date,score) IN (SELECT date,MAX(score) FROM quiz GROUP BY date) but this will give you more than one row per date if several people have the same score that day. I think what the poster was looking for was a way to do this with something like (and this is very broken): SELECT date,MAX(score),(name with score=MAX(score)) FROM quiz GROUP BY date which could be written as something like SELECT date,MAX(score),name FROM quiz ORDER BY score GROUP BY date ORDER BY date since you want to pick the name that matches the highest score. Unfortunately there is no way to do this in MySQL right now. You will have to first SELECT date,MAX(score) FROM quiz GROUP BY date and then loop over the result and SELECT name FROM quiz WHERE date=... ORDER BY SCORE DESC LIMIT 1 Once MySQL gets subselect you'll probably be able to do it like SELECT date,score,name FROM quiz WHERE (date,score) IN (SELECT date,MAX(score) FROM quiz GROUP BY date) GROUP BY date,score which would return an arbitrary person for each date's top score. I hope this makes sense and clears things up. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 connect via IP, but can via hostname
Gerald Clark writes: I notice you didn't have the time to look it up either. And neither did you. This is getting seriously silly. :-) To see the original question, look at the bottom (weird, I know) of this message. To see an answer, look here: http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html //C Rick Emery wrote: Help the guy out by telling him WHERE in the manual to look. Answers, such as Please read mysql manual, your question covered by manual. are of no help. Please read mysql manual, your question covered by manual. Check your users and db table at mysql database probably the problem comes from there My MySQL is not configured properly... I can connect using localhost with -h flag , but when I'm using IP instead of hostname it doesn't connects at all... -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 connect via IP, but can via hostname
Carl Troein writes: http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html Oops. That only convers the difference between 'localhost' and anything else. If whoever posted the question is interested in actually getting things to work, read the manual chapter on how the privilege system works, followed by the one on GRANT. A lot to read, but it's stuff that you ought to know when setting up MySQL. //C - ought to work more and mail less. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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
why ever use TINYBLOB/TEXT -- isn't VARCHAR same size? (fwd)
Carsten H. Pedersen writes: I assume that there is a small speed penalty in using TEXT/BLOB fields, as compared to VARCHARs. I recall seeing some test where TEXT was actually faster, but it might have been in some special situation. On the whole, I think that being able to specify a length for CHAR is the most important difference and the reason I use them for names of things (I use TINYTEXT/TEXT for longer descriptions etc.) //C - with a runny nose, a cup of tea, and a glass of Laphroaig mysql, database, bloody, filter, die, die, die. :-P -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 decrement int field?
Gil G. writes: I have a colomn with days_left, an integer. I have to write a Perl script to run on a cron job once a day and decrement all the fields in that column by 1. Is there a query to do this? I'll leave the the cron job and perl script to you, but decrementing something is done the same way as incrementing something, except that you use '-' instead of '+' (I'm not implying that you didn't know this. I merely found it a good way to introduce the next sentence): UPDATE foo SET bar = bar-1 Forhead-slapping is voluntary. :-D //C - shame on me for not working. :-P Paranoid filter-bait: sql, database, nostril-hair -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Any possibility for userstamp column type?
Sinisa Milivojevic writes: Rich Bartell writes: It occurred to me that a column type that functioned similar to timestamp but for the id of user initiating the update would be very useful. No, no plans. This feature is very easy to implement in the application program and there are not many users that have asked for it. This does not surprise me. The MySQL privilege system is generally not useful as a substitute for application-level user handling, just as the system's user handling (/etc/passwd etc.) would not be useful for MySQL. I can see how it might be useful to have a few different mysql users that one application switches between based on what application-level user is using the application, but that's about it. //C - expressing his $0.02 worth of thoughts. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Load Data with extra field
M. A. Alves writes: mysql database $!#$#%$ I know the feeling. :-P On Sun, 11 Nov 2001, Michael Conley wrote: . . . even though the text files that I am importing don't have the customer number of the person who submitted it, if I know the customer number . . . Where from do you get that information (costumer number) at import time? User input, I'd guess. Anyway, I'd like to add a third way to do it: Create a temporary table, load your data into that table, and then do a INPUT ... SELECT ... where you put that user-input value in the field list of the SELECT, e.g.: INSERT INTO foo (a,b) SELECT 10,b FROM tmptable //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: mysqladmin: error
[EMAIL PROTECTED] writes: mysqladmin: error while loading shared libraries: libgcc_s.so.1: cannot load shared object file: No such file or directory Make sure /usr/local/lib is in your /etc/ld.so.conf, and then run ldconfig. Another solution is to have LD_LIBRARY_PATH include that directory. Have a look at the man page for ldconfig or search the web for LD_LIBRARY_PATH if you want to know more about them. //C - learning -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: help with newbie (mis)understanding of related tables
mbb writes: When you design a couple of tables to be related to one another via keys do you have to manually enter in the key value from the other table? [...] so that I can relate the tables... when I'm entering data into Table2, do I have to enter in the corresponding value from Table1_ID? Is there a way to tell the database that those two fields are connected, and to just copy the info over??? Well, there's absolutely no way for the database to know to what row in table1 the row in table2 should be connected unless you tell it. Thus, you must tell it. It's only one little number after all, at least as long as you use some form of INT for your primary keys. //C - hopes everything is clearer than his sinuses -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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
GPL and MySQL (was: New fork of MySQL)
Paul DuBois writes: When you distribute a non-GPL application that ONLY works with the MySQL server and ships it with MySQL. This type of solution is actually considered to be linking even if it's done over a network. I believe that bit about even if it's done over the network was added sometime around last December. I'm not quite sure what to make of it, particularly in light of the paragraph from the GPL FAQ. Interesting. As the GPL FAQ points out, the interpretation of the GPL in cases like this would ultimately have to be tested in court. I have a feeling that that paragraph on the MySQL site is enough to tip the scales. At least it's enough to make anyone who chooses to bundle MySQL with a non-GPL application aware of the possible license violation that this constitutes. The workaround would of course be to include support for one more RDBMS, or to just not ship with MySQL. Thanks for pointing this out to me. This information may be useful to me in the future, as although I'd love to release it under the GPL, the project I'm working on involves two more people, and they don't seem to be so easy to convince. Specifically, their concern is what potential buyers will think of aquiring something that might be available to their customers for free. My counter-argument would be that if someone wants to pay us to incorporate it into a proprietary product, some sort of value has to be added, and that is what people will pay for. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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.Sock Missing
Warren C. Sherard III writes: #Starting mysqld daemon with databases from /usr/local/mysql/data 011104 mysqld ended You need to check the log file for error messages. The two most common reasons that people can't start mysqld are that they've forgotten to run mysql_install_db (or whatever it's called), and that they've forgotten to set the correct permission on mysql's data directory (which of course should be owned by whatever user mysqld is running as). mysql.sock is not a regular file. It's a unix socket, and thus it won't exist if mysqld isn't running. There's a chapter on this in the FAQ. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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
taiwan.com
It seems that once again a taiwan.com address has been subscribed to this mailing list. In case you haven't noticed, taiwan.com has a very broken mailer, which sends an error message to whoever posts anything on this list. Apart from this being annoying (especially since the date on taiwan.com's mail server is one day into the future), I have in the past received several spam mails from taiwan.com. I have no reason to believe that my address was not harvested from this list, so I think it would be in the interest of everyone here to have taiwan.com banned. Is this a reasonable request, or should I just ask the admin of my mail server to add a filter? //C database,sql,query,table -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Beginner SQL Question
John Morton writes: Can someone tell me why this will not work, please SELECT * FROM tbl1 WHERE column =(SELECT * FROM tbl2 WHERE intcolumn = 15); That's a subselect, and a search in the manual gave me this page, which probably has all the info you need: http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: 127.0.0.1 problem
Alex writes: Are there any obvious reasons why mysql -h localhost works and mysql -h 127.0.0.1 does not. Maybe not obvious, but a good reason nonetheless: The string 'localhost' has a special meaning to mysql: Connect locally using some platform-dependent means of IPC, such as unix sockets. It's special to the clients, but also to the privilege system. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Beginner question - getting last inserted ID
Anna Åhnberg writes: When I do an insert in one of these tables the primary key column gets a new ID. How do I get this ID? I guess I cannot use SELECT MAX(id) FROM Table since old, deleted id's are reused for new rows. Please, help me! I shall help you help yourself, for from that you will benefit in the long run, as will I. The manual has all the necessary information: http://www.mysql.com/doc/C/R/CREATE_TABLE.html http://www.mysql.com/doc/e/x/example-AUTO_INCREMENT.html The unofficial FAQ has a chapter on AUTO_INCREMENT: http://www.bitbybit.dk/mysqlfaq/faq.html#ch6_0_0 What you're looking for is probably LAST_INSERT_ID(), but I'll let you find it yourself. Oops, now I told you. :-P //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Beginner question - getting last inserted ID
Anna Åhnberg writes: Thanks, I actually already found the chapters but now I also now how to use the function too! Let me quote from the manual: LAST_INSERT_ID([expr]) Returns the last automatically generated value that was inserted into an AUTO_INCREMENT column. mysql select LAST_INSERT_ID(); - 195 Thus you'd follow these steps: 1) INSERT into the table, and leave out the auto column or supply a value of 0 or NULL 2) Verify that the query succeeded 3) SELECT LAST_INSERT_ID() 4) Get the result of the SELECT. On success, the SELECT will return one row with one value in it. That is the number you're interested in knowing. If you were using MySQL's C API there is a function that returns the ID without the need for steps 3-4, but since you are communicating over JDBC I don't think there's a simpler solution available. The query in step 3 is extremely fast, so it doesn't really matter, except that it's a bit more work to make an extra query. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: why index stops to work ?
wk writes: Could anybody explain why index stops to work in the query SELECT SUM(...) WHERE ... with encreasing the size of range, but continue to work in the analog query SELECT COUNT(*) WHERE ... ? Well, I can imagine that the optimizer chooses not to use the index for SUM() a lot sooner than from COUNT() since it will have to actually look at the values. Ideally, the time for a COUNT() WHERE value BETWEEN this AND that takes logarithmic time (log of the total number of rows in the table, that is), no matter how many rows are matched. SUM(), on the other hand, takes time proportional to the number of matched rows, and the overhead of using an index is something like a factor 2 or more of the time it takes to just use the data for the same number of rows. Thus if your WHERE matches more than a third of the rows, using the index is a bad idea. This is why it's pointless to index boolean columns, unless you have a very uneven distribution and run ANALYZE TABLE while you have such a distribution. Question to the list: Is the last part of what I said correct? //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: New fork of MySQL
Shankar Unni writes: What are the rules about bundling now? If we distribute a (standalone) copy of MySQL with our product, does that expose our product to the GPL? Or is it just like distributing a copy of Emacs with your OS? (I.e. as long as you make the source available, it doesn't automatically GPL the rest of your OS?) What if the product is designed to work with many databases, but we want to distribute MySQL only as a default database (i.e. it doesn't depend on MySQL for its functionality - it's merely a convenience)? Does that change the GPL liability on our product? Who can answer these questions? I believe the GPL FAQ tries to address these questions: http://www.gnu.org/licenses/gpl-faq.html#MereAggregation Specifically, this may be of interest to you: By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: New fork of MySQL
Wells, Kenneth L writes: I get the error 'Host 'emdtest.ncr.com' is not allowd to connect to this MySQL database server' whine First of all, I must ask you why you've posted this under a thread about forking off MySQL. This makes little sense to me. Secondly, since you just posted the same question, did you really have to post it again? /whine And finally, the answer you were waiting for: You haven't set up mysqld to accept connections from that host. You need to read the chapter in the manual about how to set up privileges using GRANT, and then turn your newfound knowledge into swift and merciless action. //C - always merciless, never swift. Or possibly the other way around. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 MySQL Install Question
Dan Tappin writes: I tried that but it came back with a 'mysqld is running already' error. /me silently curses the bad quoting habits that Lookout causes, but knows what the thread was about, and so _please disregard_ this sentence unless you know what I'm talking about. Now where was I? Oh, yes, good, the server is running. I think I know what's wrong. As I recall, you typed mysqladmin -uroot -p password, but then you will be prompted for the old password, and if there is already a password and you enter it, you'll get an error because of a missing argument. The correct thing to type is this: mysqladmin -uroot password=your new password If you're slightly (or more) paranoid and don't want the password to be shown to the rest of the users for a brief moment (and to be stored in your shell history), you could start the mysql client (mysql -uroot) and set the password from there, although it'll still be stored in your .mysqlhistory (or whatever it's called). The bottom line: I don't know of any way to be prompted for your new password. There should be some way to avoid having to enter it on the command line. Does anyone on this list know how? Side Question: How can I allow a SSH connection from a remote machine? You need to install some SSH daemon. I bet there is one or two to choose from on the Redhat CDs. Have a look at what RPMs are named something that starts with ssh or SSH or something like that. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Where UPDATE documentation?
Uriel Wittenberg writes: Carl, I appreciate your response, but I did check both the table of contents and the index. I did not do a string search on update, if that's what you had in mind. I admit that the search function is as good as one might wish. And I agree that finding things in the manual is not easy. There are some things that are hard to find even if you know that they're there, but I have no idea what to do about it. Multi-table updates and deletes are such fundamental features of SQL that it doesn't occur to new users like me that it could be unsupported. Indeed. It'll be a big day for MySQL when 4.1 is released (and stable). For now the only(?) workaround is to use locks, and that's horribly ugly, inefficient, and much work to do. Maybe we're all foolish and lazy, but maybe also it'd be smarter if the relevant doc section mentioned the lack of support. At least they could point out that the syntax given for a statement or function is exhaustive, and possibly the manual could be better at pointing out in what version different things were added (although this is mainly useful for 3.x versus 4.x, since upgrading to the latest stable version is something you're supposed to do anyway). //C - has 60 mails to read now for some reason. -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Help !!
Enquiries writes: Does anyone know of any EASY instructions on how to you MYSQL? The manual, the FAQ, and the book by Paul DuBois. I haven't read the book myself tho. I've forgotten the password to mysql and cannot understand how you actually reset it? I've read the documentation but does not make any sense. The manual is crystal clear on how to do it. Have you read the entire chapter 4 and appendix A.4? And please correct your date. It's off by a couple of days. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 source codes.
Kasture Baswaraj Mahaling writes: I Am M.S. student . i need to modify storage structure of mysql as part of my acadamic. pls. may i know related files. I don't comprehend what you're trying to say, but if you're looking for the source to MySQL, just download it from the web site. //C - thinks 20+ line .sigs should be illegal -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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 speed
Leon Noble writes: select dayofmonth(date) as mydate, count(num) as mycount from table_name where date='TO_DAYS(2001-08-01) - TO_DAYS(2001-08-31)' and action=1 group by dayofmonth(date); This query makes no sense at all. I don't think the date will ever be equal to that string constant, unless it's the special -00-00. Really, what you want to consider is all dates between 2001-08-01 and 2001-08-31, right? The why not use something like WHERE date BETWEEN '2001-08-01 AND '2001-08-31'? //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: Importing fixed-width delimited large text files?
Damned filter. Anything quoted once is my post. Grrr... database,sql,query,table Erica Douglass writes: I have a text file that is fixed-width delimited (that is, fields are delimited by certain column widths.) What is the workaround for this? Will importing large files work if I have tab-delimited rows? If so, what is the procedure to convert from fixed-width delimited to tab-delimited? Yep, there's no way to specify a format like that with LOAD DATA INFILE, but tab-separated files work like a charm. I'd probably use sed to convert the data. Here's an example of something that would do the job for 3-column data with 3 characters in the first column and 4 in the second. Note that it doesn't strip trailing spaces from the fields. sed s/^\(.\{3\}\)\(.\{4\}\)/\1\T\2T/\3 filename filename.tab Replace the letter T with tab. You might have to hit ctrl-v tab to get a tab in the shell. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: PHP4 and MySQL
Benj Arriola writes: Knowing PHP supports every database, why on the download page it mentions something about MySQL? And why use the words built-in. I was assuming MySQL came with it already. Normally you need to link with the mysql client libraries, but PHP provides a substitute for those. There are some warnings about using the builtin MySQL support, but as fas as I recall it's only a problem if you have both PHP3 and PHP4 as concurrent apache modules. I might be wrong on this tho. I guess to find out, I'll have to install it, but being far from the US and with small bandwith, downloading large files is not always ideal to do. :-) There are plenty of mirrors, but they're all pretty well-connected to each other, so I think they mostly exist to provide a primitive form of load balancing. :-P //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: rearranging id's
Ali writes: Hello, is there an easy way of rearranging id's in a table after deleting one or more entry/entries (other than creating a new tbl and dropping the old one). I appreciate any hint. Thank you. Drop the column and recreate it. It really is an incredibly dumb thing to do, but if having nicely consecutive values is more impostant than referential integrity, be my guest. :-) (If it's your only table I guess it doesn't matter, but who uses a relational database without relations?) //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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: rearranging id's
Jari Mäkelä writes: It is easier to have consequential data before starting to make the relations if you are forced to work on fixing up the follies/ages old tables of other people True, true. What I can't understand is why so many people insist on wanting to renumber things continously. Could it be that they're trying to store some information in a column whose only purpose should be to provide rows with unique identities? I've done similar things in the past, but it's really a bad idea to refer to things by some name or number that's not guaranteed never to change. And just think of the mess you get when you decide to change the type of a column that you've used as a foreign key. It's bad enough to have to choose between the four int types. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - 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