13: Can't get stat
Hi All, After migrating to a new server, I have problems importing *.csv files to the MySQL db. When I try to do LOAD DATA INFILE '/home/www/htdocs/helpdesk/systems/forms/users.csv' REPLACE INTO TABLE `empl_navtech` FIELDS TERMINATED BY ',' ENCLOSED BY '' I get the error: 13: Can't get stat of '/home/www/htdocs/helpdesk/systems/forms/users.csv' (Errcode: 2) Can somebody help me? I really don't know what this error is. I cannot find this error in the docs. Greetz, Micha Brans _ Chatten met je online vrienden via MSN Messenger. http://messenger.msn.nl/ - 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: 13: Can't get stat
On 10-Mar-2003 Micha Brans wrote: Hi All, After migrating to a new server, I have problems importing *.csv files to the MySQL db. When I try to do LOAD DATA INFILE '/home/www/htdocs/helpdesk/systems/forms/users.csv' REPLACE INTO TABLE `empl_navtech` FIELDS TERMINATED BY ',' ENCLOSED BY '' I get the error: 13: Can't get stat of '/home/www/htdocs/helpdesk/systems/forms/users.csv' (Errcode: 2) Can somebody help me? I really don't know what this error is. I cannot find this error in the docs. Greetz, localhost.dread$ perror 13 2 Error code 13: Permission denied Error code 2: No such file or directory localhost.dread$ Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Update query with Join
Dear all, Which records in tbl1 are to be updated are determined by an INNER JOIN with tbl2. I have tried the following: UPDATE tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id SET tbl1.col1 = 0; UPDATE tbl1, tbl2 SET tbl1.col1 = 0 WHERE tbl1.id = tbl2.id; UPDATE tbl1 SET tbl1.col1 = 0 INNER JOIN tbl2 ON tbl1.id = tbl2.id; But none of the above codes work. How to write this query?
Update query with Join
I use MySQL 3.23.
Re: mysql 4.0.11-gamma: TRUNCATE table bug
Hi, Now my problem is, a user with no privilege is able to run SQL command TRUNCATE table to empty any table! Thanks for the bug report. The bug has been entered into our bug database as bug #138: http://bugs.mysql.com/bug.php?id=138 This will be fixed in the next release, 4.0.12. Rgds, Indrek -- MySQL Users Conference and Expo: http://www.mysql.com/events/uc2003/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Indrek Siitan [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, The Support Guy /_/ /_/\_, /___/\___\_\___/ Uuemõisa, Haapsalu, Estonia ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL relational database or separate?
Hi, I'm very new to MySQL database design, and have been going through a lot of tutorials and such but haven't seen a good example of this yet. I am currently working on a database for an ebusiness which will need to have a database of products, customer information and so on. What would be the best coding practice for this? A relational database where products would have their own table (connected by a key like product ID to the customer table items ordered ID) or a separate database altogether? Is there a best coding practice for this that would be considered standard? And does anyone know of a good online example or tutorial for this kind of database? I would sure appreciate the help, thanks in advance. Barry - 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
Win32 MySql 4.0.11-gamma-max gebug
I tried to use MySql 4.0.11-gamma-max gebug on W2K. Mysql Service hang on delete from tbl_listdat; Do you want to get further information about this problem? I' m an experienced MySql user since years. I think this is a problem caused by a combination of the table structure and the content. When I have only a few records in the table it works fine. When I run a test with about 3000 records, this hang occurs. Regards Josef - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL XA status
Hi, What I want to do is to update a table in a database and at the same time post a message in a message queue. At the same time means in the same transaction : I must be able to commit both operations or rollback both operations. As far as I know, what I need is a transaction manager that communicates with a message queue resource manager and a database resource manager, the communication protocol being XA (?). My database is MySQL 3.23.x. I use InnoDB tables. My message queue is SunOne Message Queue 3.0 platform edition, which supports XA. The OS is Redhat 7.3. The development language is Java. Does MySQL support XA ? The Connector/J driver has a package for this, but a few googled news indicate it does not really work. I also read articles about TYREX and JBOSS, but nothing is really convincing. More generally speaking, how can I cope with my problem ? Thanks in advance for any help. Loïc QUERAN - 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 XA status
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Loïc QUERAN wrote: Hi, What I want to do is to update a table in a database and at the same time post a message in a message queue. At the same time means in the same transaction : I must be able to commit both operations or rollback both operations. As far as I know, what I need is a transaction manager that communicates with a message queue resource manager and a database resource manager, the communication protocol being XA (?). My database is MySQL 3.23.x. I use InnoDB tables. My message queue is SunOne Message Queue 3.0 platform edition, which supports XA. The OS is Redhat 7.3. The development language is Java. Does MySQL support XA ? The Connector/J driver has a package for this, but a few googled news indicate it does not really work. I also read articles about TYREX and JBOSS, but nothing is really convincing. More generally speaking, how can I cope with my problem ? Thanks in advance for any help. MySQL does not support XA. Connector/J's XA support was a wrapper to provide XA semantics, but not functionality. Tyrex and JBOSS have similar wrappers as well, but any of them can leave you with heuristic failures because MySQL doesn't support XA. XA is on the list of things that need to be done in the future, but it is not at the head of the list, because of other things like stored procedures, views and triggers must be done first due to market demand. -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+bI3+tvXNTca6JD8RAlNMAKCHvMMw6LIGcAnAJXRMDVHdRahw4ACgr/HD bKoHO0kyfasjFYW/tO23a8g= =NvGt -END PGP SIGNATURE- - 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: Altering table which has FOREIGN KEY constraints
On Saturday 08 March 2003 09:09, Heo Jungsu wrote: I have a question about altering table which has foreign key constraints. MySQL manual says that : In InnoDB versions 3.23.50 ALTER TABLE or CREATE INDEX should not be used in connection with tables which have foreign key constraints or which are referenced in foreign key constraints: .. (omitted) .. A CREATE INDEX statement is in MySQL processed as an ALTER TABLE, and these restrictions apply also to it. on http://www.mysql.com/doc/en/SEC457.html But, how abount InnoDB versions = 3.23.50? Version 4.0.11 still cannot alter referencing table and referenced table? It can and MySQL doesn't remove foreign key constraint. What's the safe query in below lits (MySQL 4.0.11) ? * alter referencing table * alter referenced table * create index on referencing table * create index on referenced table. They are all safe ... When I have used MySQL 4.0.10 If I alter referencing and referenced table several times, sometimes I could not execute a query on those tables even drop table (So I rebuilded entire InnoDB ;-( ) What do you mean could not execute a query on those tables? Could you be more detailed? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: Update query with Join
On Monday 10 March 2003 10:40, Hu Qinan wrote: Which records in tbl1 are to be updated are determined by an INNER JOIN with tbl2. I have tried the following: UPDATE tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id SET tbl1.col1 = 0; UPDATE tbl1, tbl2 SET tbl1.col1 = 0 WHERE tbl1.id = tbl2.id; UPDATE tbl1 SET tbl1.col1 = 0 INNER JOIN tbl2 ON tbl1.id = tbl2.id; But none of the above codes work. How to write this query? Multi-table updates are supported only since 4.0.4 -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: mysql auto-commit
On Sunday 09 March 2003 11:17, Kian Kok Lim wrote: Do you have a version of mysql that supports transaction, with auto-commit (rollback and commit) feature? From your manuals, it appears that there is a BDB version. How/Where can I access it? Transactions work on InnoDB and BDB tables. You can download Max package from: http://www.mysql.com/downloads/index.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: query cache hits not counted in Com_select
On Saturday 08 March 2003 23:38, John David Duncan wrote: In MySQL 4.0, query cache hits are counted in Qcache_hits, but not in Com_select. The documentation for Com_select implies that they should be there. Is this the intended behavior, or is it a bug? No, it's not a bug, but a known behaviour ;-) According the manual: Com_xxx Number of times each xxx command has been executed. But cached queries are not really executed, that is why counters are not incremented. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--- Username size limitations
hey dudes, i'd really need some insight on this. Does anyone have any idea about this ? TIA heya, I have a quick and painless (i hope :) )question.. Do you know how the username length is limited under MySQL. There is no mention of this in the manual or books. I figured the username length was dynamically limited by the length of the User field in the mysql.user table. But i have users with Username longer than 32 characters and those get an Access denied error. And, say the username is supercalifragilistixexpicalidocious (36 characters) it tells that user [EMAIL PROTECTED] can't login. I have then changed the user field length in the mysql.user table to 128. But still, can't login. I've looked into the code. First thing, the username is cropped at 32 characters in the error message itself. Indeed, in errmsg.txt, the access denied error format string is : Access denied for user: '[EMAIL PROTECTED]' to database '%-.64s' I haven't tried recompiling with a longer username string conversion, but if you guys tell me MySQL is not cropping the username before matching it against the privilege table, i will to be sure. I have looked at the user authentication code and haven't found anything that would seem to crop at 32 characters even though i have found a constant name USERNAME_LENGTH fixed at 16 characters..which would have been coherent if it was fixed at 32 .. so i don'treally know what to believe. Can anyone tell me exactly what happens ? Is mysql really hard limiting the username to 32 characters ? I don't think i have a hostname issue since from a same machine, another login with the exact same user privilege except the username length works.. If mysql crops the username, is there a patch against it ? If someone can point me where in the code this is handled i could do the patch myself, just need a hint as to where to find the stuff :) I have merely overlooked the code to find obvious proff mysql was doing this but didn't. any insight would be greatly appreciated. Thank guys -- Chand Speed is good but stability is god. (c) Joel, 2003 - 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
InnoDB Assertion Error
THE SITUATION: We're running MySQL 3.23.51. We have a table which has a primary-keyed field 'sid'. We have four tables what have foreign key references on that field. We deleted all rows from those four tables that had values in that foreign key index and then tried to delete the row in the main table. The main table delete failed with a parent row reference error. Fine, MySQL/InnoDB have gone through a few revisions and perhaps this bug is fixed. Certainly, running this old version isn't going to help us. THE PROBLEM: After downloading and compiling MySQL 3.23.55 (we use the compile flags from MySQL's web site, but we compiled our own), we switched our config over to the new compilation (same data, same config, etc. just a new binary) and started up. On a table scan (SHOW TABLE STATUS, `mysql` without -A, etc.), MySQL crashes with an assertion: 030307 21:08:02 mysqld restarted 030307 21:08:03 InnoDB: Started /usr/local/mysql-3.23.55/libexec/mysqld: ready for connections 030307 21:08:21 InnoDB: Assertion failure in thread 15 in file dict0load.c line 677 InnoDB: We intentionally generate a memory trap. InnoDB: Send a detailed bug report to [EMAIL PROTECTED] mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail key_buffer_size=33550336 record_buffer=131072 sort_buffer=16777208 max_used_connections=3 max_connections=500 threads_connected=4 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 4094456 K bytes of memory Hope that's ok, if not, decrease some variables in the equation 030307 21:08:21 mysqld restarted In the MySQL client it looks like this: mysql use tx; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Didn't find any fields in table 'task' Didn't find any fields in table 'taxbase' Didn't find any fields in table 'terms' Didn't find any fields in table 'ticket' Didn't find any fields in table 'ticket_master' Didn't find any fields in table 'ticket_perm_bits' Didn't find any fields in table 'traffic_service_history' Didn't find any fields in table 'uid' Database changed If it's reading the tables in order, it's having a problem with one of the following tables: CREATE TABLE sync_times ( system varchar(48) NOT NULL default '', host varchar(255) NOT NULL default '', tstamp datetime default NULL, PRIMARY KEY (system,host) ) TYPE=InnoDB; CREATE TABLE task ( task int(11) NOT NULL auto_increment, flags varchar(255) default NULL, depends int(11) default NULL, type varchar(40) default NULL, name varchar(100) default NULL, description text, department varchar(20) default NULL, owner varchar(20) default NULL, customer int(11) default NULL, contact int(11) default NULL, origin varchar(255) default NULL, status varchar(20) default NULL, assigned varchar(20) default NULL, entry_time datetime default NULL, due_time datetime default NULL, finish_time datetime default NULL, tstamp timestamp(14) NOT NULL, PRIMARY KEY (task), KEY _task_ (task), KEY _customer_ (customer), KEY _contact_ (contact), KEY _depends_ (depends), KEY _name_ (name), FOREIGN KEY (`depends`) REFERENCES `tx.task` (`task`), FOREIGN KEY (`customer`) REFERENCES `tx.customer` (`customer`), FOREIGN KEY (`contact`) REFERENCES `tx.contact` (`contact_id`) ) TYPE=InnoDB; Backing out to the old version works fine. The only glaringly obvious thing I see there is a table putting a foreign key onto itself, but that should be allowed, no? Thanks for any assistance. Philip * Philip Molter * Texas.net Internet * http://www.texas.net/ * [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Error linking mysqlclient
Getting the following errors when trying to link client application written in C: /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress': my_compress.o(.text+0xaa): undefined reference to `uncompress' /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc': my_compress.o(.text+0x13c): undefined reference to `compress' Any help to resolve this problem will be appreciated. /Lars SQL, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BDB Crash log sequence error. Please ANY HELP !!!!
Hi,... We work with MySQL 3.23.55 in a LINUX REDHAT Machine. It used to work fine with our BDB Tables,.. but now we got the following errors when we try to start the Database Server: ## 030310 15:09:08 mysqld started 030310 15:09:08 bdb: Log sequence error: page LSN 1:5242731; previous LSN 43 8057087 030310 15:09:08 bdb: Log sequence error: page LSN 1:5242791; previous LSN 43 8057147 . . . . . . 030310 15:09:13 bdb: ./srv_ictnet/FECHA_RESPUESTA_ANONIMA.db: close: 1 blocks left pinned 030310 15:09:13 bdb: ./srv_ictnet/REPORT_CSV_ASCII.db: close: 1 blocks left pinned 030310 15:09:13 bdb: ./srv_ictnet/REPORT_CSV_ASCII_NUMERICO.db: close: 1 blocks left pinned 030310 15:09:14 bdb: ./srv_ictnet/RESPUESTA.db: close: 1 blocks left pinned 030310 15:09:14 bdb: ./srv_stiga/CONTROL_ACCESO.db: close: 1 blocks left pinned 030310 15:09:16 bdb: ./srv_demo/APERTURA_ENCUESTA.db: close: 1 blocks left pinned 030310 15:09:27 bdb: ./srv_webrankdom/ITEM.db: close: 2 blocks left pinned 030310 15:09:27 Can't init databases 030310 15:09:27 mysqld ended # Can anybody helps? Any help would be very much appreciated,.. Best Regards,... Santiago LLobet - 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: clustering/scalability question
If you want to use DNS, that's the way to go. You can also use LVS to setup clusters of databases. http://www.linuxvirtualserver.org -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 6:05 PM To: John Masterson Cc: [EMAIL PROTECTED] Subject: Re: clustering/scalability question On Fri, Mar 07, 2003 at 04:56:54PM -0700, John Masterson wrote: Hello, We're a web hosting company currently hosting nearly 2000 MySQL databases (3.23.54) at around 200-300 queries/second. Amazing performance, really. But we're growing fast and planning for the next step. Our wishlist is short: We want to allow all our customers to have one set of instructions that says connect to db.modwest.com (as opposed to 'read from here, write to there', or 'connect to db2 if your domain name starts with M-Z'). Of course on the invisible backend, multiple servers would be servicing these requests. Tell them to connect to db.$their_domain.com and setup CNAMEs in DNS that point to their real server. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.8: up 32 days, processed 1,005,162,161 queries (357/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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: another Table another query coming soon
* Andrew Actually thinking about this in a bit more depth! I also have the infamous items table where individual company records are being stored. So is the best way to do this: i) add another field that will coreespond to the items.ItemsID or I don't know what you mean. ii) create another table town_ref What about City? In your previous post you said one City had multiple Towns...? CREATE TABLE town_ref ( town_id int(11) DEFAULT '' NOT NULL auto_increment, town varchar(255), PRIMARY KEY (town_id) ); and then another table: CREATE TABLE item_town ( id int(11) DEFAULT '' NOT NULL auto_increment, item_id int(11), town_id int(11), PRIMARY KEY (id) ); which will then involve adding another column to the items table :( Is this a question? Can a company (=one item record) be related to many towns? If soo, the above looks ok. I would probably drop the 'id' column, and make (item_id,town_id) a multiple-column primary key, and maybe also add a (town_id,item_id) key: URL: http://www.mysql.com/doc/en/Multiple-column_indexes.html HTH, -- Roger - 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
automatically incrementing an int value
Hi, First, the version: 3.23.49 If I have a table with two elements: name char(128), n int how do I have it so that n will increment each time? I take it that name needs to be a primary key. How do I get n to increment in vaue each time. This is not auto_increment. I want name to be in the table only once, but n to increase in value each time. 'name' might not be in there the first time, so I can't use an update and the insert option of 'on duplicate' is not available in this version of mysql. What would be the table definition recommended and what would be the syntax for a single line mysql statement to either create name the first time of increment it. This would be run from a shell scripts, ie: grep somepattern file|awk '{printf mysql statment;\n,$2}'|mysql mytable $2 in the awk is the 'name' field. Of course, the printf statement would be changed to use $2 and have n increment one. Please also note that several processes might be updating mytable at the same time and I want each one to increment the n value. Thanks, Cheers, Douglas - 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 linking mysqlclient
Found it myself... checking the documentation isn't such a bad idea... adding -lz did the trick. /Lars Getting the following errors when trying to link client application written in C: /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress': my_compress.o(.text+0xaa): undefined reference to `uncompress' /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc': my_compress.o(.text+0x13c): undefined reference to `compress' Any help to resolve this problem will be appreciated. /Lars SQL, query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: UPDATE fail with multiple tables (MyISAM)
On Friday 07 March 2003 17:52, gluk at php4 dot ru wrote: Description: UPDATE command fail with multiple myisam tables with error: ERROR 1142: update command denied to user: '[EMAIL PROTECTED]' for table '***' This situation occures only when non-root user make UPDATE and 'tables_priv' not empty (no matter what it contains). Seems, that mysql ignores 'db' ad read 'tables_priv' first. Thank you for bug report! This is a patch from Sinisa Milivojevic: = /mnt/work/mysql-4.0/sql/sql_parse.cc 1.296 vs edited = *** /tmp/sql_parse.cc-1.296-21842 Fri Mar 7 12:55:04 2003 --- edited//mnt/work/mysql-4.0/sql/sql_parse.cc Mon Mar 10 16:38:09 2003 *** *** 1840,1847 break; } case SQLCOM_UPDATE: ! if (check_access(thd,UPDATE_ACL,tables-db,tables-grant.privilege)) goto error; if (grant_option check_grant(thd,UPDATE_ACL,tables)) goto error; if (select_lex-item_list.elements != lex-value_list.elements) --- 1840,1853 break; } case SQLCOM_UPDATE: ! TABLE_LIST *table; ! if (check_db_used(thd,tables)) goto error; + for (table=tables ; table ; table=table-next) + { + if (check_access(thd,UPDATE_ACL,table-db,table-grant.privilege)) + goto error; + } if (grant_option check_grant(thd,UPDATE_ACL,tables)) goto error; if (select_lex-item_list.elements != lex-value_list.elements) -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: [PATCH] 1 line fix for gen_lex_hash.cc
On Sunday 09 March 2003 05:04, SUGIOKA Toshinobu wrote: I found obvious bug that causes segmentation fault while building on sh-linux. Please apply. Regards, SUGIOKA Toshinobu. --- mysql-3.23.54a.orig/sql/gen_lex_hash.cc Thu Dec 5 18:37:06 2002 +++ mysql-3.23.54a/sql/gen_lex_hash.cc Sun Mar 9 10:13:36 2003 @@ -274,7 +274,7 @@ function_plus,function_mod); int *prva= (int*) my_alloca(sizeof(int)*function_mod); - for (i=0 ; i = function_mod; i++) + for (i=0 ; i function_mod; i++) prva[i]= max_symbol; for (i=0;isize;i++) Thank you for the patch! Applied. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: automatically incrementing an int value
As I read the manual, the REPLACE command will do what you want. Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT NULL. Replace dos a delete-if-present, insert. The insert generates a new ID. See test below, and note two rows affected by second replace. mysql create table test (a int auto_increment not null, name tinytext not null, primary key (a), unique (name(100))) ; Query OK, 0 rows affected (0.02 sec) mysql replace into test values (null, hello) ; Query OK, 1 row affected (0.01 sec) mysql select * from test ; +---+---+ | a | name | +---+---+ | 1 | hello | +---+---+ 1 row in set (0.01 sec) mysql replace into test values (null, hello) ; Query OK, 2 rows affected (0.02 sec) mysql select * from test ; +---+---+ | a | name | +---+---+ | 2 | hello | +---+---+ 1 row in set (0.00 sec) |-+ | | Douglas B. | | | Jones | | | [EMAIL PROTECTED]| | || | | 10/03/2003 15:11 | | | Please respond to| | | douglas | | || |-+ --| | | | To: [EMAIL PROTECTED] | | cc: Douglas B Jones [EMAIL PROTECTED] | | Subject: automatically incrementing an int value | --| Hi, First, the version: 3.23.49 If I have a table with two elements: name char(128), n int how do I have it so that n will increment each time? I take it that name needs to be a primary key. How do I get n to increment in vaue each time. This is not auto_increment. I want name to be in the table only once, but n to increase in value each time. 'name' might not be in there the first time, so I can't use an update and the insert option of 'on duplicate' is not available in this version of mysql. What would be the table definition recommended and what would be the syntax for a single line mysql statement to either create name the first time of increment it. This would be run from a shell scripts, ie: grep somepattern file|awk '{printf mysql statment;\n,$2}'|mysql mytable $2 in the awk is the 'name' field. Of course, the printf statement would be changed to use $2 and have n increment one. Please also note that several processes might be updating mytable at the same time and I want each one to increment the n value. mysql.com/ (the list archive) - 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
date query.
Hi, The date field in my database table looks as below: 07th of March 2003 10:14:29 PM I need to write a query which gets me all the rows which are entered in last to weeks. Any ideas!! Thanks and Regards Anil. - 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: date query.
* Anil Garg The date field in my database table looks as below: 07th of March 2003 10:14:29 PM Then it is probably not a 'date field' in the sense that it is of type date, datetime or timestamp. I need to write a query which gets me all the rows which are entered in last to weeks. Any ideas!! Convert the existing column to a real date field, and use the powerfull builtin date time functions of mysql: SELECT * FROM table WHERE datecol NOW() - INTERVAL 14 DAY; URL: http://www.mysql.com/doc/en/Date_and_time_types.html URL: http://www.mysql.com/doc/en/DATETIME.html URL: http://www.mysql.com/doc/en/Date_and_time_functions.html -- Roger - 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
Bug ? : retrieving data from table being indexed - indexing neverstops
Indexing in MySQL. If while indexing a table I retrieve data from same table the indexing process seems to get stuck. Mytop keeps saying something about repairing keycache for days when the indexing shouldn't take more than a couple of hours. Can someone please explain! -- Torgny Rasmark [EMAIL PROTECTED] [EMAIL PROTECTED] Språkbanken, Göteborgs Universitet +46 31 773 45 43 - 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: automatically incrementing an int value
Hi, Great! This works, I did not use the 'null' and that is where I had a problem. One other questions: is this atomic? If I have several processes trying to do this at one time, will each one correctly update the table (assuming they have the same 'name' value. Also, in the part: unique (name(100)), what does the 100 do here? Is that saying the first 100 chars are considered unique? Thanks, Cheers, Douglas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 10:36 AM To: Douglas B Jones Cc: [EMAIL PROTECTED] Subject: Re: automatically incrementing an int value As I read the manual, the REPLACE command will do what you want. Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT NULL. Replace dos a delete-if-present, insert. The insert generates a new ID. See test below, and note two rows affected by second replace. mysql create table test (a int auto_increment not null, name tinytext not null, primary key (a), unique (name(100))) ; Query OK, 0 rows affected (0.02 sec) mysql replace into test values (null, hello) ; Query OK, 1 row affected (0.01 sec) mysql select * from test ; +---+---+ | a | name | +---+---+ | 1 | hello | +---+---+ 1 row in set (0.01 sec) mysql replace into test values (null, hello) ; Query OK, 2 rows affected (0.02 sec) mysql select * from test ; +---+---+ | a | name | +---+---+ | 2 | hello | +---+---+ 1 row in set (0.00 sec) |-+ | | Douglas B. | | | Jones | | | [EMAIL PROTECTED]| | || | | 10/03/2003 15:11 | | | Please respond to| | | douglas | | || |-+ - -- ---| | | | To: [EMAIL PROTECTED] | | cc: Douglas B Jones [EMAIL PROTECTED] | | Subject: automatically incrementing an int value | - -- ---| Hi, First, the version: 3.23.49 If I have a table with two elements: name char(128), n int how do I have it so that n will increment each time? I take it that name needs to be a primary key. How do I get n to increment in vaue each time. This is not auto_increment. I want name to be in the table only once, but n to increase in value each time. 'name' might not be in there the first time, so I can't use an update and the insert option of 'on duplicate' is not available in this version of mysql. What would be the table definition recommended and what would be the syntax for a single line mysql statement to either create name the first time of increment it. This would be run from a shell scripts, ie: grep somepattern file|awk '{printf mysql statment;\n,$2}'|mysql mytable $2 in the awk is the 'name' field. Of course, the printf statement would be changed to use $2 and have n increment one. Please also note that several processes might be updating mytable at the same time and I want each one to increment the n value. mysql.com/ (the list archive) - 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: automatically incrementing an int value
At 11:09 -0500 3/10/03, Douglas B. Jones wrote: Hi, Great! This works, I did not use the 'null' and that is where I had a problem. One other questions: is this atomic? If I have several processes trying to do this at one time, will each one correctly update the table (assuming they have the same 'name' value. Yes. Also, in the part: unique (name(100)), what does the 100 do here? Is that saying the first 100 chars are considered unique? Exactly. Thanks, Cheers, Douglas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 10:36 AM To: Douglas B Jones Cc: [EMAIL PROTECTED] Subject: Re: automatically incrementing an int value As I read the manual, the REPLACE command will do what you want. Make the name field UNIQUE, and the number field AUTO_INCREMENT NOT NULL. Replace dos a delete-if-present, insert. The insert generates a new ID. See test below, and note two rows affected by second replace. mysql create table test (a int auto_increment not null, name tinytext not null, primary key (a), unique (name(100))) ; Query OK, 0 rows affected (0.02 sec) mysql replace into test values (null, hello) ; Query OK, 1 row affected (0.01 sec) mysql select * from test ; +---+---+ | a | name | +---+---+ | 1 | hello | +---+---+ 1 row in set (0.01 sec) mysql replace into test values (null, hello) ; Query OK, 2 rows affected (0.02 sec) mysql select * from test ; +---+---+ | a | name | +---+---+ | 2 | hello | +---+---+ 1 row in set (0.00 sec) - 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: date query.
At 09:36 AM 3/10/2003, Anil Garg wrote: The date field in my database table looks as below: 07th of March 2003 10:14:29 PM Weird. All of my datetime variables look like '2003-03-07 22:14:29'. Are these fields datetime field types or are they text that looks like a date? If they are datetime, you can just do this: select * from mytable where (mydate = date_sub(now(), interval 14 day) and (mydate now()); This should get you all dates that are more recent than 14 days ago but are not in the future. I'm not 100% sure of the syntax though. Check out http://www.mysql.com/doc/en/Date_and_time_functions.html for more info. If that is just a string that looks like a date, I'm not sure what you can do using mysql alone. If you were using a scripting language like php or perl, you could do some pre-processing. Bob == Bob Ramsey Applications Development Support II ph: 1(319)335-9956 216 Boyd Law Building fax: 1(319)335-9019 University of Iowa College of Law mailto:[EMAIL PROTECTED]Iowa City, IA 52242-1113 For Hardware and Software questions, call 5-9124 == - 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: --- Username size limitations
At 14:35 +0100 3/10/03, Chand wrote: hey dudes, i'd really need some insight on this. Does anyone have any idea about this ? TIA heya, I have a quick and painless (i hope :) )question.. Do you know how the username length is limited under MySQL. There is no mention of this in the manual or books. I figured the username length was dynamically limited by the length of the User field in the mysql.user table. The length is described in the manual in this section: http://www.mysql.com/doc/en/Privileges.html It indicates that usernames are stored in a 16-character column. You can also issue a DESCRIBE mysql.user statement to find out. But i have users with Username longer than 32 characters and those get an Access denied error. And, say the username is supercalifragilistixexpicalidocious (36 characters) it tells that user [EMAIL PROTECTED] can't login. I have then changed the user field length in the mysql.user table to 128. But still, can't login. I've looked into the code. First thing, the username is cropped at 32 characters in the error message itself. Indeed, in errmsg.txt, the access denied error format string is : Access denied for user: '[EMAIL PROTECTED]' to database '%-.64s' I haven't tried recompiling with a longer username string conversion, but if you guys tell me MySQL is not cropping the username before matching it against the privilege table, i will to be sure. I have looked at the user authentication code and haven't found anything that would seem to crop at 32 characters even though i have found a constant name USERNAME_LENGTH fixed at 16 characters..which would have been coherent if it was fixed at 32 .. so i don'treally know what to believe. Can anyone tell me exactly what happens ? Is mysql really hard limiting the username to 32 characters ? I don't think i have a hostname issue since from a same machine, another login with the exact same user privilege except the username length works.. If mysql crops the username, is there a patch against it ? If someone can point me where in the code this is handled i could do the patch myself, just need a hint as to where to find the stuff :) I have merely overlooked the code to find obvious proff mysql was doing this but didn't. any insight would be greatly appreciated. Thank guys -- Chand - 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: date query.
Thanks..that helped. anil :) -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 10:52 AM To: [EMAIL PROTECTED] Cc: Anil Garg Subject: Re: date query. * Anil Garg The date field in my database table looks as below: 07th of March 2003 10:14:29 PM Then it is probably not a 'date field' in the sense that it is of type date, datetime or timestamp. I need to write a query which gets me all the rows which are entered in last to weeks. Any ideas!! Convert the existing column to a real date field, and use the powerfull builtin date time functions of mysql: SELECT * FROM table WHERE datecol NOW() - INTERVAL 14 DAY; URL: http://www.mysql.com/doc/en/Date_and_time_types.html URL: http://www.mysql.com/doc/en/DATETIME.html URL: http://www.mysql.com/doc/en/Date_and_time_functions.html -- Roger - 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
Colonel in Cuba with MySQL question
I inadvertantly deleted the colonel's question, which I believe concerned winmysqladmin. Please give us more info. You should be able to see your databse(s) under the database tab. David - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Using ssh tunnel and mysql
On Fri, Mar 07, 2003 at 05:43:29PM -0800, Jeremy Zawodny wrote: On Fri, Mar 07, 2003 at 05:37:38PM -0800, LZ Orders wrote: Hi. I wanted to connect from a client machine to a MySQL server using ssh. I execute the following on the local machine (the server is foo.bar.com): % ssh -n -N -L 3307:foo.bar.com:3306 foo.bar.com I then try to connect from the local machine with: % mysql -h localhost -p 3307 --user=me --password But after prompting me for my password, MySQL denies me access. What if you use 127.0.0.1 instead of localhost? Jeremy And what he's referring to is that the mysql client library will connect using the local socket if you say -h localhost, even though you specified a port. The port argument will be silently ignored. For some reason the developers consider this a feature. If you want to connect to localhost via TCP/IP, you have to specify the host by IP address (127.0.0.1), not as localhost. The developers pointed out to me (two years ago, when I submitted a patch to fix this bug) that what you'd really want to do is tunnel the *socket* from one machine to the other, not the port. If you tunnel the port, you have to be sure to block access to that port from the outside, because outside connections to that port (on the tunneling client) will be tunneled too (under Linux anyway; I didn't try it elsewhere). That's potentially dangerous and not completely obvious side-effect of tunneling SSH ports. SSH doesn't allow tunneling sockets unfortunately. --Pete - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Using ssh tunnel and mysql
At 11:24 -0600 3/10/03, Pete Harlan wrote: On Fri, Mar 07, 2003 at 05:43:29PM -0800, Jeremy Zawodny wrote: On Fri, Mar 07, 2003 at 05:37:38PM -0800, LZ Orders wrote: Hi. I wanted to connect from a client machine to a MySQL server using ssh. I execute the following on the local machine (the server is foo.bar.com): % ssh -n -N -L 3307:foo.bar.com:3306 foo.bar.com I then try to connect from the local machine with: % mysql -h localhost -p 3307 --user=me --password But after prompting me for my password, MySQL denies me access. What if you use 127.0.0.1 instead of localhost? Jeremy And what he's referring to is that the mysql client library will connect using the local socket if you say -h localhost, even though you specified a port. The port argument will be silently ignored. For some reason the developers consider this a feature. Whether it's a feature or not, it's not always so easy to figure out what to do. If you specify -h localhost, it can be argued that you really want the socket even if you specify the port. It can be argued conversely that if you specify the port, you should use TCP/IP even if you specify -h localhost. That is, if the user specifies both, it's ambiguous what the user really wants. If you want to connect to localhost via TCP/IP, you have to specify the host by IP address (127.0.0.1), not as localhost. The developers pointed out to me (two years ago, when I submitted a patch to fix this bug) that what you'd really want to do is tunnel the *socket* from one machine to the other, not the port. If you tunnel the port, you have to be sure to block access to that port from the outside, because outside connections to that port (on the tunneling client) will be tunneled too (under Linux anyway; I didn't try it elsewhere). That's potentially dangerous and not completely obvious side-effect of tunneling SSH ports. SSH doesn't allow tunneling sockets unfortunately. --Pete - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MyODBC: SQLBindParameter mix DATA_AT_EXEC with direct bound parameters
Hi all, I found a problem (bug?) when updating a blob column via MyODBC. The statement i run is like that: UPDATE blob_table SET blob_col = ? where id = ? when i do NOT bind the restriction as input parameter, but write it directly in the string, it works perfectly. but when i want to bind the restriction directly, the following happens: 1. I bind the blob_col with SQL_LEN_DATA_AT_EXEC(length) as indikator (SQLBindParameter returns SQL_SUCCESS) 2. I bind the id restriction directly to a program variable (SQLBindParameter returns SQL_SUCCESS) 3. I call SQLExecute, it returns SQL_NEED_DATA as expected. 4. I call SQLParamData to access the blob_col, it returns also SQL_NEED_DATA as expected. 5. I call several times SQLPutData to fill the blob_col, each returns with SQL_SUCCESS 6. I call SQLParamData to indicate that the blob_col is populated with data completely and would expect SQL_SUCCESS. Instead, SQL_NEED_DATA is returned and the returned pointer shows to the second parameter (which i bound NOT with DATA_AT_EXEC)! I browsed the ODBC documentation and found no restriction which forbids the mix of binding parameters directly and with data at execution time. Only restriction is on READING blob columns with SQLGetData, which cannot be mixed with bound output columns. So it seems to be a bug to me... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL - Chapter 1 - Newbie: Errcode:13 upon executing #mysql -p -u Me sampdb create_president.sql
I can't figure the solution: #mysql -p -u Me sampdb create_president.sql #Enter password: ERROR 1 at line 5; Can't create/write to file './sampdb/president.frm' (Errcode:13) Please help. - 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
Searching on indexed char field...
Does anyone know of a way to speed up seek time when selecting based on an indexed char field? I have a query that I'm executing ('select * from Table where UserName = myname') and it takes approximately 7 seconds to execute this 1000 times (UserName is char[50], and it is indexed). If I change the query to search on UserID, an indexed integer field, the same test runs in less than 1 second... Any help is appreciated... -- Jason H. West Software Engineer Softek Software International, Inc. 813 Pavilion Ct. McDonough, GA 30253 678-583-5718 [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL - Chapter 1 - Newbie: Errcode:13 upon executing #mysql-p -u Me sampdb create_president.sql
At 11:36 -0700 3/10/03, Mark Berkwitt wrote: I can't figure the solution: #mysql -p -u Me sampdb create_president.sql #Enter password: ERROR 1 at line 5; Can't create/write to file './sampdb/president.frm' (Errcode:13) Please help. % perror 1 13 Error code 1: Operation not permitted Error code 13: Permission denied Looks like perhaps the sampdb directory under the server's data directory isn't owned by the server. Make sure the directory ownership matches the account that you're using to run the server. - 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: Searching on indexed char field...
This may not be the solution you are looking for, but if you are executing ths query 1000 times, it must be in a program somewhere, so why not execute it once, pullout the UserID the run the rest on UserID? Hope this helps. Roger -Original Message- From: Jason West [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:40 PM To: [EMAIL PROTECTED] Subject: Searching on indexed char field... Does anyone know of a way to speed up seek time when selecting based on an indexed char field? I have a query that I'm executing ('select * from Table where UserName = myname') and it takes approximately 7 seconds to execute this 1000 times (UserName is char[50], and it is indexed). If I change the query to search on UserID, an indexed integer field, the same test runs in less than 1 second... Any help is appreciated... -- Jason H. West Software Engineer Softek Software International, Inc. 813 Pavilion Ct. McDonough, GA 30253 678-583-5718 [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Using ssh tunnel and mysql
Hi If you tunnel the port, you have to be sure to block access to that port from the outside, because outside connections to that port (on the tunneling client) will be tunneled too (under Linux anyway; I didn't try it elsewhere). That's potentially dangerous and not completely obvious side-effect of tunneling SSH ports. man ssh says : -g Allows remote hosts to connect to local forwarded ports. as long as you don't use the -g switch you should be perfectly save. not to mention even more save when you protect your server with iptables /firewall-script which everybody should do :-) Another topic : i was NOT able to set up a slave over a ssh connection although i specified 127.0.0.1 and port. show slave status said it was running, but binarylog-position was not increasing. if i specify the remote host it works without a flaw. Probably that is another hidden feature? yes, i tried localhost.localdomain as host for the replication. Errorlog was empty and Logs showed slave running. any other suggestions ? Sebastian the listmanager is paranoid so i have to write these here: sql,query,queries,smallint - 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: Searching on indexed char field...
At 13:39 -0500 3/10/03, Jason West wrote: Does anyone know of a way to speed up seek time when selecting based on an indexed char field? I have a query that I'm executing ('select * from Table where UserName = myname') and it takes approximately 7 seconds to execute this 1000 times (UserName is char[50], and it is indexed). If I change the query to search on UserID, an indexed integer field, the same test runs in less than 1 second... If you're indexing all 50 characters, index fewer of them. Any help is appreciated... -- Jason H. West Software Engineer Softek Software International, Inc. 813 Pavilion Ct. McDonough, GA 30253 678-583-5718 [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Searching on indexed char field...
sql, mysql... You might also try indexing only a portion of the char[50] index. index UserName(20), for example... David - 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: Searching on indexed char field...
sql, mysql... oops, forgot the quotes You might also try indexing only a portion of the char[50] index. index (UserName(20)), for example... David - 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: --- Username size limitations
On Mon, 10 Mar 2003 10:41:15 -0600 Paul DuBois [EMAIL PROTECTED] wrote: At 14:35 +0100 3/10/03, Chand wrote: hey dudes, i'd really need some insight on this. Does anyone have any idea about this ? TIA heya, I have a quick and painless (i hope :) )question.. Do you know how the username length is limited under MySQL. There is no mention of this in the manual or books. I figured the username length was dynamically limited by the length of the User field in the mysql.user table. The length is described in the manual in this section: http://www.mysql.com/doc/en/Privileges.html It indicates that usernames are stored in a 16-character column. You can also issue a DESCRIBE mysql.user statement to find out. heya, thanks for the answer although i know how to get that info. But that's not very accurate, for example i could do an alter table and make the User field be 80 characters. It still wouldn't change the fact that Mysql Hard limits in the code the Login size to 16 which in my mind seems pretty harsh. I've patched it roughly for my needs by defining USERNAME_LENGTH to 80 in include/mysql_com.h but it doesn't really fit me cause next time i'll upgrade mysql, I'll have to patch it again. Don't you guys see the disadvantage of hard limiting so badly the Daemon ? Is there any plan to change this in the future ? Just my 2 cents. -- Chand Speed is good but stability is god. (c) Joel, 2003 En réalité, nous sommes tous morts... Mais c'est camouflé par la vie (c) Lewis, 2002 - 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
configure modifies $srcdir for VPATH build
Description: Running configure in an empty build directory to perform a VPATH build of mysql, I noticed that configure created on temporary and one permanent file in $srcdir. This shouldn't happen: $srcdir should be treated as read-only (e.g. to support building from a read-only source partition, but also to avoid interference from several different instances of configure running in different build dirs with the same srcdir. The files in question are $srcdir/ac_available_languages_fragment (AVAILABLE_LANGUAGES_ERRORS_RULES in configure/configure.in) (transient) and strings/ctype_autoconf.c (permanent). How-To-Repeat: mkdir objdir cd objdir path to srcdir/configure Fix: It may suffice to replace $srcdir by $top_builddir for AVAILABLE_LANGUAGES_ERRORS_RULES. I'm not sure (and haven't tried yet) if a VPATH build would work if ctype_autoconf.c were created in $builddir. Submitter-Id: submitter ID Originator:Rainer Orth Organization: Faculty of Technology, Bielefeld University MySQL support: none Synopsis: configure modifies $srcdir for VPATH build Severity: non-critical Priority: low Category: mysql Class: sw-bug Release: mysql-3.23.55 (Source distribution) Environment: System: SunOS padouk 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-880 Architecture: sun4 Some paths: /vol/perl-5.8/bin/perl /vol/gnu/bin/make /vol/gnu/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /vol/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs Configured with: /vol/gnu/src/gcc/gcc-3.1/configure --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls Thread model: posix gcc version 3.1 Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /lib/libc.so.1 -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /usr/lib/libc.so.1 Configure command: ./configure '--prefix=/usr/local/mysql' '--enable-assembler' '--with-extra-charsets=complex' '--enable-thread-safe-client' '--with-innodb' '--with-berkeley-db' 'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXX=gcc' - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Using ssh tunnel and mysql
On Mon, Mar 10, 2003 at 11:32:06AM -0600, Paul DuBois wrote: Whether it's a feature or not, it's not always so easy to figure out what to do. If you specify -h localhost, it can be argued that you really want the socket even if you specify the port. It can be argued conversely that if you specify the port, you should use TCP/IP even if you specify -h localhost. That is, if the user specifies both, it's ambiguous what the user really wants. But localhost is a DNS name that only happens to resolve to 127.0.0.1. MySQL breaks this DNS abstraction by treating localhost as a keyword, different from 127.0.0.1, which goes against the principle of least surprise. (It confused me, anyway.) I think it would have been less confusing to treat localhost the same as its resolved IP address, and decide whether to use a local socket vs. a port number on the basis of a different argument (-l for local, perhaps, which would be the default when connecting to 127.0.0.1 (or localhost, or any other name that resolved to this IP)). Wild speculation: The current design was chosen back when MySQL didn't have different sections in /etc/my.cnf, so the port specification for the server was also used for the client. In that case the client usually read a port specification (in /etc/my.cnf), but in the common case the client wouldn't obey it, which typically did the right thing. (Now that there are separate [client] and [server] sections in my.cnf things are less jumbled.) The client could be made to obey a command-line argument, while still silently ignoring the my.cnf argument. (That's what my patch did.) It's not just the mysql client, it's the client library, which is what bit us. You specify a port in the DBI-connect() routine as something like ';host=localhost;port=2000' and it's silently ignored there too. I'm very glad that ssh no longer (as of three years ago!) forwards externally-connected-to ports by default. --Pete - 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
Creating a fixed length char field...
I have a question regarding fixed width char fields. How do you create them in MySQL? When I create a table and define a field MyField char[50], when I run the describe table, the field shows up as a varchar. Thanks, -- Jason H. West Software Engineer Softek Software International, Inc. 813 Pavilion Ct. McDonough, GA 30253 678-583-5718 [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Searching on indexed char field...
If you're indexing all 50 characters, index fewer of them. Not that I think you're wrong, but help me understand, please: It seems to me that this would cause the index creation to go faster, but the execution of the SELECT query to, if anything, go slower...? I'm probably wrong, though, but just wondered why. :) T Sql, 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: MySQL and email
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sheryl -- ...and then Sheryl Canter said... % % I have a big problem to solve on my site, and I'm not sure how to approach % it. I'm selling software that's distributed as trialware (will be--haven't Best of luck! :-) % launched yet). Users will be able to unlock the time-limited versions with a % license. I want to send the license to the user after her payment has been % received, but here's the rub: I'm not handling the payments myself. I'm No problem. How would you have handled it if you had anyway? :-) % using 2Checkout.com and possibly PayPal. 2Checkout will send me a confirming % email message when an order has been completed, but I don't want to have to % manually generate and mail out licenses. Right. % % There's been mention here about email somehow being redirected into a MySQL % database. I'm not sure how that works. Is there any way that I can somehow % redirect the 2Checkout.com notifications to my database and act on the event % of receiving this email? I don't know how else the process could possibly be % automated. Rather than trying to feed email directly to a script, just have your MDA deliver to a program. That program will be some script that catches and parses the email, sees what user just paid (and anything else it needs to capture), and then makes the call to the database so that your script does whatever you need to do to generate the license and update the DB and so on -- and then it should probably send the email to the user, too! % % Any ideas would be greatly appreciated. HTH HAND % % - Sheryl mysql query, :-D - -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE+bPKfGb7uCXufRwARAuC3AJ93DfAZp8HpElJ4Epr/I+IDjeomQwCgoR6H AzOjj6NYF+Ni2S1cRgwbw0w= =ZgOQ -END PGP SIGNATURE- - 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: Creating a fixed length char field...
If your create table statement has both char's and varchar's in it, then MySQL converts the char's all to varchar's. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Using ssh tunnel and mysql
on 3/10/03 9:24 AM, Pete Harlan at [EMAIL PROTECTED] wrote: If you want to connect to localhost via TCP/IP, you have to specify the host by IP address (127.0.0.1), not as localhost. Tried that, it doesn't work. In my case, I call ssh like this: ssh -n -N -L 3307:foo.bar.com:3306 foo.bar.com and mysql like this: mysql -h 127.0.0.1 --port=3307 --user=username The user username has complete access privileges, both from localhost and any other host. I would agree that if you specify -h, you *never* mean to use the local socket. That's potentially dangerous and not completely obvious side-effect of tunneling SSH ports. Yes, I'm aware of this, but thank you for pointing it out. -- Rick - 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
SQLFetch ODBC 3.5
According to the microsoft web site, SQLFetch should update the variable SQL_ATTR_ROWS_FETCHED_PTR with the number of rows fetched. A fairly simple change to results.c, line 657 if (stmt-stmt_options.rowsFetchedPtr) *stmt-stmt_options.rowsFetchedPtr= 1; fixes this. Thanks, Laramie - 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: Searching on indexed char field...
On Mon 2003-03-10 at 15:06:05 -0500, [EMAIL PROTECTED] wrote: If you're indexing all 50 characters, index fewer of them. Not that I think you're wrong, but help me understand, please: It seems to me that this would cause the index creation to go faster, but the execution of the SELECT query to, if anything, go slower...? I'm probably wrong, though, but just wondered why. :) A simple example of why it can be faster (can, not is) for selects is obvious, if you have a look at caches for a moment: If you have 10.000.000 rows and an index on a char[50], you have an index of about (50+4)*10.000.000 ~= 540MB. If you limit the index to 10 chars, you'll need 140MB. If you have 256MB, the one may fit into memory, the other may not and therefore requires additional disk reads. Another example would be regarding disk reads: MySQL reads always a whole block (1KB) from the index. With 14 bytes (plus some adminstrative overhead) far more index entries fit into one block than with 54 bytes. I.e. one disk read has a higher chance to fetch the index entry you need next and make the next disk read unnecessary. The situation is actually far more complex - I only wanted to show an example why the seemingly slower configuration can be faster: due to limited system resources, configurations which use available resources wisely can be faster. HTH, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Searching on indexed char field...
Benjamin Pflugmann wrote: If you have 256MB, the one may fit into memory, the other may not and therefore requires additional disk reads. Ah, see.. I hadn't thought of disk reads. I was thinking if you do a select on a char[50] and the whole field is indexed, wouldn't the search algorithm know exactly where to go to look for a match, as opposed to - if only the first 20 characters are indexed - finding all of the possible values that match the first 20 and then having to go through all of them looking for a match? It would seem like, from what I know of indexes, if the whole field is indexed, only one disk read should be necessary since it would go right to that row the first time. But I admittedly have never peeked inside the mySQL source code, so maybe it doesn't work that way...again not arguing, just looking for insight. Thanks, T SQL 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
VPATH build fails with in-tree Berkeley DB
Description: Performing a VPATH build inside an empty build directory fails to compile sql/mysqld.c since the generated db.h (which is created in $top_builddir/bdb/build_unix) isn't found: g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\/usr/local\ -DDATADIR=\/usr/local/var\ -DSHAREDIR=\/usr/local/share/mysql\ -DHAVE_CONFIG_H -I. -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql -I.. -I/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/../include -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/../regex -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql -I../include -I.. -I.-O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_CURSES_H -I/vol/mysql/obj/mysql-3.23.55-dist/include -DHAVE_RWLOCK_T -c -o mysqld.o `test -f /vol/mysql/src/mysql/dist/mysql-3.23.55/sql/mysqld.cc || echo '/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/'`/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/mysqld.cc In file included from /vol/mysql/src/mysql/dist/mysql-3.23.55/sql/mysqld.cc:26: /vol/mysql/src/mysql/dist/mysql-3.23.55/sql/ha_berkeley.h:24:16: db.h: No such file or directory As you can see, there's only a -I option pointing to /vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix (i.e. below $top_srcdir), but nothing to point at $top_builddir/bdb/build_unix. How-To-Repeat: mkdir objdir cd objdir path to srcdir/configure --with-berkeley-db make Fix: This can be worked around by adding the equivalent of $(top_builddir)/bdb/build_unix to the bdb_includes definition in config.status. Equivalent modifications need to be performed for bdb_libs and bdb_libs_with_path (where references to $srcdir are unnecessary/wrong since the library is only built in builddir). I haven't been easily able to find the correct fix for the maze of BDB related macros in acinclude.m4. === RCS file: RCS/config.status,v retrieving revision 1.1 diff -u -r1.1 config.status --- config.status 2003/03/10 19:34:36 1.1 +++ config.status 2003/03/10 20:22:46 @@ -607,9 +607,9 @@ s,@CHARSET_SRCS@,,;t t s,@CHARSET_OBJS@,,;t t s,@CHARSETS_NEED_SOURCE@, latin1,;t t -s,@bdb_includes@,-I/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix,;t t -s,@bdb_libs@,-L/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix -ldb,;t t -s,@bdb_libs_with_path@,/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix/libdb.a,;t t +s,@bdb_includes@,-I/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix -I/vol/mysql/obj/mysql-3.23.55-dist/bdb/build_unix,;t t +s,@bdb_libs@,-L/vol/mysql/obj/mysql-3.23.55-dist/bdb/build_unix -ldb,;t t +s,@bdb_libs_with_path@,/vol/mysql/obj/mysql-3.23.55/bdb/build_unix/libdb.a,;t t s,@innodb_includes@,,;t t s,@innodb_libs@,,;t t s,@innodb_system_libs@,,;t t Submitter-Id: net Originator:Rainer Orth Organization: Faculty of Technology, Bielefeld University MySQL support: none Synopsis: VPATH build fails with in-tree Berkeley DB Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.55 (Source distribution) Environment: System: SunOS padouk 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-880 Architecture: sun4 Some paths: /vol/perl-5.8/bin/perl /vol/gnu/bin/make /vol/gnu/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /vol/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs Configured with: /vol/gnu/src/gcc/gcc-3.1/configure --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls Thread model: posix gcc version 3.1 Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /lib/libc.so.1 -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /usr/lib/libc.so.1 Configure command: ./configure '--prefix=/usr/local/mysql' '--enable-assembler' '--with-extra-charsets=complex' '--enable-thread-safe-client' '--with-innodb' '--with-berkeley-db' 'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3
RE: Searching on indexed char field...
On 10 Mar 2003, at 16:31, Tab Alleman wrote: I was thinking if you do a select on a char[50] and the whole field is indexed, wouldn't the search algorithm know exactly where to go to look for a match, as opposed to - if only the first 20 characters are indexed - finding all of the possible values that match the first 20 and then having to go through all of them looking for a match? Certainly the distribution of data values would make a difference, but it would seem to be an unusual set of data that would have a huge number of names that matched in the first 20 characters but differed after that point. It would seem like, from what I know of indexes, if the whole field is indexed, only one disk read should be necessary since it would go right to that row the first time. I believe Benjamin was talking about the disk reads necessary to get the index, not to get the record itself. [Filter fodder: SQL] -- Keith C. Ivey [EMAIL PROTECTED] Tobacco Documents Online http://tobaccodocuments.org Phone 202-667-6653 - 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
problems with GRANT, user, databases
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, all -- I am having a bit of trouble with GRANT and users and database access. I would like to do two things: - - Given a system user 'junk' I would like to create a master user 'junk' that can have all permissions (including grant?) on all 'junk_*' databases so that he can create and manage his own databases - - Given a master user 'junk' I would like for that user to be able to create other users 'junkNN' or or 'junk-*' or whatever so that my good friend junk is not always acting as root. I have tried mysql grant all privileges on junk_* to [EMAIL PROTECTED] identified by 'junk'; ERROR 1064: You have an error in your SQL syntax near '* to [EMAIL PROTECTED] identified by 'junk'' at line 1 mysql grant all privileges on junk_.* to [EMAIL PROTECTED] identified by 'junk'; Query OK, 0 rows affected (0.24 sec) and so I guess the way to specify database matching is with pure regexp notation of '.*' for 'any character any number of times', and my tables now look like mysql select * from mysql.db where user = 'junk' ; | localhost | junk_ | junk | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | mysql select * from mysql.user where user = 'junk' ; | localhost | junk | 372b3ff6545565e4 | N | N | N | N | N | N | N | N | N| N | N | N | N | N | and I can even log in bash-2.05a$ mysql -ujunk -pjunk Welcome to the MySQL monitor. Commands end with ; or \g. but I can't create a database mysql create database junk_testing ; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'junk_testing' OK, I figure, I'll create the DB as root and then get to it as junk, and work around the problem later. But that doesn't work, either! bash-2.05a$ mysql -u droot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. mysql create database junk_test ; Query OK, 1 row affected (0.30 sec) mysql quit; Bye bash-2.05a$ mysql -ujunk -pjunk Welcome to the MySQL monitor. Commands end with ; or \g. mysql use junk_test ; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'junk_test' Maybe I have to re-grant, too. Grrr... bash-2.05a$ mysql -u droot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. mysql grant all privileges on junk_.* to junk ; Query OK, 0 rows affected (0.20 sec) mysql quit ; Bye bash-2.05a$ mysql -ujunk -pjunk Welcome to the MySQL monitor. Commands end with ; or \g. mysql use junk_test ; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'junk_test' mysql OK, now I'm just mad :-) Let's try granting to this specific database just to get things going. bash-2.05a$ mysql -u droot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. mysql grant all privileges on junk_test to junk ; ERROR 1046: No Database Selected mysql use mysql ; Database changed mysql grant all privileges on junk_test to junk ; Query OK, 0 rows affected (0.02 sec) mysql quit Bye bash-2.05a$ mysql -ujunk -pjunk Welcome to the MySQL monitor. Commands end with ; or \g. mysql use junk_test ; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'junk_test' mysql Not only am I a little confused about having had to use a database before I could grant privs, but it didn't work anyway! I give up. Hlp! :-) TIA HAND mysql query, :-D - -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE+bQdGGb7uCXufRwARArW+AKDZJ0t9ijYjx3MPK7vtZPjsVPcy3gCfZPlN voajSct6Bo9nYHBjh/Yip2o= =U/3l -END PGP SIGNATURE- - 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
configure flags not passed to innobase configure
Description: If configuring with --with-innobase and non-standard configure flags (like --enable-maintainer-mode), those flags are not passed to the configure run in the innobase subdirectory. Since the sub-configure is run with many variables in the environment (see innobase/config.status sub -recheck), it is hard to get those non-standard flags handled by re-running the sub-configure manually. The same problem seems to apply to the bdb sub-configure. How-To-Repeat: configure --with-innobase --enable-maintainer-mode The config.status etc. dependencies in the innobase sub-Makefiles are still disabled. Fix: Maybe pass (all?, or just a relevant subset) toplevel configure flags to the innobase sub-configure. Submitter-Id: net Originator:Rainer Orth Organization: Faculty of Technology, Bielefeld University MySQL support: none Synopsis: configure flags not passed to innobase configure Severity: non-critical Priority: low Category: mysql Class: sw-bug Release: mysql-3.23.55 (Source distribution) Environment: System: SunOS padouk 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-880 Architecture: sun4 Some paths: /vol/perl-5.8/bin/perl /vol/gnu/bin/make /vol/gnu/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /vol/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs Configured with: /vol/gnu/src/gcc/gcc-3.1/configure --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls Thread model: posix gcc version 3.1 Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /lib/libc.so.1 -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /usr/lib/libc.so.1 Configure command: ./configure '--prefix=/usr/local/mysql' '--enable-assembler' '--with-extra-charsets=complex' '--enable-thread-safe-client' '--with-innodb' '--with-berkeley-db' 'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXX=gcc' - 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
MIN(), MAX() not working with LEFT JOIN? Bug?
Hello I would asume that these two queries would give the same output? Am I wrong? Seems like the where part don't have any effect on the LEFT JOIN when it comes to MIN() and MAX(). SELECT count( plads_ordre.id ) as antal, MIN( forestilling.arrangement_id ) as min, MAX( forestilling.arrangement_id ) as max FROM plads_ordre INNER JOIN forestilling ON forestilling.id = plads_ordre.forestilling_id WHERE plads_ordre.ordre_id = '25408' Output: antal min max 1 18 18 SELECT count( plads_ordre.id ) as antal, MIN( forestilling.arrangement_id ) as min, MAX( forestilling.arrangement_id ) as max FROM plads_ordre LEFT JOIN forestilling ON forestilling.id = plads_ordre.forestilling_id WHERE plads_ordre.ordre_id = '25408' Output: antal min max 1 7 19 -- / morten There are only 10 types of people in the world: Those who understand binary, and those who don't - 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
Innodb
I have MySQL 3.23, running on Windows XP. I don't seem to be able to make my tables Innodb type. Is there something I should install, or some script I should configure. Looking on the MySQL site, I noticed there was a script I should run. I'm so inexperience with MySQL, I don't know what it meant by this. My ISP has MySQL 3.23, yet when I connect to their MySQL server, I am able to make Innodb tables, but not on my desktop. Paul Taylor [EMAIL PROTECTED] www.technocurve.co.uk The Complete Business Internet Solution... - 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
Connection error
Hi there - I'm truing to connect to a mysql server (redhat linux 8) with the mysqlcc GUI (through a SSH session), and for some reason when I try to connect I get the error: [localhost] ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Now I was reading that this would be because I used localhost as the host name and if that is the case, the system uses unix sockets... Is there a way to force it to use TCPip? d - 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 with GRANT, user, databases
why don't you try... mysql SHOW GRANTS for 'junk'@'localhost' just to see what has been granted at present? David - 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: Innodb
MySQL must be compiled with support for InnoDB, if yours wasn't, you wouldn't be able to use InnoDB tables. You can download a MySQL binary here: http://www.mysql.com/downloads/mysql-3.23.html According to the InnoDB quick start page (http://www.innodb.com/howtouse.html), you'll want MySQL-max: -- How to download a binary version of MySQL/InnoDB? For Unix, you should download one of the MySQL -Max binaries at this page. For Windows from this page. Use mysqld-max.exe on Win 95, 98, ME, and mysqld-max-nt.exe on Win NT and 2000. If you already have a recent version MySQL-3.23.4x installed in your computer, you can install the corresponding -Max version with the same version number 3.23.4x just by replacing the MySQL server executable mysqld by the corresponding executable from the -Max version. MySQL and MySQL -Max differ only in the server executable --- Hope this helps. Brian McCain Digital March Internet Marketing and Consulting - Original Message - From: Paul Taylor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 10, 2003 2:28 PM Subject: Innodb I have MySQL 3.23, running on Windows XP. I don't seem to be able to make my tables Innodb type. Is there something I should install, or some script I should configure. Looking on the MySQL site, I noticed there was a script I should run. I'm so inexperience with MySQL, I don't know what it meant by this. My ISP has MySQL 3.23, yet when I connect to their MySQL server, I am able to make Innodb tables, but not on my desktop. Paul Taylor [EMAIL PROTECTED] www.technocurve.co.uk The Complete Business Internet Solution... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Innodb
At 22:28 + 3/10/03, Paul Taylor wrote: I have MySQL 3.23, running on Windows XP. I don't seem to be able to make my tables Innodb type. Is there something I should install, or some script I should configure. Looking on the MySQL site, I noticed there was a script I should run. I'm so inexperience with MySQL, I don't know what it meant by this. My ISP has MySQL 3.23, yet when I connect to their MySQL server, I am able to make Innodb tables, but not on my desktop. Issue this query and see what the value of the have_innodb variable is: SHOW VARIABLES LIKE 'have%'; If it's NO, then your server doesn't have InnoDB and you need to use one that does support it. For a 3.23 distribution, you probably want to use a mysqld-max or mysqld-max-nt. Otherwise, you can update to MySQL 4, which includes InnoDB support by default. If the value is DISABLED, then your server supports InnoDB but was either started with the --skip-innodb option or (more likely) you don't have the necessary configuration directives in an option file that tell the server where to write the InnoDB tablespace. If your MySQL installation is at C:\mysql, try adding something like this to your C:\my.cnf file: [mysqld] innodb_data_file_path = ibdata1:10M 10M = 10 megabytes; vary as desired. The server then will create the ibdata1 tablespace file in your server's data directory. Paul Taylor [EMAIL PROTECTED] www.technocurve.co.uk The Complete Business Internet Solution... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Connection error
At 14:37 -0800 3/10/03, DuSTiN KRySaK wrote: Hi there - I'm truing to connect to a mysql server (redhat linux 8) with the mysqlcc GUI (through a SSH session), and for some reason when I try to connect I get the error: [localhost] ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Now I was reading that this would be because I used localhost as the host name and if that is the case, the system uses unix sockets... Is there a way to force it to use TCPip? Specify a hostname of 127.0.0.1 rather than localhost. - 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
VPATH build with innobase fails to link mysqld (sched_yield missing)
Description: Performing a VPATH build on Solaris 8/SPARC with innobase support and the previously reported VPATH build problem (no -I options for $srcdir) fixed by editing the generated innobase Makefiles adding -I$(srcdir)/../../include -I$(srcdir)/../include to INCLUDES proceeds, but fails to link mysqld: g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_CURSES_H -I/vol/mysql/obj/mysql-3.23.55-dist/include -DHAVE_RWLOCK_T -o mysqld sql_lex.o item.o item_sum.o item_buff.o item_func.o item_cmpfunc.o item_strfunc.o item_timefunc.o thr_malloc.o item_create.o field.o key.o sql_class.o sql_list.o net_serv.o violite.o net_pkg.o lock.o my_lock.o sql_string.o sql_manager.o sql_map.o mysqld.o password.o hash_filo.o hostname.o convert.o sql_parse.o sql_yacc.o sql_base.o table.o sql_select.o sql_insert.o sql_update.o sql_delete.o sql_do.o procedure.o item_uniq.o sql_test.o log.o log_event.o init.o derror.o sql_acl.o unireg.o time.o opt_range.o opt_sum.o opt_ft.o records.o filesort.o handler.o ha_heap.o ha_myisam.o ha_myisammrg.o ha_berkeley.o ha_innobase.o ha_gemini.o ha_isam.o ha_isammrg.o sql_db.o sql_table.o sql_rename.o sql_crypt.o sql_load.o mf_iocache.o field_conv.o sql_show.o sql_udf.o sql_analyse.o sql_cache.o slave.o sql_repl.o mini_client.o mini_client! _errors.o md5.o stacktrace.o -L/vol/mysql/obj/mysql-3.23.55-dist/bdb/build_unix -ldb ../innobase/usr/libusr.a ../innobase/odbc/libodbc.a ../innobase/srv/libsrv.a ../innobase/dict/libdict.a ../innobase/que/libque.a ../innobase/srv/libsrv.a ../innobase/ibuf/libibuf.a ../innobase/row/librow.a ../innobase/pars/libpars.a ../innobase/btr/libbtr.a ../innobase/trx/libtrx.a ../innobase/read/libread.a ../innobase/usr/libusr.a ../innobase/buf/libbuf.a ../innobase/ibuf/libibuf.a ../innobase/eval/libeval.a ../innobase/log/liblog.a ../innobase/fsp/libfsp.a ../innobase/fut/libfut.a ../innobase/fil/libfil.a ../innobase/lock/liblock.a ../innobase/mtr/libmtr.a ../innobase/page/libpage.a ../innobase/rem/librem.a ../innobase/thr/libthr.a ../innobase/com/libcom.a ../innobase/sync/libsync.a ../innobase/data/libdata.a ../innobase/mach/libmach.a ../innobase/ha/libha.a ../innobase/dyn/libdyn.a ../innobase/mem/libmem.a ../innobase/sync/libsync.a ../innobase/ut/libut.a ../innobase/os/libos.a ../innob! ase/ut/libut.a ../isam/libnisam.a ../merge/libmerge.a ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a ../strings/libmystrings.a -ldl -lpthread -lthread -lcrypt -lgen -lsocket -lnsl -lm -lpthread -lthread Undefined first referenced symbol in file sched_yield ../innobase/os/libos.a(os0thread.o) ld: fatal: Symbol referencing errors. No output written to mysqld This is confusing since the configure test for sched_yield correctly found that the function does not exist: checking for sched_yield... no Looking at the gcc -g3 -E output for os0thread.c, it turns out that HAVE_SCHED_YIELD is defined as 1 despite the configure test. The problem turns out to be that innobase/include/univ.h includes ../ib_config.h and the source distribution incorrectly contains an innobase/ib_config.h files (although it's a generated file and thus doesn't belong there). Besides, Solaris 2.5 and up provide a definition of sched_yield, but the function is defined in either -lposix4 or -lrt. So a correct test would find it for real. How-To-Repeat: mkdir objdir cd objdir path to srcdir/configure --with-innobase cd innobase perl -i.bak -p -e 's%INCLUDES = -I../../include -I../include%INCLUDES = -I../../include -I../include -I\$(srcdir)/../../include -I\$(srcdir)/../include%' `find . -name Makefile.in` cd .. make Fix: Remove innobase/ib_config.h in $srcdir, remove $builddir/innobase/os/os0thread.o and continue build. Submitter-Id: net Originator:Rainer Orth Organization: Faculty of Technology, Bielefeld University MySQL support: none Synopsis: VPATH build with innobase fails to link mysqld (sched_yield missing) Severity: non-critical Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.55 (Source distribution) Environment: System: SunOS padouk 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-880 Architecture: sun4 Some paths: /vol/perl-5.8/bin/perl /vol/gnu/bin/make /vol/gnu/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /vol/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs Configured with: /vol/gnu/src/gcc/gcc-3.1/configure --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls Thread model: posix gcc version 3.1 Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W
Re: problems with GRANT, user, databases
Hi! On Mon 2003-03-10 at 16:44:40 -0500, [EMAIL PROTECTED] wrote: [...] - Given a system user 'junk' I would like to create a master user 'junk' that can have all permissions (including grant?) on all 'junk_*' databases so that he can create and manage his own databases - Given a master user 'junk' I would like for that user to be able to create other users 'junkNN' or or 'junk-*' or whatever so that my good friend junk is not always acting as root. I have tried mysql grant all privileges on junk_* to [EMAIL PROTECTED] identified by 'junk'; ERROR 1064: You have an error in your SQL syntax near '* to [EMAIL PROTECTED] identified by 'junk'' at line 1 mysql grant all privileges on junk_.* to [EMAIL PROTECTED] identified by 'junk'; Query OK, 0 rows affected (0.24 sec) and so I guess the way to specify database matching is with pure regexp notation of '.*' for 'any character any number of times', No, it does not use REGEXPs at all. The second statement was interpreted as 'databasename_'.'*', i.e. '.' is the seperator between database name and table name. Here, '*' is not really a joker (although it has some of its effects), but simply a placeholder specific to the GRANT command. That means you have granted user junk access to all tables within the database 'junk_' (where '_' is a joker meaning any single char, like '.' in REGEXP). I am not sure from my mind whether SQL jokers ('%') work within GRANT, but if they do, the first statement should have looked something like that: GRANT ALL PRIVILEGES ON 'junk\\_%'.* TO [EMAIL PROTECTED] IDENTIFIED BY 'junk'; (maybe more or less backslashes needed) mysql select * from mysql.db where user = 'junk' ; | localhost | junk_ | junk | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | mysql select * from mysql.user where user = 'junk' ; | localhost | junk | 372b3ff6545565e4 | N | N | N | N | N | N | N | N | N| N | N | N | N | N | [...] but I can't create a database mysql create database junk_testing ; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'junk_testing' Aside from the name mismatch, creating databases is a global privilege, i.e. database privileges are not evaluated for a not-yet-existing database. Someone correct me, if I am wrong. bash-2.05a$ mysql -ujunk -pjunk Welcome to the MySQL monitor. Commands end with ; or \g. mysql use junk_test ; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'junk_test' Jupp, see above. Maybe I have to re-grant, too. Grrr... No, grants are evaluated when they are needed, not before. I.e. a database/table whatever has not to exist at GRANT-time for the privileges to work later. OK, now I'm just mad :-) Let's try granting to this specific database just to get things going. bash-2.05a$ mysql -u droot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. mysql grant all privileges on junk_test to junk ; ERROR 1046: No Database Selected mysql use mysql ; Database changed That should have got you thinking. :-) Of course, the grant command implicitly changes the mysql tables, but you don't have to use them in order to use GRANT. GRANT is an abstract, generic interace to whatever privilege system an RDBMS has. I bet the error you get is due to 'junk_test' having no database specifier (junk_test instead of junk_test.* and therefore MySQL is trying to use junk_test as table name with the default database currently used. I.e. I guess you just changed access rights for mysql.junk_test. Try to see what mysql.db contains now... mysql grant all privileges on junk_test to junk ; Query OK, 0 rows affected (0.02 sec) mysql quit Bye bash-2.05a$ mysql -ujunk -pjunk Welcome to the MySQL monitor. Commands end with ; or \g. mysql use junk_test ; ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 'junk_test' ... and it would explain that error perfectly. Btw, there is a nice tool, mysqlaccess, which tells you a bit about the privileges a user has. Not only am I a little confused about having had to use a database before Seems you were not confused enough to see. :-) I could grant privs, but it didn't work anyway! I give up. Hlp! :-) I hope the above hints get you going. Bye, Benjamin. -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
VPATH build fails with innobase
Description: Performing a VPATH build with innobase support included fails since the innobase headers in $(top_srcdir)/innobase/include are not found: gcc -DHAVE_CONFIG_H -I. -I/vol/mysql/src/mysql/dist/mysql-3.23.55/innobase/os -I.. -I../../include -I../include-DDBUG_OFF -O3 -DDBUG_OFF -DHAVE_CURSES_H -I/vol/mysql/obj/mysql-3.23.55-dist/include -DHAVE_RWLOCK_T -DDEBUG_OFF -c `test -f /vol/mysql/src/mysql/dist/mysql-3.23.55/innobase/os/os0proc.c || echo '/vol/mysql/src/mysql/dist/mysql-3.23.55/innobase/os/'`/vol/mysql/src/mysql/dist/mysql-3.23.55/innobase/os/os0proc.c /vol/mysql/src/mysql/dist/mysql-3.23.55/innobase/os/os0proc.c:10:21: os0proc.h: No such file or directory /vol/mysql/src/mysql/dist/mysql-3.23.55/innobase/os/os0proc.c:19:20: ut0mem.h: No such file or directory As you can see above, there is only a -I../include option (which points at $(top_builddir)/innobase/include), while the equivalent srcdir isn't searched at all. How-To-Repeat: mkdir objdir cd objdir path to srcdir/configure --with-innobase make Fix: It seems hard to fix this with only a source tarball: while the -I../../include -I../include options are present in innobase/os/Makefile.in, they only get there from the include ../include/Makefile.i statement in os/Makefile.am. Unfortunately, this Makefile.i is only available via bitkeeper. It should be sufficient to add -I$(srcdir)/../include there and rebuild the innobase Makefiles. Submitter-Id: net Originator:Rainer Orth Organization: Faculty of Technology, Bielefeld University MySQL support: none Synopsis: VPATH build fails with innobase Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.55 (Source distribution) Environment: System: SunOS padouk 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-880 Architecture: sun4 Some paths: /vol/perl-5.8/bin/perl /vol/gnu/bin/make /vol/gnu/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /vol/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs Configured with: /vol/gnu/src/gcc/gcc-3.1/configure --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls Thread model: posix gcc version 3.1 Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /lib/libc.so.1 -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /usr/lib/libc.so.1 Configure command: ./configure '--prefix=/usr/local/mysql' '--enable-assembler' '--with-extra-charsets=complex' '--enable-thread-safe-client' '--with-innodb' '--with-berkeley-db' 'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXX=gcc' - 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
Stumped by 1130
Well, I'm on the verge of giving up on connecting to the MySQL server externally. I've updated the Host fields in the User and Db tables to be %, but I still get error 1130 when I connect, and the user name isn't transmitted. The manager of the database (it isn't mine) claims PHPmyAdmin (which he made the changes with) will automatically do a flush-privileges. Is this true? Can anyone try it themselves? mysql -h cosmicsoft.net -u cosmicsoft_net2 -D cosmicsoft_net Adam - 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
Finding corresponding table name when using Union
Hi! When using the Union statement in MySQL, is it possible to retrieve the corresponding table name for a given row? I know I can create a column in each table that describes which table the row actually is being retrieved from, but I am looking for a more intelligent solution. Thanks! :-) Best regards, Richard Taubo - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL Shutdown FAILED
I have just upgraded from MySQL 3.23.32 to 3.23.55 on my RedHat 8 server. Everything is working fine except that I get FAILED for MySQL when shutting down. I have not changed any settings at all. And the FAILED message does not seem to affect anything with MySQL operations. How do I go abt checking what is causing the message? Someone pls help! Thanx. -Karen - 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
Off topic help, SSL and form posts
I have run into a problem where data is truncated when sending to MySql via a SSL connection, I can not determine whether this is my server or just the protocol, I hope the later, as I know web* 4, which is what I am using will never get it fixed. Anyone with php and apache running SSL, would you mind creating a simple html form textarea and trying to post more than 4000 or so bytes of data to either a database or just echo the data back, I nice test would be to see about 10k of data go through. Of course, if someone knows already this is a SSL issue and just is how it is, let me know, thanks. Robotic foo Mysql query - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Fax: 313.557.5052 [EMAIL PROTECTED]Novato, CA U.S.A. - 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
HELP: Problem with MySQL column aliases
I hope I've subscribed to the right list. I am using version 3.23.41 of MySQL, and I'm having a problem getting correct (expected?) behavior with column aliases. I have a database A which has, among other things, an id field, something like this: CREATE TABLE a { somedata VARCHAR(10), id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY }; I have a second table which records ratings of entries in the first: CREATE TABLE b { id INT UNSIGNED NOT NULL, userid INT UNSIGNED NOT NULL, plus TINYINT DEFAULT NULL, minus TINYINT DEFAULT NULL, PRIMARY KEY (id, userid) }; There are reasons why I want to track the positive and negative votes separately. Anyhow, here is a query that works and gives me the information I want: SELECT somedata, a.id, COUNT(plus) AS pl, COUNT(minus) AS mi, COUNT(plus)-COUNT(minus) AS rating FROM a LEFT OUTER JOIN b ON (a.id=b.id) GROUP BY a.id ORDER BY rating; This works fine, but it seems to me that having COUNT(plus) twice and COUNT(minus) twice may not be noticed and optimized by the database. My original query was this: SELECT somedata, a.id, COUNT(plus) AS pl, COUNT(minus) AS mi, FROM a LEFT OUTER JOIN b ON (a.id=b.id) GROUP BY a.id ORDER BY (pl-mi); From that, I get the following error: ERROR 1054: Unknown column 'pl' in 'order clause' Now, before, when I used to have only 'pl' and no 'mi', it worked great. I could use 'ORDER BY pl', and it would just work. Why can't I use '(pl-mi)'? Next, I tried this query instead: SELECT somedata, a.id, COUNT(plus) AS pl, COUNT(minus) AS mi, (pl-mi) AS rating FROM a LEFT OUTER JOIN b ON (a.id=b.id) GROUP BY a.id ORDER BY rating; From that, I get this error: ERROR 1054: Unknown column 'pl' in 'field list' So my questions are: - Is it going to be wasteful of time to have COUNT(plus) and COUNT(minus) twice? - Why can I use the alias in an ORDER BY clause by itself but not in an expression? - Why can't I use the alias in the SELECT after it's been created? Thanks very much for your help _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - 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 while starting mysqld ....
Dear All, I reinstalled the Linux (SuSE Linux ver 8.0) on my machine and selected MySQL from the Linux CD itself. While starting mysqld daemon through safe_mysqld script, it is giving the following Error and daemon has ended immediatly. I had pasted the messages on my screen below. Kindly let me know how can I start mysqld daemon on my system. - emclinuxserver:~ # safe_mysqld --user=mysql [1] 3364 emclinuxserver:~ # Starting mysqld daemon with databases from /var/lib/mysql ERROR LOG /var/lib/mysql/mysqld.log 030311 16:00:39 mysqld ended [1]+ Donesafe_mysqld --user=mysql emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # cat /var/lib/mysql/mysqld.log 030311 16:00:39 mysqld started 030311 16:00:39 /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 030311 16:00:39 mysqld ended emclinuxserver:~ # - I changes the umask value by setting the file permissions to all, but it didn't worked. NOTE: emclinuxserver is hostname. Request you reply ASAP. Best Regards... -Harish -Original Message- From: Dan Rossi [SMTP:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 1:29 AM To: Harish B M (RBIN/ECM2) *; [EMAIL PROTECTED] Cc: Pemmaiah B D (RBIN/ECM2) * Subject: RE: Error while starting mysqld /var/lib/mysql/ i think that path needs to writable 777 so it can write the socket to it -Original Message- From: Harish B M (RBIN/ECM2) * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 7:51 PM To: '[EMAIL PROTECTED]' Cc: Pemmaiah B D (RBIN/ECM2) * Subject: Error while starting mysqld Hello, I am trying to install MySQL version 3.23 database server (Downloaded from Internet) on a Intel Pentium III machine installed with SuSE Linux 8.0 Professional. While starting the mysqld daemon, it is giving the following Error. Can't connect to the local MySQL server through socket /usr/lib/mysql/mysql.sock Kindly let me know what has gone wrong and how to overcome it. The installation Procedure followed is: -- -- --- Created a group mysql Created a user with mysql as ID # cd /usr/local # ln -s /usr/local/mysql-max-3.23.55-pc-linux-i686 mysql # cd mysql # scripts/install_mysql_db When the above script is executed, the output is Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables 030306 13:49:36 ./bin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: ./bin/mysqladmin -u root password 'new-password' ./bin/mysqladmin -u root -h emclinuxserver password 'new-password' See the manual for more instructions. You can start the MySQL daemon with: cd . ; ./bin/safe_mysqld You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; run-all-tests Please report any problems with the ./bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com # chown -R root . # chown -R mysql data # chgrp -R mysql . # bin/safe_mysqld --user=mysql Then it is giving the following message mysqld Started Can't start Server: Bind on Unix socket: Permission Denied Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ? Aborting /usr/sbin/mysqld : SHutsown Complete mysqld ended -- -- --- I donot have any other mysqld running, I don't understand why the daemon can't be started. I request you all to let me know what had gone wrong and how can I start the mysqld daemon. Best Regards... Harish - 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
problem
Hi Loren I started over; uninstalled mysql and reinstalled. The file I used was mysql-3.23.55-win This unzipped ok and installed into a folder called mysql on my c drive. Following http://www.mysql.com/doc/en/Windows_server_first_start.html the first thing I tried was: C:\mysql\bin mysqld-max --standalone I did this by bringing up the cmd window and the following keystrokes; cd \ (enter) cd mysql (enter) cd bin (enter) mysqld-max --standalone (enter) I even tried putting a space in front of mysqld-max... as there is in 'mysqld-max --standalone' On both occasions the title bar of the dos window changed from 'Command Prompt' to 'Command Prompt - mysqld-max --standalone' and the cursor jumped to the next line without text on it and stayed there flashing and basically locked out - it would not respond to any keystrokes whatsoever. With regards to my book, it seems odd but it does appear it has unix commands mixed in with the Windows stuff - an error I presume but a pretty severe one to make. Anyway, that in mind I won't follow that in setting up mysql rather I will use the bonafide mysql manual. Then I should be right to learn the commands from the book. I note your comments about my.ini and my.cfg and I guess I will look at that once I have sorted out the above problem. I also note that if I navigate through windows explorer and located the mysql exe file in the bin folder in the mysql folder and double click it, it seems to start up mysql ok. When I look at the current processes with task manager, there are five instances of mysqld-max.exe. Does this mean everthing is running ok? Also if I type mysql whilst in the bin folder, the mysql monitor comes up ok. Look forward to your reply Philip McCarthy -Original Message- From: Loren McDonald [mailto:[EMAIL PROTECTED] Sent: 10/03/2003 6:07 AM To: 'Philip McCarthy'; [EMAIL PROTECTED] Subject: RE: inquiry[Scanned] Philip, For starters, you are not wasting my time. I know the difficulties, as it took me a while to get it installed and running. I would suggest you take a look over your book a little more carefully. I could be wrong, but it should have mentioned that mysql_install_db is a shell script for Linux, not usable on Windows. I don't have the book you are using so I can only refer you to the windows installation section of the MySQL manual to get the ball rolling. After that (after you have it all set up), you should be able to follow your book. http://www.mysql.com/doc/en/Windows_installation.html ...also see the subsections and the windows specific links. Also, from what you said, I gather you have not set up one of the my.ini or my.cfg files. This is most likely where you are having your troubles. For more info about them, start here. http://www.mysql.com/doc/en/Option_files.html If after all that you still have troubles, drop me an email (use addy in my sig below). State what you did and any error messages you received and I'll be glad to help get you on the right road again. -- Loren McDonald [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: problem
Well, believe it or not SUCCESS!! That's right, you were running the mysql Server. Now for something you should try. Find the winmysqladmin.exe (Should be in the same folder. Run that one. It will allow you to run the mysqld as a service, give you stat's on whats going on, and start and stop the server. You are on the right track, just keep on plugging!!! Roger -Original Message- From: Philip McCarthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 12:16 AM To: [EMAIL PROTECTED] Subject: problem Hi Loren I started over; uninstalled mysql and reinstalled. The file I used was mysql-3.23.55-win This unzipped ok and installed into a folder called mysql on my c drive. Following http://www.mysql.com/doc/en/Windows_server_first_start.html the first thing I tried was: C:\mysql\bin mysqld-max --standalone I did this by bringing up the cmd window and the following keystrokes; cd \ (enter) cd mysql (enter) cd bin (enter) mysqld-max --standalone (enter) I even tried putting a space in front of mysqld-max... as there is in 'mysqld-max --standalone' On both occasions the title bar of the dos window changed from 'Command Prompt' to 'Command Prompt - mysqld-max --standalone' and the cursor jumped to the next line without text on it and stayed there flashing and basically locked out - it would not respond to any keystrokes whatsoever. With regards to my book, it seems odd but it does appear it has unix commands mixed in with the Windows stuff - an error I presume but a pretty severe one to make. Anyway, that in mind I won't follow that in setting up mysql rather I will use the bonafide mysql manual. Then I should be right to learn the commands from the book. I note your comments about my.ini and my.cfg and I guess I will look at that once I have sorted out the above problem. I also note that if I navigate through windows explorer and located the mysql exe file in the bin folder in the mysql folder and double click it, it seems to start up mysql ok. When I look at the current processes with task manager, there are five instances of mysqld-max.exe. Does this mean everthing is running ok? Also if I type mysql whilst in the bin folder, the mysql monitor comes up ok. Look forward to your reply Philip McCarthy -Original Message- From: Loren McDonald [mailto:[EMAIL PROTECTED] Sent: 10/03/2003 6:07 AM To: 'Philip McCarthy'; [EMAIL PROTECTED] Subject: RE: inquiry[Scanned] Philip, For starters, you are not wasting my time. I know the difficulties, as it took me a while to get it installed and running. I would suggest you take a look over your book a little more carefully. I could be wrong, but it should have mentioned that mysql_install_db is a shell script for Linux, not usable on Windows. I don't have the book you are using so I can only refer you to the windows installation section of the MySQL manual to get the ball rolling. After that (after you have it all set up), you should be able to follow your book. http://www.mysql.com/doc/en/Windows_installation.html ...also see the subsections and the windows specific links. Also, from what you said, I gather you have not set up one of the my.ini or my.cfg files. This is most likely where you are having your troubles. For more info about them, start here. http://www.mysql.com/doc/en/Option_files.html If after all that you still have troubles, drop me an email (use addy in my sig below). State what you did and any error messages you received and I'll be glad to help get you on the right road again. -- Loren McDonald [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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
what's wrong with this query?
Please help me with the following c code: sprintf(update, update chrc set center='); len = 24; memcpy(update+len, center, 128); len += 128; sprintf(update+len, ', var='); len += 8; memcpy(update+len, var, 128); len += 128; sprintf(update+len, ' where cc='%s', row[0]); len += 15; if (ret = mysql_real_query(conn, update, len)) printf(fail update %d\n, ret); int center[4][8], var[4][8] row[0] is a chinese character (2 bytes) update is a buffer of char [500] mysql describe chrc; ++--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+ | cc | char(2) binary | YES | | NULL| | | count | int(11) | YES | | NULL| | | center | char(128) binary | YES | | NULL| | | var| char(128) binary | YES | | NULL| | ++--+--+-+-+---+ The query I want to do is update chrc set center='--', var'++' where cc='xx' (1) where -- is center[4][8] (all of them), ++ is var[4][8], and xx is the chinese character. The result I get is that all rows in the table chrc are updated. And it can be seen from /var/log/mysql/mysql.log, the query executed is update chrc set center=' (2) But I dumped the variable update to a file, and it is exactly as what I want in (1). Please point me out what is the problem. Thank you very much. - 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 while starting mysqld ....
At 6:08 +0100 3/11/03, Harish B M (RBIN/ECM2) * wrote: Dear All, I reinstalled the Linux (SuSE Linux ver 8.0) on my machine and selected MySQL from the Linux CD itself. While starting mysqld daemon through safe_mysqld script, it is giving the following Error and daemon has ended immediatly. I had pasted the messages on my screen below. Kindly let me know how can I start mysqld daemon on my system. Run mysql_install_db (as you apparently did during the first install), but either run it while logged in as mysql, or run it as root with a --user=mysql argument. You must run mysql_install_db to initialize the data directory, but you want the directories and files that it creates to be owned by mysql. After you run mysql_install_db, you should be able to run safe_mysqld. - emclinuxserver:~ # safe_mysqld --user=mysql [1] 3364 emclinuxserver:~ # Starting mysqld daemon with databases from /var/lib/mysql ERROR LOG /var/lib/mysql/mysqld.log 030311 16:00:39 mysqld ended [1]+ Donesafe_mysqld --user=mysql emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # emclinuxserver:~ # cat /var/lib/mysql/mysqld.log 030311 16:00:39 mysqld started 030311 16:00:39 /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13) 030311 16:00:39 mysqld ended emclinuxserver:~ # - I changes the umask value by setting the file permissions to all, but it didn't worked. NOTE: emclinuxserver is hostname. Request you reply ASAP. Best Regards... -Harish -Original Message- From: Dan Rossi [SMTP:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 1:29 AM To:Harish B M (RBIN/ECM2) *; [EMAIL PROTECTED] Cc:Pemmaiah B D (RBIN/ECM2) * Subject: RE: Error while starting mysqld /var/lib/mysql/ i think that path needs to writable 777 so it can write the socket to it -Original Message- From: Harish B M (RBIN/ECM2) * [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 7:51 PM To: '[EMAIL PROTECTED]' Cc: Pemmaiah B D (RBIN/ECM2) * Subject: Error while starting mysqld Hello, I am trying to install MySQL version 3.23 database server (Downloaded from Internet) on a Intel Pentium III machine installed with SuSE Linux 8.0 Professional. While starting the mysqld daemon, it is giving the following Error. Can't connect to the local MySQL server through socket /usr/lib/mysql/mysql.sock Kindly let me know what has gone wrong and how to overcome it. The installation Procedure followed is: -- -- --- Created a group mysql Created a user with mysql as ID # cd /usr/local # ln -s /usr/local/mysql-max-3.23.55-pc-linux-i686 mysql # cd mysql # scripts/install_mysql_db When the above script is executed, the output is Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables 030306 13:49:36 ./bin/mysqld: Shutdown Complete To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: ./bin/mysqladmin -u root password 'new-password' ./bin/mysqladmin -u root -h emclinuxserver password 'new-password' See the manual for more instructions. You can start the MySQL daemon with: cd . ; ./bin/safe_mysqld You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; run-all-tests Please report any problems with the ./bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com # chown -R root . # chown -R mysql data # chgrp -R mysql . # bin/safe_mysqld --user=mysql Then it is giving the following message mysqld Started Can't start Server: Bind on Unix socket: Permission Denied Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ? Aborting /usr/sbin/mysqld : SHutsown Complete mysqld ended -- -- --- I donot have any other mysqld running, I don't understand why the daemon can't be started. I request you all to let me know what had gone wrong and how can I start the mysqld daemon. Best Regards... Harish
Re: problem
At 16:15 +1100 3/11/03, Philip McCarthy wrote: Hi Loren I started over; uninstalled mysql and reinstalled. The file I used was mysql-3.23.55-win This unzipped ok and installed into a folder called mysql on my c drive. Following http://www.mysql.com/doc/en/Windows_server_first_start.html the first thing I tried was: C:\mysql\bin mysqld-max --standalone I did this by bringing up the cmd window and the following keystrokes; cd \ (enter) cd mysql (enter) cd bin (enter) mysqld-max --standalone (enter) I even tried putting a space in front of mysqld-max... as there is in 'mysqld-max --standalone' On both occasions the title bar of the dos window changed from 'Command Prompt' to 'Command Prompt - mysqld-max --standalone' and the cursor jumped to the next line without text on it and stayed there flashing and basically locked out - it would not respond to any keystrokes whatsoever. That's the correct behavior. It's a server that's listening for network connections. It's not listening to the keyboard after you invoke it. Open another console window and type mysql to verify that it can connect to the server. With regards to my book, it seems odd but it does appear it has unix commands mixed in with the Windows stuff - an error I presume but a pretty severe one to make. Anyway, that in mind I won't follow that in setting up mysql rather I will use the bonafide mysql manual. Then I should be right to learn the commands from the book. I note your comments about my.ini and my.cfg and I guess I will look at that once I have sorted out the above problem. my.cfg is the wrong name. You can use C:\my.cnf as an option file, or my.ini in the Windows system directory. I also note that if I navigate through windows explorer and located the mysql exe file in the bin folder in the mysql folder and double click it, it seems to start up mysql ok. When I look at the current processes with task manager, there are five instances of mysqld-max.exe. Does this mean everthing is running ok? Also if I type mysql whilst in the bin folder, the mysql monitor comes up ok. Sounds like the server is running correctly. Look forward to your reply Philip McCarthy -Original Message- From: Loren McDonald [mailto:[EMAIL PROTECTED] Sent: 10/03/2003 6:07 AM To: 'Philip McCarthy'; [EMAIL PROTECTED] Subject: RE: inquiry[Scanned] Philip, For starters, you are not wasting my time. I know the difficulties, as it took me a while to get it installed and running. I would suggest you take a look over your book a little more carefully. I could be wrong, but it should have mentioned that mysql_install_db is a shell script for Linux, not usable on Windows. I don't have the book you are using so I can only refer you to the windows installation section of the MySQL manual to get the ball rolling. After that (after you have it all set up), you should be able to follow your book. http://www.mysql.com/doc/en/Windows_installation.html ...also see the subsections and the windows specific links. Also, from what you said, I gather you have not set up one of the my.ini or my.cfg files. This is most likely where you are having your troubles. For more info about them, start here. http://www.mysql.com/doc/en/Option_files.html If after all that you still have troubles, drop me an email (use addy in my sig below). State what you did and any error messages you received and I'll be glad to help get you on the right road again. -- Loren McDonald [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - 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
SELECT not doing what is expected...
Hi, query question: I have 2 tables created using Mysql: 1) Players Name(varchar),Team(varchar),Goals(tinyint),Assists(tinyint),Shutouts(tinyint),points(int). 2)draftees ID(smallint),Name(varchar),Phone(varchar),Player(varchar) The problem I run into is when I run this statement only the first ID that has a certain Player is listed, even though multiple ID's may have the same player. SELECT ID,Name,draftees.Player,goals,assists,shutouts,points FROM Players INNER JOIN draftees USING (Player) WHERE Players.Player=draftees.Player ORDER BY ID I hope that I have explained my problem clearly, Any help would be appreciated... Rob - 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
SELECT to new table
How do I write a SQL call to take the results of a select statement and plug them into a new table in the DB? Thanks Phillip - 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
[repost] Finding table name when using Union
Hi! Sorry for the repost, but I am really eager to hear the verdict so I give it another go, thanks ;-) When using the Union statement in MySQL, is it possible to retrieve the corresponding table name for a given row? The reason I need to know this is that I present info from different tables in their own way. I know I can create a column in each table that describes which table the row actually is being retrieved from, but I am looking for a more intelligent solution. Thanks! :-) Best regards, Richard Taubo - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQL Client on Linux won't connect to MySQL Server on XP
Hi all, I got MySQL 3.23.55-nt running on XP and MySQL Client 3.23.36 running on Linux Red Hat 7. I'm trying to have the client connect to the server but I get the same error all the time: [EMAIL PROTECTED] /root]# mysql -h 10.0.0.41 -u guest ERROR 1130: Host '10.0.0.220' is not allowed to connect to this MySQL server Could it be that the server and the client are not running the same version and OS? Actually this situation is only a simulation of the future setup which will be a win2k box holding the MySQL Server and the Linux box still holding the client. Apache will run on the linux box as well as PHP so that I can connect to mysql. I'd be glad to hear from people having a similar setup and who would be willing to give me tips on problems I could encounter as well as some hints. Thanks in advance Paul - 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