Re: Engine Type

2005-07-13 Thread Michael Louie Loria
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 [EMAIL PROTECTED] wrote: > I think either table engine would be OK but InnoDB has some good extra > features and is the default in recent versions of MySQL so I would go > with that. > > Now about your connection problem > > You need to chec

Re: how to update a mysql table from access

2005-07-13 Thread mos
At 09:32 PM 7/13/2005, you wrote: you mean like in a script? the windows computer runs access, which i am not very familiar with and was able to accomplish what i have done so far by lots o' docs at the mysql.com site. sorry for the newbie-ness of this question. i am somewhat familliar with pyth

RE: Engine Type

2005-07-13 Thread jbonnett
I think either table engine would be OK but InnoDB has some good extra features and is the default in recent versions of MySQL so I would go with that. Now about your connection problem You need to check the following things in this order. Can you get to the server machine on the network? Pi

Re: Split a table?

2005-07-13 Thread Atle Veka
Depends on how your table is designed. You could do an 'INSERT INTO .. SELECT FROM ..' with a WHERE/ORDER BY/LIMIT combo (switch the ORDER BY for each new table). It would be probably easiest if you have an AUTO_INCREMENT field.. Atle - Flying Crocodile Inc, Unix Systems Administrator On Tue, 1

Re: how to update a mysql table from access

2005-07-13 Thread nephish
you mean like in a script? the windows computer runs access, which i am not very familiar with and was able to accomplish what i have done so far by lots o' docs at the mysql.com site. sorry for the newbie-ness of this question. i am somewhat familliar with python, maybe there is a module i can

Re: how to update a mysql table from access

2005-07-13 Thread mos
At 08:51 PM 7/13/2005, you wrote: Hey there, thanks to some help i have received right here, i have been able to access a mysql database on a linux computer from MS access on a windows computer, i was able to connect and create the tables and export all rows correctly.. i used MyODBC from mysql.

Re: Best way to store these data?

2005-07-13 Thread Mir Islam
You did not say what these data would be used for. Will there be heavy reads? What is the time requirement for each query? Proper way to do this would be by having three different normalized tables. State: state_id PK state_name County: county_id (either abbreviate or create unique numeric id)

how to update a mysql table from access

2005-07-13 Thread nephish
Hey there, thanks to some help i have received right here, i have been able to access a mysql database on a linux computer from MS access on a windows computer, i was able to connect and create the tables and export all rows correctly.. i used MyODBC from mysql. ok, here is the deal, the access d

Re: Engine Type

2005-07-13 Thread Michael Louie Loria
-- I don't quite understand your question. I assume you are interested in the MySQL database engine. The latest production version of MySQL should be fine for this, running on suitable hardware. The server would not actually be VB6 but I assume you mean that there may be some head office clients w

Best way to store these data?

2005-07-13 Thread Laszlo Antal
Hi, I need to store all 50 states and there county + zip in mysql. What is the best way to do it? Should I just put them in to one table and use the states row for primary Id? or Put every state in separate table and use the zip row for primary Id? Which would be faster to find a county? The ma

RE: Engine Type

2005-07-13 Thread jbonnett
I don't quite understand your question. I assume you are interested in the MySQL database engine. The latest production version of MySQL should be fine for this, running on suitable hardware. The server would not actually be VB6 but I assume you mean that there may be some head office clients writ

RE: Getting first and last day of week

2005-07-13 Thread John Trammell
How about "adddate(20050101, INTERVAL 7*23 DAY)" for getting a date in week 23? > -Original Message- > From: Eric Jensen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 4:29 PM > To: mysql@lists.mysql.com > Subject: Re: Getting first and last day of week > > John Trammell wrot

Re: Getting first and last day of week

2005-07-13 Thread Eric Jensen
John Trammell wrote: >>Playing around with the date/time functions, I came up with: >> >>select subdate(now(), INTERVAL weekday(now()) DAY); >>select adddate(now(), INTERVAL 6-weekday(now()) DAY); >> >>So once you have a date in the desired week, it's easy to calculate the >>first/last days in th

Re: Mysql crash due to page corruptions

2005-07-13 Thread Eric Bergen
Please upgrade to the newest 4.0 mysql binaries. Anil wrote: Hi, We are using mysql 4.0.20 on RHEL3.0 with circular replication setup A ->B ->C ->A . A is the master and all operations will be happening on A. We are facing frequent mysql crash on Master with page corruption errors. How to

Re: Myisamchk on really large tables.

2005-07-13 Thread Gleb Paharenko
Hello. Check if the speed of recovering changes if you run myisamchk with -n option among other parameters to force using sort recovery. However, it requires a lot of disk space. See: http://dev.mysql.com/doc/mysql/en/myisamchk-repair-options.html I guess it might help because this varia

Re: Databases in a different location than the default

2005-07-13 Thread gerald_clark
Tim Holmes wrote: [Tim Holmes] Gleb, et. al. As you suggested, I have checked out the log files and this is what I have found: 050713 11:00:09 mysqld started 050713 11:00:09 [Warning] Asked for 196608 thread stack, but got 126976 050713 11:00:09 [ERROR] Can't start server: Bind on TCP/IP p

RE: Getting first and last day of week

2005-07-13 Thread John Trammell
Playing around with the date/time functions, I came up with: select subdate(now(), INTERVAL weekday(now()) DAY); select adddate(now(), INTERVAL 6-weekday(now()) DAY); So once you have a date in the desired week, it's easy to calculate the first/last days in that calendar week. > -Original Me

Getting first and last day of week

2005-07-13 Thread Eric Jensen
Is there an easy way of finding the first and last day of a week? I'm looping through week numbers, I.E. 2005-06-12 is week 23, but for display I would like to know the first and last day of that week. I usually just loop through some days and find them myself, but I am curious to know if there i

Mysql crash due to page corruptions

2005-07-13 Thread Anil
Hi, We are using mysql 4.0.20 on RHEL3.0 with circular replication setup A ->B ->C ->A . A is the master and all operations will be happening on A. We are facing frequent mysql crash on Master with page corruption errors. How to identify which process is causing this page corruption. After res

RE: Timestamp problem.

2005-07-13 Thread John Trammell
If you run the select "SELECT NOW() + 1*RAND();" a few times, you'll see that not all values are valid timestamps, e.g.: mysql> SELECT NOW() + 1*RAND(); +--+ | NOW() + 1*RAND() | +--+ | 20050713112881 | +--+ 1 row in set

RE: Databases in a different location than the default

2005-07-13 Thread Tim Holmes
> Hello. > > You could find the clues in the error log. See: > > http://dev.mysql.com/doc/mysql/en/error-log.html > > Good Afternoon: > > >I have rebuilt by web / database server from bare metal this morning. > >The computer is running Fedora Core 3, and is fully patched and up to > >dat

Re: Databases in a different location than the default

2005-07-13 Thread Joerg Bruehe
Hi Tim, all! Tim Holmes wrote: [[...]] My databases are located on a different physical machine from the one running the database server - (for backup etc reasons) IMO, this is a "no-no": You add complexity and (potential) bottlenecks to your setup. You should store your data local to the

Re: how to avoid precision problem w/o switching to double?

2005-07-13 Thread Joerg Bruehe
Hi! Gleb Paharenko wrote ((re-ordered)): Jacek Becla <[EMAIL PROTECTED]> wrote: Hi, I'm having problems with floats while doing comparisons. create table fff (x float); create table ddd (x double); insert into fff (0.1); insert into ddd (0.1); "select * from ddd where x = 0.1" correctly ret

re: mysql 5.07 results incorrect, mysql 5.0.6 results correct

2005-07-13 Thread SGreen
replies embedded James Black <[EMAIL PROTECTED]> wrote on 07/13/2005 10:03:09 AM: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > If I run the first query on mysql 5.0.6 the results are correct, I get > 142 rows, if I run it on 5.0.7 I get 8 rows back. > > If I remove the nested selec

Re: myisam or innodb (chestnut)

2005-07-13 Thread tony
On Wed, 2005-07-13 at 15:02 +0100, zzapper wrote: > Is myisam still dominant for web applications? depends on your application, if you're running a bulliten board or a simple catalogue site, then myisam is a good choice as it is faster. However for an ecommerce site i would definately go for inn

myisam or innodb (chestnut)

2005-07-13 Thread zzapper
Hi, I created the "same" database on two different servers (with different versions of mysql). I found one db had been created as innodb and the myisam without me "apparently" having a say in the matter. I've Googled and found that Innodb has record locking, roll back, but that MYISAM is quick

re: mysql 5.07 results incorrect, mysql 5.0.6 results correct

2005-07-13 Thread James Black
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If I run the first query on mysql 5.0.6 the results are correct, I get 142 rows, if I run it on 5.0.7 I get 8 rows back. If I remove the nested select, as shown in the second query, then it works fine on 5.0.7. I am trying to understand what is going

Re: Avoiding complex mysql selects

2005-07-13 Thread zzapper
On Wed, 13 Jul 2005 09:24:20 -0400, wrote: >Create a full text index that encompasses the fields you want to >search in (synopsis, title, keywords). > >Then format your select to take advantage of the full text index: >select * from dbname where match(synopsis, title, keywords) against >('wor

Re: Engine Type

2005-07-13 Thread SGreen
Michael Louie Loria <[EMAIL PROTECTED]> wrote on 07/13/2005 06:42:45 AM: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > I would like to ask what is the best type of engine > for this project I > will take > > Payroll and Daily Time Record system > > - - > Payroll system is located in

Myisamchk on really large tables.

2005-07-13 Thread RV Tec
Folks, We are going through a nasty problem, and I hope you guys can help me out. We are running a couple of MySQL 4.0.25 at 2 OpenBSD Opteron (246, 2GB RAM, 36GB RAID-1 15K), and for backup purposes, 1 Linux CentOS 4.0 Pentium 4 (3GHz, 1GB RAM, 80GB SATA 10K). They are all connected through

Timestamp problem.

2005-07-13 Thread Antonio Gulli
I have the following part in a schema describe feeds . | pubdate | timestamp| YES | | CURRENT_TIMESTAMP | | show create table feeds; `pubdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, when i make an INSERT INTO feeds(,

Re: Avoiding complex mysql selects

2005-07-13 Thread Brent Baisley
Create a full text index that encompasses the fields you want to search in (synopsis, title, keywords). Then format your select to take advantage of the full text index: select * from dbname where match(synopsis, title, keywords) against ('word1 word2 "phrase one" etc' in boolean mode) You

RE: Null & alphabetic order

2005-07-13 Thread Mark Leith
> -Original Message- > From: Michael Stassen [mailto:[EMAIL PROTECTED] > Sent: 13 July 2005 13:38 > To: Scott Hamm > Cc: 'Mysql ' > Subject: Re: Null & alphabetic order > > Scott Hamm wrote: > > > How do I use ORDER BY in a way that it list null last after > Z instead > > of before

Re: Null & alphabetic order

2005-07-13 Thread Michael Stassen
Scott Hamm wrote: How do I use ORDER BY in a way that it list null last after Z instead of before A? I.e. instead of: Null, A, B, C result would be: X, Y, Z, null How can I get around to that? Something like ORDER BY IF(col IS NULL, 1, 0), col Michael -- MySQL General Mailing L

Re: Mixing conditions with NOT BETWEEN

2005-07-13 Thread Michael Stassen
Евгений Косов wrote: NOW() BETWEEN sale_start AND sale_end is equivalent to sale_start <= NOW() AND sale_end >= NOW() NOT(A AND B) is equivalent to (NOT A OR NOT B), so "NOW() NOT BETWEEN ..." is equivalent to "sale_start > NOW() OR sale_end < NOW()". Can sale_start be greater than N

Null & alphabetic order

2005-07-13 Thread Scott Hamm
How do I use ORDER BY in a way that it list null last after Z instead of before A? I.e. instead of: Null, A, B, C result would be: X, Y, Z, null How can I get around to that? -- Power to people, Linux is here.

Re: Conditions in selects

2005-07-13 Thread Michael Stassen
zzapper wrote: On Wed, 13 Jul 2005 00:34:15 -0400, wrote: Scott Haneda wrote: I can not get this to work how I would think it should be formatted: SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') That seems to work just fine It should, as that is correct syntax, as documented

Re: Mixing conditions with NOT BETWEEN

2005-07-13 Thread Евгений Косов
NOW() BETWEEN sale_start AND sale_end is equivalent to sale_start <= NOW() AND sale_end >= NOW() NOT(A AND B) is equivalent to (NOT A OR NOT B), so "NOW() NOT BETWEEN ..." is equivalent to "sale_start > NOW() OR sale_end < NOW()". Can sale_start be greater than NOW() in your data? If

slow queries

2005-07-13 Thread tony
Hi, I have a query that keeps coming up in my slow queries log. The whole database is innodb and i'm using mysql 4.1.11 on 64bit intel running red hat linux. There are less than 100 rows in the offending table at anyone time, and the server load rarely creeps up above 0.5 If i try to manually ins

Engine Type

2005-07-13 Thread Michael Louie Loria
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 I would like to ask what is the best type of engine for this project I will take Payroll and Daily Time Record system - - Payroll system is located in the head office (server). Daily Time Record is located in all 10 branches (clients). The connect

Re: how to avoid precision problem w/o switching to double?

2005-07-13 Thread Gleb Paharenko
Hello. If the space is so important to you, what do you think about 'LIKE' operator? It seems to work corectly and it is able to use indexes. See: create table fff (x float, key(x)); insert into fff values(0.1); insert into fff values(0.11); select

Re: Conditions in selects

2005-07-13 Thread zzapper
On Wed, 13 Jul 2005 00:34:15 -0400, wrote: >Scott Haneda wrote: >> I can not get this to work how I would think it should be formatted: >> SELECT IF(NOW() BETWEEN sale_start AND sale_end, 'yes', 'no') >> That seems to work just fine > >It should, as that is correct syntax, as documented in the ma

Re: repair table (error 27)

2005-07-13 Thread Gleb Paharenko
Hello. > | eps4.inmail | repair | warning | Can't change size of indexfile, error: 27 As of MySQL 4.0.2, there is a USE_FRM mode for REPAIR TABLE. Use it if the .MYI index file's header is corrupted. See: http://dev.mysql.com/doc/mysql/en/repair-table.html Dirk Vleugels <[EMA

Re: "tracing" connections to mysql.

2005-07-13 Thread Gleb Paharenko
Hello. I don't remember any built-in capability of MySQL to provide such information. But it seems as not a difficult task to write a script which will gather it. "todd hewett" <[EMAIL PROTECTED]> wrote: > Thanks Gleb, > > That was educational. > > Is there a way to log connecti

Re: Searchable/Sortable Encrypted Fields in MySQL?

2005-07-13 Thread Gleb Paharenko
Hello. Where are you going to store the key? You could use subqueries for manipulations with encrypted data. Here is the example, however, you should turn of binary logging, because insert statements are being stored with key. create table pwd(id int auto_increment, pass char(100), prima

Re: Databases in a different location than the default

2005-07-13 Thread Gleb Paharenko
Hello. You could find the clues in the error log. See: http://dev.mysql.com/doc/mysql/en/error-log.html Good Afternoon: >I have rebuilt by web / database server from bare metal this morning. >The computer is running Fedora Core 3, and is fully patched and up to

Re: /var/lib/mysql directory full

2005-07-13 Thread Gleb Paharenko
Hello. Have you been at: http://dev.mysql.com/doc/mysql/en/symbolic-links.html "Rabindra Acharya" <[EMAIL PROTECTED]> wrote: > Hi, > > Operating System: Debian > MySQL Version: 4.0.24 > > /var/lib/mysql directory, where the MySQL database lives is in the root > directory (defaul