Re: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Erlend Stromsvik
Check out this: http://www.mysql.com/doc/L/O/LOCK_TABLES.html User 1 must do a 'write lock' on the table, before calling the insert statement. Then User 2's qery will have to wait till User 1 calls Unlock. USER 1 ===> WRITE LOCK > > USER 1 ===> INSERT > STOP <== due to process sch

RE: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Noel Clarkson
Hi Son, On Monday, April 08, 2002 2:37 PM, Son Nguyen [SMTP:[EMAIL PROTECTED]] wrote: > > --- BD <[EMAIL PROTECTED]> wrote: > > Son, > > > > At 09:48 PM 4/7/2002, you wrote: > > >mysql> desc threads; > > > >+-+--+--+-+-++ > > >| Field

select * into outfile

2002-04-07 Thread lorenzo.kh
Hi, i am using mysql 4.0.0 version -alpha in windows 2000. i'd like to export the mysql table data to excel format. So,i use the outfile method. mysql>select * into outfile 'backup.xls' from ; When i open 'backup.xls' in microsoft excel,i can view all the data ,but i can't view the field name. Is

regular backup database in mysql

2002-04-07 Thread lorenzo.kh
I am using MySql version 4.0.0-alpha in Windows 2000. Everytime when I want to backup the database,i do it in MS-DOS. Using this command: >mysqldump --opt mydatabasename > mybackup.sql Now,lets say i never shut down my pc and the MySql is running all the time. How can i do a regular backup (ie.eve

È«ÐÂÍÆ³öasp.net jspÐéÄâÖ÷»ú£¡³ÏÑû´úÀíÒµÎñ,ÀûÈó¿É´ï40%£¡

2002-04-07 Thread ʱ´´ÍøÂç
м¼Êõ£¡£¡Jsp¡¢Asp.net¡¢phpµÄÐéÄâÖ÷»ú¡¢Í¨ÓÃÍøÖ·¡¢´øVDNSµÄ¿ÉÊÓ»¯ÓòÃû¹ÜÀíϵͳ¡£www.todaynic.com ¾Ý¸÷µØÐÂÎÅýÌåµÄ±¨µÀ,CNNICÍÆ³öµÄÐÂÖÐÎÄÓòÃû¡°Í¨ÓÃÍøÖ·¡±ÒѾ­ºÍ΢ÈíµÄä¯ÀÀÆ÷½øÐÐÁËÀ¦°óÏúÊÛ£¬ÒÔºó´ó¼ÒÖ»ÐèÔÚä¯ÀÀÆ÷ÖÐÖ±½ÓÊäÈëÖÐÎļò¡¢·±ÌåµÄºº×Ö»òÕßÓ¢Îĵ¥´Ê¾Í¿ÉÒÔ·ÃÎʵ½ÄúÏëҪȥµÄµØ·½£¬×¢²áºóÁ¢¿ÌÈ«ÇòÉúЧ£¬Ê

Re: Segmentation Fault when connecting using DBI and option file

2002-04-07 Thread Son Nguyen
--- [EMAIL PROTECTED] wrote: > >Description: > When connecting to mysql database using Perl DBI AND specifying a > mysql_read_default_file, this causes a Segmentation Fault. However > if a mysql_read_default_file is not used then no error occurs. > Linux version is 7.2 Redhat and DBI and

Re: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Son Nguyen
--- BD <[EMAIL PROTECTED]> wrote: > Son, > > At 09:48 PM 4/7/2002, you wrote: > >mysql> desc threads; > >+-+--+--+-+-++ > >| Field | Type | Null | Key | Default | Extra > | > >+-+--+--+

Segmentation Fault when connecting using DBI and option file

2002-04-07 Thread ray
>Description: When connecting to mysql database using Perl DBI AND specifying a mysql_read_default_file, this causes a Segmentation Fault. However if a mysql_read_default_file is not used then no error occurs. Linux version is 7.2 Redhat and DBI and DBD-mysql were installed from redhat.com and i

Mysql++ Difficulties

2002-04-07 Thread David Tsai
Hello, I am having trouble getting MySQL++ to work on a Linux system. I couldn't compile the source distribution because the "automake" command fails saying that there are some required files that aren't present such as the ChangeLog, etc. Then I downloaded a rpm package and it appears to have

RE: Help with Tables Please

2002-04-07 Thread Soheil Shaghaghi
Thanks for the tip Dan, I changed it, but it still gives me the same error. Any other suggestion? -Original Message- From: Dan Nelson [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 7:08 PM To: Soheil Shaghaghi Cc: [EMAIL PROTECTED] Subject: Re: Help with Tables Please In the l

SQL HELP!

2002-04-07 Thread Roberto Ramírez
What the hell this query do!? SELECT student.name FROM student WHERE not exists( SELECT * FROM enrollment WHERE not exists( SELECT * FROM class

Re: Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread BD
Son, At 09:48 PM 4/7/2002, you wrote: >mysql> desc threads; >+-+--+--+-+-++ >| Field | Type | Null | Key | Default | Extra | >+-+--+--+-+-++ >| thread_ID | int(

Can AUTO_INCREMENT return from INSERT function into a table ?

2002-04-07 Thread Son Nguyen
mysql> desc threads; +-+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+--+--+-+-++ | thread_ID | int(11) | | PRI | NULL| auto_incre

Re: Help with Tables Please

2002-04-07 Thread Sammy Lau
HINTS: tinyint - Original Message - From: "Soheil Shaghaghi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 08, 2002 9:59 AM Subject: Help with Tables Please > Hi all, > I have create the following mysql table, and when I try to add more than 128 > rows in the table, I g

Re: Help with Tables Please

2002-04-07 Thread Dan Nelson
In the last episode (Apr 07), Soheil Shaghaghi said: > Hi all, I have create the following mysql table, and when I try to > add more than 128 rows in the table, I get this error: "Duplicate > entry '127' for key 1" I have no duplicate entries in there, and I > can not figure out what's going on! >

Help with Tables Please

2002-04-07 Thread Soheil Shaghaghi
Hi all, I have create the following mysql table, and when I try to add more than 128 rows in the table, I get this error: "Duplicate entry '127' for key 1" I have no duplicate entries in there, and I can not figure out what's going on! CREATE TABLE CMSHOWNREQUIREDFIELDS1 ( FieldID tinyint(4) DE

Follow up question to table types

2002-04-07 Thread Carl Schmidt
One thing did occur to me though. I was looking at the syntax for actually creating a database on the mysql server. I wanted to make sure that those table types that are installed with mysql do not have to be specified as _available_ to tables in a particular database. In other words, when a da

Re: Converting table types

2002-04-07 Thread Carl Schmidt
Excellent, thanks much, that solved the problem: mysql> SHOW VARIABLES LIKE 'have\_%'; +---+---+ | Variable_name | Value | +---+---+ | have_bdb | NO| | have_gemini | NO| | have_innodb | NO| | have_isam | YES | | have_raid | NO| |

Re: Converting table types

2002-04-07 Thread Paul DuBois
At 20:23 -0400 4/7/02, Carl Schmidt wrote: >I don't believe my web host has either InnoDB or BDB installed on their >system so I ran some tests here: > >mysql> alter table Development_EventType TYPE=INNODB; >Query OK, 3 rows affected (0.00 sec) >Records: 3 Duplicates: 0 Warnings: 0 > > >That's t

Re: last_insert_id gives 0

2002-04-07 Thread Paul DuBois
>On Sun, 7 Apr 2002 19:56:47 -0500 >Paul DuBois <[EMAIL PROTECTED]> wrote: > >> >I am running MySQL 3.23.41-17 on a stock SuSE 7.3 install. I have a table >> >"customers" with an auto-incrementing primary key "customer_id". >>If I insert >> >a record: >> >mysql> insert into customers(custome

Re: last_insert_id gives 0

2002-04-07 Thread Dicky Wahyu Purnomo
On Sun, 7 Apr 2002 19:56:47 -0500 Paul DuBois <[EMAIL PROTECTED]> wrote: > >I am running MySQL 3.23.41-17 on a stock SuSE 7.3 install. I have a table > >"customers" with an auto-incrementing primary key "customer_id". If I insert > >a record: > >mysql> insert into customers(customer_id) values

Re: last_insert_id gives 0

2002-04-07 Thread Paul DuBois
>I am running MySQL 3.23.41-17 on a stock SuSE 7.3 install. I have a table >"customers" with an auto-incrementing primary key "customer_id". If I insert >a record: >mysql> insert into customers(customer_id) values ("10"); >and then ask for the last insert: >mysql> select last_insert_id(); >(whic

Re: corrupt .FRM files?

2002-04-07 Thread Dicky Wahyu Purnomo
On Sat, 6 Apr 2002 21:17:40 +0200 "DanceGrooves Info" <[EMAIL PROTECTED]> wrote: > Yesterday we discovered a strange problem with our database running on > MySQL version 3.23.45 on a Linux OS version 2.2.16 > The MySQL database had been running perfectly with a PHP interface on > the web since ja

Re: mysqlbinlog: Duplicate entry '1' for key 1

2002-04-07 Thread Dicky Wahyu Purnomo
On Sun, 07 Apr 2002 00:55:59 -0500 Balteo <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to restore some data from the binary log but I get the > following error: > "Duplicate entry '1' for key 1" > > I understand restoring data is a two-stage process: > > 1. You do a "source myfile.sql"

Re: "mysql" database privilege problems...

2002-04-07 Thread Dicky Wahyu Purnomo
On Sat, 6 Apr 2002 18:54:14 -0800 (PST) Kip Kramer <[EMAIL PROTECTED]> wrote: > Hi All, > > After working happily for months, my MySQL (v. 3.23.48-1) database has begun >displaying > the following problem: > > Whenever I log in as mysql root and try to change privileges for my database as >fo

Re: New to MySQL

2002-04-07 Thread Scalper
You could do that, but if you want to keep it simple, I would download some gui tools like mysql-front (mysqlfront.de) and do all of your development work remotely. Craig At 05:16 PM 4/7/2002, you wrote: >Hi > >I'm new to sql but am familiar with Access \ SQL 7 \ ASP. > >My ISP offers MySql Su

Converting table types

2002-04-07 Thread Carl Schmidt
I don't believe my web host has either InnoDB or BDB installed on their system so I ran some tests here: mysql> alter table Development_EventType TYPE=INNODB; Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 That's the result I get, but when I do a table dump, the typ

FOREIGN KEY Constraints

2002-04-07 Thread Carl Schmidt
>From the mysql docs, it looks like you can only use foreign keys if your tables are type InnoDB. Is this correct? Carl - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.co

Re: Keeping MySQL Databases Heathly

2002-04-07 Thread Marc Prewitt
And here's a script that will do the check/repair for you. It has some custom logging libs in it that you'll have to remove to make it work (Admutil and Getpassword), but you'll get the general idea. Alex Pilson wrote: > > Do MySQL server administrators recommend running a cron script daily > t

Re: Keeping MySQL Databases Heathly

2002-04-07 Thread Marc Prewitt
We run a CHECK TABLE nightly on every table (see: http://www.mysql.com/doc/C/H/CHECK_TABLE.html) and I would HIGHLY recommend doing so. If the check table fails, we run a REPAIR TABLE. We also used to do a REPAIR TABLE EXTENDED on weekends to optimize indexes until our db got too big for that to

Re: MySql/Perl installation problem

2002-04-07 Thread Chris Evans
I have downloaded and installed DBD-mysql-2.1011, which has allowed the test suite $MYSQL_HOME/sql-bench/run-all-tests to complete successfully. (I had thought that the insert test was not working, but I was simply too impatient--it took about 45 min of clock time to run.) Everything is working

Re: How can I kill the slow query automatically?

2002-04-07 Thread Marc Prewitt
Without setting up replication, you could use 'UPDATE LOW PRIORITY': http://www.mysql.com/doc/U/P/UPDATE.html If you do setup replication, you can set the replica database to use low priority updates too by using the --low-priority-updates option to mysqld: http://www.mysql.com/doc/C/o/Command-

Re: Problem with Sun Os

2002-04-07 Thread Marc Prewitt
Looks like mysql was compiled to use a shared version of zlib. You'll need to get it from: http://www.gzip.org/zlib/ Andrea Soracchi wrote: > > Hello, > > When i try to launch my server mysqld I have the follwing result: > > ld.so.1: ./bin/my_print_defaults: fatal: libz.so.1: open failed:

New to MySQL

2002-04-07 Thread John Berman
Hi I'm new to sql but am familiar with Access \ SQL 7 \ ASP. My ISP offers MySql Support so I need to get up to speed. I can now using Myodbc and access or excel connect to the sample database they put online for me. OF course I have my own tables etc that I want to upload. I get the feeling th

Re: MySql/Perl installation problem

2002-04-07 Thread Colin Faber
Hi, It doesn't sound to me that you've installed these packages (if they are packages) for the correct version of perl; Possibly they've been dumped in the OS default? (/usr/lib/perl5/5.00503) etc.? I suggest fetching the latest source from CPAN and building it manually. Chris Evans wrote: >

Re: Re: My.S.Q.L

2002-04-07 Thread BD
At 11:35 AM 4/6/2002, you wrote: >Ok... it's Saturday and I've been meaning to share this with a wider >audience for years Antti, you'll probably remember this from when >I sent this to you shortly after I wrote it (1999)... If anyone would >like to record this, let me know! :-) > >My.

Uninstalling on MacOS X

2002-04-07 Thread Gilbert Wilson
SMW Mac OS X user looking for someone, anyone, to help him uninstall mySQL-3.23.49 because he has royally screwed up the installation. Chronology of events: 1) installed from binary, process went smoothly 2) several weeks go by without use, forget password to mysql 3) cannot remember password, a

last_insert_id gives 0

2002-04-07 Thread Kevin Donnelly
I am running MySQL 3.23.41-17 on a stock SuSE 7.3 install. I have a table "customers" with an auto-incrementing primary key "customer_id". If I insert a record: mysql> insert into customers(customer_id) values ("10"); and then ask for the last insert: mysql> select last_insert_id(); (which I t

Re: SQL Question...

2002-04-07 Thread Jeff Kilbride
The other way to do this is with the DATE_ADD function: select [columns] where [date column] > DATE_ADD(NOW(), INTERVAL -7 DAY) --jeff - Original Message - From: "Chuck "PUP" Payne" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, April 07, 2002 10:29 AM Su

Re: SQL Question...

2002-04-07 Thread Chuck \"PUP\" Payne
Thanks, My book that I have been studying from, only show commands and no examples. MySQL web had want I wanted at the very top. I have finish my page now. Chuck on 4/6/02 11:46 PM, Georg Richter at [EMAIL PROTECTED] wrote: > On Sunday, 7. April 2002 05:56, Chuck \"PUP\" Payne wrote: > Hi, >>

RE: Newbie question.

2002-04-07 Thread Roger Baklund
*Gastón Sancassano > mysql> CREATE TABLE Usuarios (Nombre TEXT NOT NULL, > -> Password TEXT NOT NULL, > -> Permiso INT(1), > -> PRIMARY KEY(Nombre(30))); > > Query OK, 0 rows affected (0.05 sec) > > > This allows me to insert things like: INSERT INTO Usuarios > (N

MySql/Perl installation problem

2002-04-07 Thread Chris Evans
I am having a problem with testing MySql (max) version 3.23.49a. I downloaded the 3 required Perl packages (Data-Dumper, DBI, and Msql-Mysql-modules), the latest versions, and installed them. The OS is RH Linux 7.2. The installation of both the binary MySql distribution and the Perl packages se

Newbie question.

2002-04-07 Thread Gastón Sancassano
Hello people, I am new to MySQL (to all SQL, better said) and I am in need of some help. I create a table with these characteristics: mysql> CREATE TABLE Usuarios (Nombre TEXT NOT NULL, -> Password TEXT NOT NULL, -> Permiso INT(1), -> PRIMARY KEY(Nombre(30))); Q

RE: Advice for dataupload

2002-04-07 Thread Roger Baklund
* Hayan Al Mamoun > I have two design-identical database, one on my intranet, the other on > the internet, is there any procedure that Synchronizes the content of > two databases? Depends on what you mean with 'Synchronizes'. 'Real' synchronization, where both servers are written to and both mus

RE: Is it a bug in datetime function HOUR (now()-date_created) ?

2002-04-07 Thread Roger Baklund
* Son Nguyen > mysql> select date_created from forums; > +-+ > | date_created| > +-+ > | 2002-04-04 19:27:03 | > +-+ > 1 row in set (0.00 sec) > > mysql> SELECT CONCAT(HOUR(now()-date_created), 'H', > MINUTE(now()-date_created), '

Help restoring data with mysqlbinlog

2002-04-07 Thread balteo
Hello all, I am trying to restore some data from the binary log and I am not sure on how to proceed. I understand restoring data is a two-stage process: 1. You start by restoring data saved with mysqldump. 2. Using mysqlbinlog, you restore the data logged in the binary log from the point where

InnoDB-3.23.50 source prerelease downloadable from www.innodb.com

2002-04-07 Thread Heikki Tuuri
Hi! Since there has been a delay in the release of MySQL-3.23.50, due to problems with the gcc-3.0.4 compiler, Innobase Oy has decided to give out a source prerelease of InnoDB-3.23.50. It can be downloaded from http://www.innodb.com. SHOW CREATE TABLE or mysqldump do not list the FOREIGN KEYs

Advice for dataupload

2002-04-07 Thread Hayan Al Mamoun
Dear all, I have two design-identical database, one on my intranet, the other on the internet, is there any procedure that Synchronizes the content of two databases? I'm using PHP applications and MySQL Database, WindowsNT4 IIS Please advice Best Regards Hayan -

Re: Table crash!

2002-04-07 Thread Aleš Perme
- Original Message - From: "Martin Mokrejs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, April 05, 2002 10:41 PM Subject: Table crash! > Don't do this when the table is in the cache! > > The correct way (open two xterms and do commands in this order): >