MySQL Insert error..

2005-04-18 Thread preeth k
Hello, I am doing programming in C and uses MySQL database. I have got a problem with inserting values stored in variables to the database. When compiling the code that I have written the following error message shows up: connect2.c: In function `main': connect2.c:19: invalid operands to binary

Visual C++ 6.0 and MySQL

2005-04-18 Thread Vicente Valero
Hi, I have to create with Microsoft Visual C++ a program connected to a database. I am thinking about MySQL, but I have never did it. I have tried to located information about API for C++ on www.mysql.com, but I have not success. Can anybody tell me where I can find a good tutorial and examples?

Visual C++ 6.0 and MySQL

2005-04-18 Thread Vicente
Hi, I have to create with Microsoft Visual C++ a program connected to a database. I am thinking about MySQL, but I have never did it. I have tried to located information about API for C++ on www.mysql.com http://www.mysql.com/ , but I have not success. Can anybody tell me where I can find a good

Re: Visual C++ 6.0 and MySQL

2005-04-18 Thread Philippe Poelvoorde
Vicente Valero wrote: Hi, I have to create with Microsoft Visual C++ a program connected to a database. I am thinking about MySQL, but I have never did it. I have tried to located information about API for C++ on www.mysql.com, but I have not success. Can anybody tell me where I can find a good

Re: Visual C++ 6.0 and MySQL

2005-04-18 Thread ManojW
Please note though - If you are using VC 6 (as the subjec tline says) then please read the FAQ of msql++ since it says that the library works with 7.1 onwards. - Original Message - From: Philippe Poelvoorde [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, April 18, 2005 6:04

use mysql and segmentation fault

2005-04-18 Thread Xu Hao
Hi everyone! I downloaded and installed the mysql 4.1 rpms on my RedHat Enterprise Linux 3 box and found a strange problem. If I invoke the client program by mysql -u root -p'mypassword' and then type use mysql, then segmentation fault happens, but if I invoke the client program by mysql -u

MySQL Query-Cache Reset

2005-04-18 Thread Dto. Sistemas de Unitel
Hi, I’m the administrador of a MySQL Server, it have lot’s of queries, and now it’s getting high load of processor, I try to increase the size of MySQL Query Cache, but if I put more than 128 Mb the cache it’s reseting all the time and the performance is worst. The server have 1,2 Mb of RAM and I

MySQL 5.0.4-beta has been released

2005-04-18 Thread Joerg Bruehe
Hi, A new version of MySQL Community Edition 5.0.4-beta Open Source database management system has been released. This version now includes support for Stored Procedures, Triggers, Views and many other features. It is now available in source and binary form for a number of platforms from our

Two servers, one InnoDB area?

2005-04-18 Thread Duncan Hill
I'm currently evaluating ways to increase our online storage capacity for our DB engine. The current winner is a massive external SAN/disk array. However, I'm wondering how MySQL will handle failover when it comes to InnoDB tablespaces. The current plan, based on the disk array, is to have

Re: InnoDB Performance

2005-04-18 Thread Eko Budiharto
The MyIsam storage engine is a non transactional engine and InnoDb is a transactional engine. That is the main difference. So I think the MyIsam engine should be faster. what is transactional mean? - Do you Yahoo!? Yahoo! Small Business - Try

Re: auto-increment by a specific number

2005-04-18 Thread gerald_clark
StinkyPup wrote: How do I auto-increment by a specific number. For example by 100: You dont. IDData 100 blah blah blah 200 blah blah foo ALTER TABLE PRODUCT AUTO_INCREMENT = 100 doesn't do what I want to do. TIA -- MySQL General Mailing List For list archives:

Re: Include repeats in query

2005-04-18 Thread SGreen
Martin Gallagher [EMAIL PROTECTED] wrote on 04/16/2005 08:49:35 AM: Hi, I have the following query: SELECT person FROM people WHERE ORDER BY RAND() * (1 / score) LIMIT 1 This returns a person randomly, but the chance of the person being selected is increased with a higher

Re: InnoDB Performance

2005-04-18 Thread Reto Breitenmoser
see this link http://dev.mysql.com/doc/mysql/en/ansi-diff-transactions.html Reto Eko Budiharto wrote: The MyIsam storage engine is a non transactional engine and InnoDb is a transactional engine. That is the main difference. So I think the MyIsam engine should be faster. what is transactional

Regarding the loading of data usning load data infile

2005-04-18 Thread lakshmi.narasimharao
Hi, I had 99,990 records to be loaded into a table which is having unique constraints and foreign-key constraints as below CREATE TABLE `teldir` ( `NAME` varchar(21) default '', `PHONE_NO` varchar(26) default '', `PRIME_VALUE` char(1) default '', `COMMENT_TEXT1` varchar(30)

Re: MySQL not starting at boot-Fedora Core 3

2005-04-18 Thread Gleb Paharenko
Hello. Are you able to start MySQL server by this command? service mysqld start I think you should put the correct values for the basedir, datadir, PATH variables at the beginning of the /etc/init.d/mysql file. Mark Sargent [EMAIL PROTECTED] wrote: Hi All, attempting

Re: Visual C++ 6.0 and MySQL

2005-04-18 Thread Gleb Paharenko
Hello. Have you been at: http://dev.mysql.com/doc/mysql/en/cplusplus.html I have to create with Microsoft Visual C++ a program connected to a database. I am thinking about MySQL, but I have never did it. I have tried to located information about API for C++ on www.mysql.com

Re: order important in grant commands?

2005-04-18 Thread Gleb Paharenko
Hello. I've reported a bug. See: http://bugs.mysql.com/bug.php?id=9952 Mark M. Ito [EMAIL PROTECTED] wrote: Gleb et al., I've tried something else. Fearing that the problem is due to some interaction with an already rather complicated set of privilege tables, I tried

Re: use mysql and segmentation fault

2005-04-18 Thread Gleb Paharenko
Hello. If you are able to reproduce this problem on another box with a similar configuration, I suggest you to report a bug. BTW mysql client has some problems already reported, see: http://bugs.mysql.com/bug.php?id=9870 Xu Hao [EMAIL PROTECTED] wrote: Hi everyone! I

Re: Blocking connections

2005-04-18 Thread Gleb Paharenko
Hello. We don't have 4.1.11 binaries for NetBSD, so this MySQL version wasn't tested enough on this platform. I suggest you to switch to the debugging version and find some clues in the trace files. See: http://dev.mysql.com/doc/mysql/en/debugging-server.html Tim [EMAIL PROTECTED]

Query How To

2005-04-18 Thread Reynier Perez Mira
Hi list I need to make a Quero that select all fields in wich the date are inferior in 10 days to actual date. Something like this: Actual date: 18-04-2005 Select all fields in which are bigger than: 08-04-2005. How can I do this? Regards Reynier Pérez Mira 3ero. Ing. Informática

Re: Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-18 Thread Vivian Wang
create table temp select * from viewvisitor order by lastviewtime desc; select app, itemid, ownerid, visitorid, vusername,lastviewtime, sum(viewcount) AS totalcount, itemname from temp where ownerid = 2 GROUP BY concat( app, itemid ) ORDER BY totalcount; or if you only care about

re: Error 1130 when on local machine, but can connect remotely

2005-04-18 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My mysql server is running on mysql.xxx.edu, for this example. There is a cname so that alias.xxx.edu is mapped to mysql.xxx.edu, so that we can failover to a different server by changing the cname. When I type: mysql -h alias.xxx.edu -pPassword -u

Access denied for user: 'apache@localhost' (Using password: NO)

2005-04-18 Thread Jorge Cambra Aused
I have a web application running with Apache with PHP 4.1.2 (revision 7.2.6) and MySQL 3.23.58. The access from the PHP code to the MySQL server using the IP of the machine with MySQL, an username and a password, and it works fine. But sometimes we get the MySQL error: Access denied for

Re: Query How To

2005-04-18 Thread SGreen
Reynier Perez Mira [EMAIL PROTECTED] wrote on 04/18/2005 10:44:39 AM: Hi list I need to make a Quero that select all fields in wich the date are inferior in 10 days to actual date. Something like this: Actual date: 18-04-2005 Select all fields in which are bigger than: 08-04-2005.

Re: Blocking connections

2005-04-18 Thread timwoj
It's looking more like an OS issue than a mysql issue. We downgraded back to 4.0.24 and are having the same problems. I'm going to cross-post this over to the netbsd lists, and see if someone over there has some ideas. Thanks for the help. Tim On Mon, 18 Apr 2005, Gleb Paharenko wrote:

wait_timeout

2005-04-18 Thread Rob Brooks
I have the following in the mysqld section of my.cnf: set-variable = wait_timeout=360 everything else in the conf file seems to take but my wait_timeout variable stays at the default of 28800 my version is 4.0.20 for apple-darwin6.8 Any thoughts?

Re: MySQL 5.0.4-beta has been released

2005-04-18 Thread Josh Trutwin
On Mon, 18 Apr 2005 13:28:24 +0200 Joerg Bruehe [EMAIL PROTECTED] wrote: Hi, A new version of MySQL Community Edition 5.0.4-beta Open Source database management system has been released. This version now includes support for Stored Procedures, Triggers, Views and many other features. It

Mysqladmin bug

2005-04-18 Thread Marvin Wright
Hi, Our database has been running for some time and it had some threads on it that I needed to kill. I did a mysqladmin process list and got the following | 2521285658 | web | 192.168.11.60:2482 | | Sleep | 747 |

Re: MySQL 5.0.4-beta has been released

2005-04-18 Thread Joerg Bruehe
Hi! Am Mo, den 18.04.2005 schrieb Josh Trutwin um 17:46: On Mon, 18 Apr 2005 13:28:24 +0200 Joerg Bruehe [EMAIL PROTECTED] wrote: [[...]] Note that not all mirror sites may be up-to-date at this point. If you cannot find this version on a particular mirror, please try again later

mysql import or write my own Perl parser

2005-04-18 Thread newbie c
Hi, I am about to create a database and there are a number of files that I need to load into the database. They are tab delimited files. One of the files contains about 4 or 5 columns. I am only interested in the second and the third column right now but I will load the whole table. The

Re: MySQL 5.0.4-beta has been released

2005-04-18 Thread Josh Trutwin
On Mon, 18 Apr 2005 18:04:46 +0200 Joerg Bruehe [EMAIL PROTECTED] wrote: snip Are you sure it did not get damaged during transfer, or by your browser? All I can recommend is to try another mirror. I'm using elinks text browser, which has worked great for this in the past. I tried about 4

Re: wait_timeout

2005-04-18 Thread Gleb Paharenko
Hello. Set the interactive_timeout variable to this value. I recommend you to upgrade to the latest release (4.1.11 now). I have the following in the mysqld section of my.cnf: set-variable = wait_timeout=360 everything else in the conf file seems to take but my wait_timeout

Re: re: Error 1130 when on local machine, but can connect remotely

2005-04-18 Thread Gleb Paharenko
Hello. You should grant access for user 'your_user'@'alias'. See: http://dev.mysql.com/doc/mysql/en/privilege-system.html James Black [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My mysql server is running on mysql.xxx.edu, for this example.

Re: MySQL Query-Cache Reset

2005-04-18 Thread Gleb Paharenko
Hello. In my opinion, your status variables are not so bad-looking. About a half of your queries are taken from the cache and the Key_reads/Key_read_requests ratio is less than 1%. Check that the system doesn't start swapping with high value of Query Cache size. If you run lots of queries

Re: Access denied for user: 'apache@localhost' (Using password: NO)

2005-04-18 Thread Gleb Paharenko
Hello. It is strange that refusing message says you're not using passwords. Does the problem disappear after the FLUSH HOSTS statement, instead of restarting MySQL server? Jorge Cambra Aused [EMAIL PROTECTED] wrote: I have a web application running with Apache with PHP 4.1.2

RE: Include repeats in query

2005-04-18 Thread Martin Gallagher
Shawn, that's perfect, EXACTLY what I was looking for! Gotta take more notice of the reference manual from now on tho. - Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 14:22 To: Martin Gallagher Cc: mysql@lists.mysql.com Subject: Re:

Re: HELP WITH A DATE QUERY USING 4.0.17

2005-04-18 Thread John Thorpe
I'm not sure if there is a built-in, but what I usually do for similar things is to use general purpose table to force iteration. E.g. create a table called ITERATE with one column, x, and populate with values 0,1,2,3,4,... -- in your case up to 10 -- and index the column. Then it's easy - I only

MySQL/InnoDB-5.0.4 is released

2005-04-18 Thread Heikki Tuuri
Hi! Greetings to all from the MySQL Users Conference 2005 in Santa Clara! The conference has just kicked off with tutorials, and will last till Thursday. Close to 1000 people are expected to attend the conference. MySQL-5.0 is probably the most important new MySQL release in several years. On

Help restoring

2005-04-18 Thread Patrick Campbell
I have backed a bugzilla database using: mysqldump -u root -p bugs bugzilla.20050418 and am trying to import it on a new mysql server using mysql -u root -p bugs bugzilla.20050418 I'm getting ERROR at line 84: Line 84 is all garbled text... Working with 3.23.58 ... Any thoughts

RE: Client Side Query cache

2005-04-18 Thread gunmuse
Linux does some sort of page caching automatically and its the reason for there never being any Free memory in a Linux system. So if you read your db via XML and php and develop a page from that using a CSS style sheet Linux will cache it as a Page.(Took us forever to catch that one, something to

Re: After upgrade to 5.03beta, mysqld won't start [SOLVED]

2005-04-18 Thread John Swartzentruber
On 4/12/2005 9:31 PM John Swartzentruber wrote: On 4/12/2005 8:43 PM Petr Chardin wrote: Hi Jonh, As I said, I couldn't find any error logs that seemed to relate (i.e, had information newer than the upgrade and start failures). I looked into the /etc/init.d/mysql script and tried running

Running mysql on a headless Windows CE Device

2005-04-18 Thread LiquidIce
Greetings! I am trying to figure out how I can install mysql on my headless WinCE 5.0 web server device. I've already gotten PHP up and running, my next step is to install mysql, and run phpMyAdmin to allow people to navigate and modify their tables. I've been searching everwhere for mysql

Re: Help restoring

2005-04-18 Thread Eric Bergen
. -Eric On 4/18/05, Patrick Campbell [EMAIL PROTECTED] wrote: I have backed a bugzilla database using: mysqldump -u root -p bugs bugzilla.20050418 and am trying to import it on a new mysql server using mysql -u root -p bugs bugzilla.20050418 I'm getting ERROR at line 84: Line 84

Re: Mysqladmin bug

2005-04-18 Thread Eric Bergen
Try enclosing 2521570862 in single quotes on the command line. It's just a guess but it might be bash overflowing that number and not mysqladmin. -Eric On 4/18/05, Marvin Wright [EMAIL PROTECTED] wrote: Hi, Our database has been running for some time and it had some threads on it that I

Re: mysql import or write my own Perl parser

2005-04-18 Thread Eric Bergen
awk is probably the best tool I can think of for cutting columns out of a text file. Something like awk -F \\t '{ print $2 , $3 }' my_file could be used to pick the second and third column out of a file prior to importing it. -Eric On 4/18/05, newbie c [EMAIL PROTECTED] wrote: Hi, I am about

Re: InnoDB Performance

2005-04-18 Thread David Lloyd
Eko and all, The MyIsam storage engine is a non transactional engine and InnoDb is a transactional engine. That is the main difference. So I think the MyIsam engine should be faster. However, some file systems that have journals are faster than non journalling file system. It's not always

Re: optimal number of connections?

2005-04-18 Thread Eric Bergen
The number of connections touches several areas. Fortunately there is very little overhead in creating MySQL connections. Connection pooling hits a few snags in MySQL in the area of session and user variables. Anything set inside a session will stick when the next thread picks up a connection.

Re: Warning (reformulated)

2005-04-18 Thread Eric Bergen
Warnings are usually caused by type mismatches in what you try to put in a column vs what it will actually hold. For example putting a 'asdf' in a char(3) will produce a warning because 'asdf' was truncated to 'asd' Check your column types vs the data you tried to insert. -Eric On 4/15/05, Andy

Re: 4==4something: equal vs identical

2005-04-18 Thread Eric Bergen
The opposite of Paul's cast is: select '4ae'f + 0; That will show you what MySQL ends up with after casting a string to an integer. -Eric On 4/16/05, Paul DuBois [EMAIL PROTECTED] wrote: At 22:18 +0200 4/16/05, Andy Pieters wrote: Hi everone I ran into some situation where MySql selects a

Re: zip code search within x miles

2005-04-18 Thread Richard Lynch
You can buy up-to-the-minute zips, or snag TIGER (or gazateer?) data that's a bit old for free. It's a 1-1 mapping of zip to long/lat. The tricky bit is this. There's about 65,000 zips, even in the out-dated list for free. Let's say you've got, oh, 2000 records to search through. You're gonna

Re: zip code search within x miles

2005-04-18 Thread paris lundis
I'll share my creative workaround for geographic searches within x miles. This is a theory I developed years ago and have used in live production systems for the last five years. This method to be described is used to produce approximately 100-200k sets of live nearby data per day online. My

Re: zip code search within x miles

2005-04-18 Thread Hank
Let's say you've got, oh, 2000 records to search through. You're gonna end up doing a JOIN with: 2,000 X 65,000 == 130,000,000 tuples (records/results). 130 MILLION tuples is *way* too many for your basic $20/month site. I'd say take some easy shortcuts first... like limit the join to the zip

Re: zip code search within x miles

2005-04-18 Thread Hank
Applying this same thing to apply to the 80k estimated US zipcodes currently Just for the record, there are about 43,000 distinct US zip codes... and 56,000 zip codes if you double count the zips with multiple city names (when zip codes cross city limits). -Hank mysql, query -- MySQL

RE: zip code search within x miles

2005-04-18 Thread Scott Johnson
Hi all, I have done this type of setup before. There is a company that puts out a zipcode file with the Latitude and longitude in it. You can then calculate what's in the distance you are looking for. Scott. -Original Message- From: Robert Dunlop [mailto:[EMAIL PROTECTED] Sent: