Re: Where's my ODBC icon?

2005-02-13 Thread Andrew Pattison
The ODBC control applet in Windows can be found in two places:br
1. Control Panel.
2. Administrative Tools (if you are using Windows 2000 or XP).br
If you have Windows 2000 or XP, the easiest way to find it is to find
your Administrative Tools folder (usually you need to tweak the Start
menu to make it visible) and double click on the Data Sources (ODBC)
icon. If you have Windows XP you can also open control panel and use
the Administrative Tools icon in there.
If you don't have Windows 2000 or XP, you need to find a file called
odbccp32.cpl (or similar). If this is placed in the windows\system
directory it should be visible in Control Panel. If it is not visible,
you should use TweakUI to enable it. TweakUI is a Microsoft utility and
can be found by searching on download.com .
Cheers
Andrew.

David Blomstrom wrote:
I've checked Start  Programs very thoroughly, and I
can't find any reference to ODBC. That's what's so
weird; I can see it in Add/Remove programs.
I made a desktop shortcut icon to the system32/ODBCad
file, but all it does is open up ODBC DataSource
Administrator, which doesn't appear to be a start
program.
I uinstalled and reinstalled ODBC, hoping the start
icon would register, but nothing changed.
Thanks.
--- Peter Brawley [EMAIL PROTECTED] wrote:
 

David,
I installed ODBC before but never got a chance to
do
much with it before my computer crashed. But I
could
have sworn there was a simple icon that I clicked
to
start it, just like a normal software program.
My recollection is that ODBC installation normally
adds ODBCAdmin to 
the Start Menu, so it's probably there somewhere,
but if you want a 
desktop icon for ODBC Administrator, right click on
it in Windows 
Explorer and select 'Create a Shortcut'.

PB
David Blomstrom wrote:
   

--- Neculai Macarie [EMAIL PROTECTED] wrote:

 

I just installed MySQL's ODBC program, but I
 

can't
   

figure out how to launch it. I see no reference
 

to
   

ODBC when I go to Start  Programs. The only
 

thing
   

resembling an executable icon I can find is in my
Add/Remove programs directory. I did a Windows


 

search
  

   

and found many files named ODBC, most of them in
Windows/Prefetch and Windows/system32, but none
 

of
   

them appear to be executable programs.
I posted a message on MySQL's ODBC forum but


 

haven't
  

   

received any replies. Does anyone know of a way
 

to
   

locate ODBC's executable file and create a
 

desktop
   

icon?


 

I think the path is to configure ODBC datasources:
%SystemRoot%\system32\odbcad32.exe
There isn't a MySQL ODBC executable as far as I
know.
--
mack /
  

   

OK, I found it there...but how do you start it?
 

Double
   

clicking it just brings up all sorts of information
and choices.
I installed ODBC before but never got a chance to
 

do
   

much with it before my computer crashed. But I
 

could
   

have sworn there was a simple icon that I clicked
 

to
   

start it, just like a normal software program.
Thanks.

		
__ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 


 

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.7 - Release
Date: 2/10/2005
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:   

   

http://lists.mysql.com/[EMAIL PROTECTED]
 

   


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

 

--
Andrew Pattison
mail at apattison.plus.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Where's my ODBC icon?

2005-02-13 Thread Andrew Pattison
However, when I double-clicked odbccp32.cpl, I was rewarded with 
something similar to what I got before.

Not sure what you are looking for then. The myODBC driver should not need 
configuring, beyond setting up data sources, which is exactly what the control 
panel applet does for you. There is no program to launch - you configure a data 
source to allow you to access data, then use your ODBC-capable program to 
connect to that data source.
Start up the ODBC applet and change to the System DSN tab. Next, add a new 
data source which uses the myODBC driver to connect to the database you want to access 
via ODBC. Once you have done this, you can then connect to the data source from your 
ODBC-capable program using the name of the data source.
Cheers
Andrew.
David Blomstrom wrote:
--- Andrew Pattison [EMAIL PROTECTED] wrote:
 

The ODBC control applet in Windows can be found in
two places:br
1. Control Panel.
2. Administrative Tools (if you are using Windows
2000 or XP).br
If you have Windows 2000 or XP, the easiest way to
find it is to find
your Administrative Tools folder (usually you need
to tweak the Start
menu to make it visible) and double click on the
Data Sources (ODBC)
icon. If you have Windows XP you can also open
control panel and use
the Administrative Tools icon in there.
If you don't have Windows 2000 or XP, you need to
find a file called
odbccp32.cpl (or similar). If this is placed in the
windows\system
directory it should be visible in Control Panel. If
it is not visible,
you should use TweakUI to enable it. TweakUI is a
Microsoft utility and
can be found by searching on download.com .
   

I have Windows XP, but I couldn't find an
Administrative Tools folder, so I downloaded and
installed TweakUI. I now have an Admin Tools folder on
my desktop. I also located the file odbccp32.cpl in
the Windows/system32 folder, so I'll try to figure out
how to enable it.
However, when I double-clicked odbccp32.cpl, I was
rewarded with something similar to what I got before.
I hope there's a user-friendly program waiting at the
end of this journey! :)
Thanks for all the tips.

		
__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

 

--
Andrew Pattison
mail at apattison.plus.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MIN(foo) as bar WHERE bar50

2004-09-25 Thread Andrew Pattison
MySQL supports sub-queries in the 4.1 versions.
Cheers
Andrew.
- Original Message - 
From: Andy Bakun [EMAIL PROTECTED]
To: Laszlo Thoth [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, September 25, 2004 6:30 PM
Subject: Re: MIN(foo) as bar WHERE bar50


On Fri, 2004-09-24 at 21:31, Laszlo Thoth wrote:
Here's the kids:
mysql SELECT p.name as parent,c.name as
child,(TO_DAYS(NOW())-TO_DAYS(c.dob))/365 as age FROM people as p LEFT 
JOIN
people as c ON p.name=c.parent WHERE c.name IS NOT NULL ORDER BY p.dob;
You seem to be missing a parent child relationship from your results for
some reason.  When I run your queries, I also get a 141 year old child:
| James Smith | Samuel P  | 141.07 |
mysql SELECT p.name as parent,c.name as
child,MIN((TO_DAYS(NOW())-TO_DAYS(c.dob))/365) as minage FROM people as p 
LEFT
JOIN people as c ON p.name=c.parent WHERE c.name IS NOT NULL AND minage  
50
GROUP BY parent ORDER BY p.dob;
ERROR 1054: Unknown column 'minage' in 'where clause'

Unfortunately it doesn't look like I can SELECT on the MIN() result: I 
can only
specify which rows go into the MIN().  How can I perform this select?
Look up the HAVING clause in the mysql manual.  I believe HAVING is not
standard SQL, and is a MySQL specific addition.
  select p.name as parent,
 c.name as child,
 MIN((TO_DAYS(NOW())-TO_DAYS(c.dob))/365) as minage
from people as p left join
 people as c on p.name = c.parent
   where c.name is not null
   group by parent
- having minage  50
   order by p.dob;
I personally try to avoid using HAVING on queries where the WHERE clause
would return a lot of rows because it needs to look at every row to see
if it satisfies the HAVING condition and this can be extremely
inefficient.  But it's useful and sometimes you can't avoid using it.
Your query could also be extremely inefficient because you need to apply
the formula to calculate minage to all rows.
HAVING is essentially like making a temporary table and then selecting
from that temporary table.  I could be considered a stop-gap method of
simple subqueries to tide us over until MySQL supports sub-queries
(sometime in the 5.x timeframe, I believe).
A more efficient query might be something like this pseudo-code:
  all rows where max(dob)  date_sub(now(), interval 50 years)
which should give you similar results... the query is going to look
something like this:
 select p.name as parent,
max(c.dob) as dob_of_youngest_child
   from people p left join
people c on p.name = c.parent
  where c.name is not null
  group by parent
 having dob_of_youngest_child  date_sub(now(), interval 50 year)
This may end up being more efficient because the values being applied to
max() are constant values (from the table, and are not the result of a
formula) and date_sub(now(), interval 50 year) is also a constant
(calculated at query parse time and not for every row, and optimized
away).
Use the EXPLAIN syntax to check for efficiency.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: 
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: conflicting messages

2004-08-22 Thread Andrew Pattison
There should be a PID file somewhere - either in the MySQL directory or 
under /var - that needs to be deleted before the init script will let you 
start another server instance.

Cheers
Andrew.
- Original Message - 
From: Grant [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 21, 2004 5:57 PM
Subject: conflicting messages


I had mysql running great on my Gentoo server, but
there was some kind of a problem with my host and my
machine had to be rebooted.  I restart mysql with
/etc/init.d/mysql start (Gentoo syntax), but I'm
having some problems:
localhost / # mysqladmin test
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through
socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket:
'/var/run/mysqld/mysqld.sock' exists!
localhost / # /etc/init.d/mysql start
* WARNING:  mysql has already been started.
There is no /var/run/mysqld/mysqld.sock file, and
mysql.err doesn't have anything to say.  Can anyone
help?
- Grant

__
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: 
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: excel

2004-08-20 Thread Andrew Pattison
Two main ways:
1. Dump your tables to a file and import them using the text import filter.
2. Install MyODBC and open a connection to the MySQL tables in Excel.
Since Excel is a proprietary file format, MySQL does not support it. Also, 
bear in mind that Excel has a 65,535 row limit hard coded into it - which 
means if you want column headings you are limited to 65,534 rows.

Cheers
Andrew.
- Original Message - 
From: Scott Hamm [EMAIL PROTECTED]
To: 'Mysql ' (E-mail) [EMAIL PROTECTED]
Sent: Friday, August 20, 2004 2:53 PM
Subject: excel


How do I export from mysql into excel format?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: 
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: excel

2004-08-20 Thread Andrew Pattison
Yes, use the MyODBC driver to connect to MySQL directly from ASP.net .
Cheers
Andrew.
- Original Message - 
From: Scott Hamm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Scott Hamm [EMAIL PROTECTED]
Cc: 'Mysql ' (E-mail) [EMAIL PROTECTED]
Sent: Friday, August 20, 2004 3:03 PM
Subject: RE: excel


Hmm... I use ASP.net, is there any instruction that I can use to use 
ASP.net
to export into excel or is there another way?

-Original Message-
From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
Sent: Friday, August 20, 2004 10:02 AM
To: Scott Hamm
Cc: 'Mysql ' (E-mail)
Subject: Re: excel


 How do I export from mysql into excel format?
Directly - use SELECT INTO OUTFILE and set up as a CSV, and open in excel
Indirectly - use a programming language and library to write an Excel
binary (php or perl with spreadsheetwrite_excel)
HTH
Jeff

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: 
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: 1 day 28 min insert

2004-08-19 Thread Andrew Pattison
I'm guessing that you have indexes on the 321st_stat table? If this is the 
case, try dropping them before you do the insert, then rebuilding them. 
MySQL is known to be slow at doing bulk inserts on indexed tables. Also, 
updates are much faster than inserts since with inserts there are much more 
disk IOs required.

Cheers
Andrew.
- Original Message - 
From: matt ryan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 19, 2004 5:06 PM
Subject: 1 day 28 min insert


I think oracle parallel query is calling me
110,832,565 stat records
77,269,086 on weekly update, I get small daily files, but daily sql's dont 
work very well, and miss records, in this case it missed 563 records.

mysql update stat_in set ctasc='321ST';
Query OK, 77269086 rows affected (24 min 17.60 sec)
Rows matched: 77269086  Changed: 77269086  Warnings: 0
mysql insert ignore into 321st_stat select * from stat_in;
Query OK, 563 rows affected (1 day 28 min 35.95 sec)
Records: 77269086  Duplicates: 77268523  Warnings: 0
I just cant deal with speeds this slow, an insert onto a table with a 
primary key that tosses out almost all records shouldnt take this long to 
do

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: 
http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: subquery problem.

2004-07-22 Thread Andrew Pattison
Subqueries aren't implemented in 4.0 - only 4.1 and upwards support
subqueries.

Cheers

Andrew.

- Original Message - 
From: nambi c [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 10:31 PM
Subject: subquery problem.


 Hi,

 My server version :  4.0.18-max-nt

 I have created 2 tables 'channels' and 'users' in my
 database. I can query these tables individually. I am
 trying to execute a query with 'exists' clause.

 mysql select * from channels where exists (select *
 from users);

 This give the following error.

 ERROR 1064: You have an error in your SQL syntax.
 Check the manual that corresp
 onds to your MySQL server version for the right syntax
 to use near 'exists (sele
 ct * from users)' at line 1


 I am getting this syntax error message. The query
 seems perfect to me. Any clue what is happening? Help!

 -Nambi




 __
 Do you Yahoo!?
 Yahoo! Mail is new and improved - Check it out!
 http://promotions.yahoo.com/new_mail

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: restore from mysqldump file

2004-07-03 Thread Andrew Pattison
To do the restore:

1. Stop the MySQL server. On Windows NT/2000/XP you should use the command
net stop mysql assuming you have installed MySQL as a service. On
Unix/Linux, if you installed the init script, simply issue a command
something like /etc/rc.d/init.d/mysql stop or
/etc/rc.d/init.d/mysql-server stop.
2. Start the MySQL server by skipping the grant tables::
   mysqld-nt --skip-grant  or
mysqld_safe --skip-grant-tables
3. If everything goes to plan, the command prompt will *not* return. Open a
new command prompt and load the data in using the MySQL client:
mysql  sql71.sql.
4. Type mysql and in the MySQL client type flush tables to flush the
data you just imported to disk.
5. Kill the MySQL server and restart it as you would normally.

Be aware that it is not normally recommended to drop the mysql database
since if you make a mistake you will have to recreate your security settings
by hand. You should probably try restoring the MySQL database using this
procedure on another system, then verify that the tables have been restored
correctly before running it on your main box, particularly if you really
need this to work (it sounds like you do!)

Also, if you did not delete the test database after you installed MySQL
*before* you did the backup, you will need to issue the command drop
database test; as well otherwise MySQL will choke there too.

HTH

Andrew.


- Original Message - 
From: Chuck Barnett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 03, 2004 2:58 AM
Subject: restore from mysqldump file


 Hello, I have a huge problem that you guys may be able to help me with.

 I did a mysqldump   all databases into a sql71.sql file.

 when I try and I get the following error when trying to restore

 ERROR 1050 at line 204528: Table 'columns_priv' already exists

 I'm sure that this is for the mysql database.

 Im doing this to restore
 mysql --user=root -p  sql71.sql

 please give me some help on thisthe .sql file is 170+megs in size.


 Thanks,
 Chuck

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: intel vs sparc?

2004-07-03 Thread Andrew Pattison
What other processes are running on the Solaris box? Solaris tends to favour
giving each process a fair share of the processor rather than getting one
process (e.g. MySQL) to complete as quick as possible. I suspect that if you
compared the time taken for much larger queries on the Solaris machine you
would find that it performs better relative to the Linux box. Also, Solaris
will be much less agressive in keeping your table cached in memory than
Linux is, particularly if there are a lot of other jobs running on it.

That is my analysis of this type of problem having tested MySQL under
Solaris 9 on an AMD box versus the Linux version on the same machine. I may
be talking jibberish however!

Cheers

Andrew.

- Original Message - 
From: mac [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 03, 2004 3:10 PM
Subject: Re: intel vs sparc?


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 hi bas,

  You did not provide details on your harddisk in your message, you
  might want to know that
  MySQL performance is highly related to your diskconfiguration. If you
  want to speed it up you could do a softwareraid 0 over as much disks
  that fit in your machine. And also consider disks with a good cache.

 the sparcs are a litte different in case of harddisk's:
 the V480 does have a veritas-fs-mountpoint with a symmetrix in
 background - i asume that is pretty fast, because it was originally
 focused on oracle.
 the enterprise does have no raid's and really simple scsi-drives (a
 litte old you know ;-)

 in comparison we have raid5 with scsi-disks and this
 cciss-compac-controller.


 so you suggest that there is a huge point in harddisk.
 i might have to run a view benchmark tests directly on the disks to see
 the thrououtput in reading data(-junks).


 the only thing that bothers me is: why should the harddisk be such a
 big impact if i am using an index and _not_ selecting all data (in
 fact: the select brings only a view hundred rows up).

 but i try to figure out if there is a difference in reading between the
 sparcs and the intel.


 thanks for the hint
 mac


  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  hi there,
 
  hope this haven't been discussed in that kind of detail in older
  topics:
 
  the facts in short:
  - - we have the same mysql-version (4.0.18) for an intel-machine and a
  sparc-machine.
  - - we have a table with about 5,500,000 rows
  - - we do a realtivly simple select on a varchar-50-field (with an
  index of course)
  - - the statement takes 4s on the intel- and 24s on the sparc-machine
  - - we played around with some caching-features on the sparc-side but
  there was no significant increase of speed
 
  the hardware:
  sparc:
Sun Fire V480
4 x UltraSPARC III Cu Processor 900 MHz
16GM RAM
 
  intel:
Compaq DL380R02
2 x Pentium III 1.1 GHz
4 GB RAM
 
  the installation on the sparc was done with a precompiled version. the
  intel-one was compiled by our self (but no special configue-options).
 
  we also ensured that the index on the sparc side is in good shape.
  we also tested it with the same setup on an older enterprise 450 - same
  bade timing.
 
  if you need more detail i can deliver them.
  but i am more interested in a general question:
 
  does the speed of mysql depends more on things like the processor than
  other resources?
  if so: what kind of general suggestions can be made about using
  select-statements on huge tables to be fast over different platforms?
 
  i am also aware of the hints about not using to huge logtables for
  statistical output rather then creating small statistic tables.
  this is something we will do, but we also need sort of guidelines for
  future projects.
 
  thanks in advance for your suggestions.
 
  with regards
  mac
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.2.3 (Darwin)
 
  iD8DBQFA5YJVvkHn/oGTPXURApvwAKDBBcLtRH+S1+tBLsrFNmimtSki+gCgkQA6
  MEQxsqwYzRjQx+lN+epJtao=
  =2VNS
  -END PGP SIGNATURE-
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.3 (Darwin)

 iD8DBQFA5r5jvkHn/oGTPXURAogvAJ9Vccf97+qCYiMesMYA/CV3q0zYAwCeOpiW
 zdYgBw/A9TrJATEZBx/yRzU=
 =E2Ck
 -END PGP SIGNATURE-


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: INTEL vs. SPARC

2004-07-02 Thread Andrew Pattison
Are you running Linux or Solaris on these servers?

Andrew.

- Original Message - 
From: mac [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 02, 2004 4:42 PM
Subject: INTEL vs. SPARC


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 hi there,

 hope this haven't been discussed in that kind of detail in older topics:

 the facts in short:
 - - we have the same mysql-version (4.0.18) for an intel-machine and a
 sparc-machine.
 - - we have a table with about 5,500,000 rows
 - - we do a realtivly simple select on a varchar-50-field (with an
 index of course)
 - - the statement takes 4s on the intel- and 24s on the sparc-machine
 - - we played around with some caching-features on the sparc-side but
 there was no significant increase of speed

 the hardware:
 sparc:
   Sun Fire V480
   4 x UltraSPARC III Cu Processor 900 MHz
   16GM RAM

 intel:
   Compaq DL380R02
   2 x Pentium III 1.1 GHz
   4 GB RAM

 the installation on the sparc was done with a precompiled version. the
 intel-one was compiled by our self (but no special configue-options).


 we also ensured that the index on the sparc side is in good shape.
 we also tested it with the same setup on an older enterprise 450 - same
 bade timing.


 if you need more detail i can deliver them.
 but i am more interested in a general question:

 does the speed of mysql depends more on things like the processor than
 other resources?
 if so: what kind of general suggestions can be made about using
 select-statements on huge tables to be fast over different platforms?

 i am also aware of the hints about not using to huge logtables for
 statistical output rather then creating small statistic tables.
 this is something we will do, but we also need sort of guidelines for
 future projects.


 thanks in advance for your suggestions.

 with regards
 mac
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.3 (Darwin)

 iD8DBQFA5YJVvkHn/oGTPXURApvwAKDBBcLtRH+S1+tBLsrFNmimtSki+gCgkQA6
 MEQxsqwYzRjQx+lN+epJtao=
 =2VNS
 -END PGP SIGNATURE-


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: debug

2004-06-30 Thread Andrew Pattison
The way I do this is within PHP is to echo the value stored in mysql_error
after each SQL statement. If you're not using PHP then this probably doesn't
help though ;-)

Cheers

Andrew.

- Original Message - 
From: Bob Lockie [EMAIL PROTECTED]
To: MySQL Mailing List [EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 3:38 PM
Subject: debug


 I'm running a ton of sql statements to load data.

 Is there a way to not display successes:
 Query OK, 1 row affected (0.02 sec)
 Records: 1  Duplicates: 0  Warnings: 0

 and display failures and the query statement that failed?

 There are 60 000+ of these and I'd ideally like to debug the inserts
 without actually doing them.

 It fails on duplicate keys but I have no idea where the data is flawed.

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Minitoring mysqld process activities

2004-06-30 Thread Andrew Pattison
I've not seen this on MySQL but under Informix 7.24 on Solaris 2.6 I noticed
a similar problem when doing a lot of number crunching and transaction
logging was turned on. If you are running with transaction logging switched
on then you might want to try turning it off. For some reason the database
seems to get backed up writing to the log and this stalls everything else on
the system, iowait figures go sky-high and I can only stop the process by
doing 'kill -9 pid.

Cheers

Andrew.

- Original Message - 
From: Victor Pendleton [EMAIL PROTECTED]
To: 'Mohammad shojatalab ' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 7:27 PM
Subject: RE: Minitoring mysqld process activities


 Have you checked the slow query log and the error log?

 -Original Message-
 From: Mohammad shojatalab
 To: [EMAIL PROTECTED]
 Sent: 6/30/04 11:58 AM
 Subject: Minitoring mysqld process activities

 Hi all,

 I'm running a small database as backend of a relatively quiet website,
 This is the version Im running:
 mysql  Ver 11.15 Distrib 3.23.47, for dec-osf5.1 (alphaev6)

 yesterday for the first time, mysql process response time dropped
 significantly and when I monitored running processes I realized that
 mysql process is very busy, utilizing %95 of CPU time,
 and I was unable to refresh or reload,... so I shut it down and restart
 it and everything works fine again.

 I was wondering If there is a way to monitor what mysql process is doing

 at anytime 


 Thanks in advanced for your answers.

 Regards
 Mohammad


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Replication corruption and 64 bit mysql

2004-06-30 Thread Andrew Pattison
I've a funny feeling the kernel authors re-wrote much of the SMP code for
2.6 with the aim of getting it to scale better to 8 processor systems, so I
would expect there to be a few stray bugs in it. You could always downgrade
to 2.4 if it doesn't work out ;-)

Cheers

Andrew.

- Original Message - 
From: Matthew Kent [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 6:08 PM
Subject: RE: Replication corruption and 64 bit mysql


For the record/list archives,

The solution seems to have been upgrading to Fedora Core 2
kernel-smp-2.6.6-1.435.x86_64.rpm. What fix it contained that affected
my case... I'm not sure :)

Been running okay for 18 hours at high volume!

- Matt

 -Original Message-
 From: Matthew Kent
 Sent: Monday, June 28, 2004 4:11 PM
 To: [EMAIL PROTECTED]
 Subject: Replication corruption and 64 bit mysql

 After several long days trying to fix this I'm running out of ideas.

 Master: RedHat 7.3 kernel 2.4, MySQL 4.0.20 32 bit (mysql.com rpm) -
 Slave: Fedora Core 2 64 bit kernel 2.6.5, MySQL-Max-4.0.20-0 64 bit
 (mysql.com rpm)

 In a varying amount of time after a few hundred thousand queries
 replication dies with

 snippy
 040625 16:19:12  Error in Log_event::read_log_event(): 'Event too
 small', data_len: 0, event_type: 0
 040625 16:19:12  Error reading relay log event: slave SQL thread
 aborted
 because of I/O error
 /snipped

 Using instructions from Sasha Pachev
 http://groups.google.ca/groups?hl=enlr=ie=UTF-
 8selm=c400pk%245pd%241%
 40FreeBSD.csie.NCTU.edu.tw I've looked at the binlog on the slave and
 can indeed verify a large chunk of empty space and that query is
 indeed
 logged on the master.

 Fun part is that it does work when I point our 32 bit master to
 different 32 bit slave. So I know it's not a problem with our old
 servers, just this fancy new one.

 So far I've

 - Tried a different master (we have a pool of 5 similar servers to use
 as a master).
 - Tried 32-bit server instead of 64-bit Max on the slave (couldn't get
 64 bit non-Max to start at all, would just dump).
 - Tried swapping nic to a different brand.
 - Used tcpdump to attempt to spot any network level issues.
 - Tried pointing the binlogs on the master to another local disk
 separate from the data.
 - Examined the changelogs for the nic drivers.
 - Googled this to no end.

 With no luck.

 I'm open for suggestions.

 I suppose the next step is to install core 2 32-bit and try again.

 Thanks,

 Matthew Kent \ SA \ bravenet.com \ 1-250-954-3203 ext 108

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Production release of MySql 4.1

2004-06-30 Thread Andrew Pattison
I saw reference somewhere (I believe it was either an Apache or PHP
discussion) to 4.1.3 being beta but I'm not sure if this was just wishful
thinking on the part of those particular developers. If this is the case
then going by the dates of previous releases in the 4.1 branch (not always a
good guide) then 4.1 will go beta somewhere around the period November 2004
to February 2005.

How long was 4.0 is alpha? I seem to recall it was more than 6 months. Are
you able to run 4.1 in some sort of test environment to see how it performs
for you? You may find it works well enough to deploy right now, you may not.
A major bug for one guy may not affect you at all - it could be platform
specific or affect a feature you don't use.

Cheers

Andrew.

- Original Message - 
From: Jon Frisby [EMAIL PROTECTED]
To: 'Jonathan Soong' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 30, 2004 10:09 PM
Subject: RE: Production release of MySql 4.1


 As I understand it, the particular cycle a release is in depends on how
long
 it's been since a major bug was reported.  So an alpha becomes a beta if
 nobody reports a major bug after N days, and a beta becomes a production
 release if goes N days without a major bug report.  Thus, even if 4.1.3 is
 released as alpha, it could retroactively be declared beta, and then even
 release -- although that's pretty unlikely.  The long and short of it
 though, is that nobody can tell you how long until 4.1 will go beta.

 -JF

  -Original Message-
  From: Jonathan Soong [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, June 29, 2004 7:20 PM
  To: Jocelyn Fournier
  Cc: John Murphy; Emmanuel van der Meulen; [EMAIL PROTECTED]
  Subject: Re: Production release of MySql 4.1
 
  Jocelyn Fournier wrote:
   Hi,
  
   AFAIK 4.1.3 should be beta.
  
 
  It is a little frustrating,
 
  at Linux Conf Adelaide 2004 (January), the Mysql guy there
  said that 4.1
  would be in beta, in the next few weeks ...
 
  Its now July and its still in Alpha.
 
  It says on the webpage MySQL 4.1 -- Alpha release (use this for new
  development) - and it has said that for 6months+
 
  So we did our development on 4.1, and were expecting it to be beta by
  February 2004.
 
  We're ready to roll it out as soon as it hits beta, i told my boss it
  would be in beta by March 2004 at the latest. We now have hardware
  sitting for around with 4.1 alpha on it that cannot be deployed.
 
  Does anyone actually have a concrete date when 4.1 will go into beta?
 
  Cheers
 
  Jon
 
 
 
  -- 
  Jonathan Soong
  Information Services
  Institute of Medical and Veterinary Science (IMVS)
  Email:   [EMAIL PROTECTED]
  Web  :   http://www.imvs.sa.gov.au
  Tel  :   +61 8 82223095
  Fax  :   +61 8 82223147
 
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
 


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Performance issues

2004-06-28 Thread Andrew Pattison
By default MySQL flushes keys to disk with every INSERT, hence the
performance degredation with performing several single INSERTs one after the
other. The following extract from the MySQL documentation hints at one way
of changing this on a per-table basis:

a.. Declaring a MyISAM table with the DELAY_KEY_WRITE=1 table option makes
index updates faster because they are not flushed to disk until the table is
closed. The downside is that if something kills the server while such a
table is open, you should ensure that they are okay by running the server
with the --myisam-recover option, or by running myisamchk before restarting
the server. (However, even in this case, you should not lose anything by
using DELAY_KEY_WRITE, because the key information can always be generated
from the data rows.)

There is also a way of getting MySQL to do lazy writing of indexes on a
global basis but I couldn't find a quick reference to that.

Cheers

Andrew.

- Original Message - 
From: Jeremy Zawodny [EMAIL PROTECTED]
To: Aram Mirzadeh [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, June 28, 2004 7:24 PM
Subject: Re: Performance issues


 On Tue, Jun 22, 2004 at 01:34:39PM -0400, Aram Mirzadeh wrote:
 
  We have an internal SNMP monitoring system that is monitoring about
  10,000 devices.  Each device is pinged then pulled for about an
  average of 25-30 elements.  Each of the ping results and elements
  are then stored in text file, then another system picks them up
  (NFS) and inserts them into a MyISAM (3.23.54) database.  The data
  is kept for 13 weeks.
 
  The database system is a Xeon 4 way, 12GB of ram with a striped raid
  array dedicated to the database files and its indexes and such.
 
  Every 5 minutes another process goes through the last set of inserts
  and compares them for any threshold breaches, so the entire last set
  of data is looked at.
 
  We're falling behind on the inserts because the system can't seem to
  handle the amount of inserts, the front end that generates the web
  pages based on the previous records is dogging down.
 
  I have read the regular optimizations papers and have done as much
  as I felt safe, are there any huge database optimization papers?
  Anything I should be looking at?

 I'd consider bulking up the INSERTs, performing multi-row INSERTs
 rather than doing them one by one.  That can speed things up quite a
 bit in my experience.

 Jeremy
 -- 
 Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
 [EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

 [book] High Performance MySQL -- http://highperformancemysql.com/

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MYSQL Setup Question

2004-06-26 Thread Andrew Pattison
You are probably better setting up permissions using the GRANT statement
since this should be less prone to errors. Using the GRANT statement, you
name the permissions which you want to give the user. This means that you
are less likely to put a Y where you didn't mean to.

Use a statement like:

GRANT 'user%host' ALL ON 'database.*' IDENTIFIED BY 'password';

The '%' is used in place of an @ symbol. When connecting to the MySQL
database, your system will pass its hostname to the MySQL server. It is this
that you need to fill in as the 'host'. If you are running the server and
client on the same machine then 'localhost' will do. You need the '.*' part
so that the user can access the whole database.

The manual tells you what permissions each of your levels of access
requires.

Cheers

Andrew.

- Original Message - 
From: Leon Ellis [EMAIL PROTECTED]
To: Peter Lovatt [EMAIL PROTECTED]
Cc: MYSQL [EMAIL PROTECTED]
Sent: Saturday, June 26, 2004 11:32 AM
Subject: RE: MYSQL Setup Question


 Thanx Peter,
 But I have no tables set up yet.
 I just installed MySQL
 I'm try to set remote access (for using Dreamweaver)
 on a local network.
 I thought I had to set permission?
 a friend on the FreeBSD mailing list
 sent three different user accounts to set up:

 All Privileges(able to create DB and tables)

 Select Privilges (able to insert, update, delete
 current data)

 Read Only.
 Right now I can access MySQL with root, but I don't
 want others doing that.

 I bought a book on MySql, and have read what I thought
 was the pertinant parts of the handbook???
 I am an ASP/VBscript/Access kind of guy, and am just
 learning PHP/MySQL
 I think part of my problem is transitioning over.

 Leon


 --- Peter Lovatt [EMAIL PROTECTED] wrote:
  hi
 
  the error is because you have more or fewer items of
  data than fields or
  columns to put it in
 
  it is better practice to include fields in your
  query
 
 
  INSERT   INTO sometable
  (
  field1
  , field2
  , field3
  )
  VALUES
  (
  data
  , more data
  , even more
  );
 
  Peter
 
 
   -Original Message-
   From: Leon Ellis [mailto:[EMAIL PROTECTED]
   Sent: 26 June 2004 10:14
   To: MYSQL
   Subject: MYSQL Setup Question
  
  
   I am brand new to MySQL
   Running MYSQL 4.0.16 on FreeBSD.
   When I try to add a user, with the following code
  I
   get an error.
   INSERT INTO user
   VALUES
   ('localhost','username',password('Secret'),
   'Y','Y',...);
   I have used inwhere from 6 'Y's (Friends
   Recommendation) to 14 'y's MYSQL manual.
   I get the following error:
   Column count doesn't match value count at row 1.
   What did I do wrong.
   Thanx in advance.
   Leon
  
  
  
   __
   Do you Yahoo!?
   New and Improved Yahoo! Mail - Send 10MB messages!
   http://promotions.yahoo.com/new_mail
  
   --
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:
  http://lists.mysql.com/[EMAIL PROTECTED]
 
 
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 


 =

 Later Leon

 Wine Snob...Like Wine??

 Click here www.leonswinepage.com






 __
 Do you Yahoo!?
 Yahoo! Mail Address AutoComplete - You start. We finish.
 http://promotions.yahoo.com/new_mail

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Populating a SELECT from a database

2004-06-26 Thread Andrew Pattison
I use this method also, but I usually put a --NONE-- item in at the top of
the listbox so the user has the option of selecting none of the items in the
list. This may or may not be required for your application.

Also, you can get the select box to automatically have the value that the a
given field contains chosen from the list of items by using the 'selected'
HTML attribute. By way of an example, the function below will show a list of
filenames stored in my database and have the one that I have selected
elsewhere in the system automatically shown highlighted in the list. It also
shows how to add the '--NONE-- item a thte top of the list:

function filelist($file) {

 $result=mysql_query(SELECT ID,title,type FROM files);
 echo BR;
 echo select name=\file\option value=\0\---NONE---/option;
 if (mysql_num_rows($result)==0) {
  //no files
 } else {
  while ($row=mysql_fetch_array($result)) {
   $ID=$row[ID];
   $title=$row[title];
   $type=$row[type];
   if ($row[ID]==$file) {
echo option selected value=\$ID\ . $type .  -  . $title .
/option;
   } else {
echo option value=\$ID\ . $type .  -  . $title . /option;
   }
  }
 }
 echo /selectBR;
}

Note that unless one of the list items has the 'selected' attribute set,
then none of the items in the list will be shown as the chosen one in the
list - it will just be blank when the user opens the page.

Cheers

Andrew.

- Original Message - 
From: David Rodman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 26, 2004 6:44 AM
Subject: Populating a SELECT from a database


 Here's a way to do it with PHP:

 function field_select($table, $field)
 {$result = mysql_query(SELECT $field FROM $table) or
 die(mysql_error());
  print SELECT NAME=\ . $field . \\n;
  $limit = mysql_num_rows($result);
  for($i = 0; $i  $limit; ++$i)
  {list($value) = mysql_fetch_array($result);
   print OPTION VALUE=\ . $value . \$value/OPTION\n;
  }
  print /SELECT\n;
 }



 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: table across multiple files

2004-06-24 Thread Andrew Pattison
The standard MySQL distribution comes with InnoDB support. You can also
split tables into up to 255 blocks using MyISAMs RAID support.

Cheers

Andrew.

- Original Message - 
From: Rahul Sood [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 24, 2004 10:14 PM
Subject: table across multiple files


 I'm installing mysql 4.0 on Linux x86

 The application for which I'm using mysql requires support for splitting a
table across multiple OS files. On the mysql website I read that this can be
done with InnoDB storage engine. Does mysql 4.0 Standard version (which
includes InnoDB)  have this feature ?

 Will it be necessary to get mysql 4.0 Max version ? The website said this
version has some extra features such as Berkeley DBM and support for
splitting a table across multiple files.

 -Thanks,
 Rahul Sood
 [EMAIL PROTECTED]


 -
 Do you Yahoo!?
 New and Improved Yahoo! Mail - 100MB free storage!



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: question on auto increment field

2004-06-23 Thread Andrew Pattison
I seem to recall old versions of MySQL did re-use auto-increment values but
this was changed since it's not really supposed to do that ;-)

Cheers

Andrew.

- Original Message - 
From: Paul DuBois [EMAIL PROTECTED]
To: Joe Wong [EMAIL PROTECTED]; Egor Egorov [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 7:53 PM
Subject: Re: question on auto increment field


 At 17:33 +0800 6/23/04, Joe Wong wrote:
 Hi Egor,
 
   Thanks for your reply. In addition to this, how I can make MySQL to
reuse
 the number which has been deleted? I tried to do a test as follow

 AUTO_INCREMENT columns never automatically generate numbers that are
 less that the maximum value currently in the column.  If you want to
 reuse numbers, you'll have to handle this in your application logic.


 
 1. Create a dummy table with a auto increment field 'UID' set to MED INT
 2. Manually insert a record that set UID to Max of MED INT, ie 16777215
 3. Insert another record without specifying the value of UID
 
 At 3, it failed and said:
 Duplicate entry '16777215' for key 1
 
 But I have only 1 record in the table.
 
 Regards,
 
 - Wong
 
 
 
 - Original Message -
 From: Egor Egorov [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 23, 2004 4:10 PM
 Subject: Re: question on auto increment field
 
 
   Scott Haneda [EMAIL PROTECTED] wrote:
on 06/23/2004 12:14 AM, Joe Wong at [EMAIL PROTECTED] wrote:
   
  If it possible to limit the max value of an auto increment field
to
 say,
, and how to do it? I am using MySQL 4.0.18.
 
   No. The maximum value for the auto_increment column can be limited by
the
 maximum value of the column type(tinyint, int, mediumint etc.).
 
   
I am not sure, as a 'hack' you could simply insert a blank record
with
 the
value set to ,, once you reach that limit and try to insert
a
record, a error would be generated, no new records would be able to
be
inserted until this was resolved.
 
   It will not work, because if you insert dummy row and set
auto_increment
 value to , the next generated auto_increment value will be 1.


 -- 
 Paul DuBois, MySQL Documentation Team
 Madison, Wisconsin, USA
 MySQL AB, www.mysql.com

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: New to Dates - Plain English Please

2004-06-22 Thread Andrew Pattison
Another possible solution would be to store partial dates as, for example,
2004-05-01. In other words, simply make the partial date the same as the
first day of that month. This has the advantage that range date range
functions work, but you will not be able to tell the difference between a
partial date and a complete date.

Cheers

Andrew.

- Original Message - 
From: Michael Stassen [EMAIL PROTECTED]
To: Jochem van Dieten [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 8:30 PM
Subject: Re: New to Dates - Plain English Please



 Jochem van Dieten wrote:

  Michael Stassen wrote:
 
  Jochem van Dieten wrote:
 
  David Blomstrom wrote:
 
 
  Suppose you have a list of dates in the proper format,
  like this:
 
  2004-02-04
  2003-11-02
 
  and you encounter a date with only the month and year,
  like May 2002. How would you insert that
 
 
  Not. Prompt the user for a full date.
 
 
  That is not strictly true.
 
 
  It is what I would do, therefore it is a true answer to the question.
 
  Jochem

 Then I misunderstood you.  I took your answer to mean that you cannot
store
 dates without the day part, rather than that your advice was not to do so.
 I accept your explanation that you meant the latter, but I don't think
 that's clear from your original wording.

 Perhaps you read an accusatory tone in my choice of wording.  That was not
 my intent, and for that I apologize.

 Michael


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Views Syntax for MySQL 5

2004-06-22 Thread Andrew Pattison
Un-named views are supposed to be there already. I know this is not the
real thing, I just thought I would mention it. ;-)

Cheers

Andrew.

- Original Message - 
From: Josh Trutwin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 5:53 PM
Subject: Re: Views Syntax for MySQL 5


 On Tue, 22 Jun 2004 16:34:44 +0100
 Nic Skitt [Real Productions] [EMAIL PROTECTED] wrote:

  Hi All,
 
  I have noticed a lack of comments re Views.
 
  Is it 5.0 or 5.1 that we will have Views capability?
 
  I had hoped it was in the most up to date public development release
  of 5. Unless I am getting the Views syntax wrong I assume its not
  there.
 
  If it is not already packaged in V5.0 then will the syntax be the
  standard SQL view syntax?

 The online manual is your friend:

 http://dev.mysql.com/doc/mysql/en/index.html

 First hit for searching on views:

 http://dev.mysql.com/doc/mysql/en/ANSI_diff_Views.html

 Sounds like it will make it into the 5.0 branch, but has not yet.

 Another good link:

 http://dev.mysql.com/doc/mysql/en/Roadmap.html

 Josh


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Server Startup

2004-06-20 Thread Andrew Pattison
There is no icon. The best way to run MySQL is as a service. If you have
Windows NT, 2000 or XP you can install MySQL as a service as follows:

1. Open a command prompt.
2. change to the mysql bin directory (cd \mysql\bin).
3. type mysqld-nt --install. You should see a message saying service
installed successfully.
4. Type net start mysql to start mysql as a service.

Cheers

Andrew.

- Original Message - 
From: Andrew McHorney [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 19, 2004 11:20 PM
Subject: Server Startup


 Hello

 I installed the software. I would like to start up the server but there is
 no icon. What is the name of the executable so I can make an icon? I am
 running under Windows.

 Thanks,
 Andrew



 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: EXISTS/NOT EXISTS

2004-06-18 Thread Andrew Pattison
You are using a subquery. Subqueries are only supported in version 4.1 and
later. You will eithe rneed to rewrite your query so that it doesn't use a
subquery, or upgrade.

Cheers

Andrew.

- Original Message - 
From: Anton Ivanov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 18, 2004 10:16 PM
Subject: EXISTS/NOT EXISTS


Hi,  I'm trying to figure out how to apply these from the manual, but to
no avail.  Is it possible that my version (4.0.18) does not implement
these?
I have two tables: products and products_by_product_area.  Both have a
field product.  I try

SELECT product from products WHERE NOT EXISTS (SELECT DISTINCT * from
products_by_product_areas WHERE products_by_product_areas.product =
products.product);

Both of these queries run fine on their own.  It looks to me that I'm
simply adapting from the manual, but all I get is

ERROR 1064: You have an error in your SQL syntax.  Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'EXISTS (SELECT DISTINCT * from products_by_product_areas WHERE

OK, so I grab the example verbatim from the manual:
SELECT DISTINCT store_type FROM Stores
  WHERE EXISTS (SELECT * FROM Cities_Stores
WHERE Cities_Stores.store_type = Stores.store_type);

And run it.  Same error.  Never mind that I don't have these tables: the
query does not compile.  What is going on?




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Fw: 4.0.20 for Windows - WHEN???

2004-05-30 Thread Andrew Pattison

 Anyone know when we can expect 4.0.20 for Windows?
 
 Also, is there a timescale for a beta version of 4.1?
 
 Cheers
 
 Andrew P.
 
 Andrew Pattison
 mail at apattison.plus.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Fw: Problem deleting data

2003-10-01 Thread Andrew Pattison

- Original Message - 
From: Andrew Pattison [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 12:02 PM
Subject: Problem deleting data


 I have a strange problem with MySQL 4.0.15 . When I delete an entire
table,
 then run a repair on that table, it recovers all the rows which I just
 deleted! Also, if I do a check table I can see that the files on disk do
 not appear to have been altered in any way by the delete. Does anyone have
 any clues as to what is going on here?

 Thanks

 Andrew P.

 Andrew Pattison, IT Support
 Sterling Furniture Group Ltd
 01259 75 5135



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem deleting data

2003-10-01 Thread Andrew Pattison
Just to confirm that this is not a file permissions problem, I can use this
statement:

DELETE FROM stock WHERE supplier LIKE '%'

and it doesn't exhibit this problem, but a plain:

DELETE FROM stock

does. I'm thinking that perhaps this is a bug in MySQL but I'm not sure. If
anyone has any pointers it would be much appreciated.

Cheers

Andrew.

- Original Message - 
From: Andrew Pattison [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 12:18 PM
Subject: Fw: Problem deleting data



  I have a strange problem with MySQL 4.0.15 . When I delete an entire
 table,
  then run a repair on that table, it recovers all the rows which I just
  deleted! Also, if I do a check table I can see that the files on disk
do
  not appear to have been altered in any way by the delete. Does anyone
have
  any clues as to what is going on here?
 
  Thanks
 
  Andrew P.
 
  Andrew Pattison, IT Support
  Sterling Furniture Group Ltd
  01259 75 5135
 


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]