Re: How to generate unique primary key in MySQL?

2009-04-27 Thread Michael Dykman
Ok, I will ask the obvious question: why do you refuse to use auto_increment? If this was Oracle or Postgresql, of course we would use sequences, but that isn't available in MySQL. Personally, I would not go to Rome to order the sushi. However, there is the function uuid() which can be used ie.

Re: How to generate unique primary key in MySQL?

2009-04-27 Thread yuan edit
BTW,i am using MySQL 5.0

How to generate unique primary key in MySQL?

2009-04-27 Thread yuan edit
I have a shopping cart table like this: CREATE TABLE shopping_cart( id VARCHAR(20) NOT NULL, product_id INT NOT NULL, product_quantity INT NOT NULL, ... ... user_id INT NOT NULL, current_timestamp TIMESTAMP, primary key (id) ); I will not use auto_increment Is there other way to generate unique

Re: size of database on disk

2009-04-27 Thread Michael Dykman
> Hi, > > I'm using Mysql on Linux. > How can I see the space a certain database is taking on disk ? > There are a number of factors to consider here. If you are using a recent version of MySQL such as might be shipped with a recent linux distro, your default table types are likely using the inno

size of database on disk

2009-04-27 Thread Randomcoder
Hi, I'm using Mysql on Linux. How can I see the space a certain database is taking on disk ? Thank you -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: innodb_thread_concurrency at runtime in 4.1 ?

2009-04-27 Thread Eric Bergen
Hi, I checked the 4.1.24 source and I don't see innodb_thread_concurrency in the list of variables that can be set at runtime. I only see: innodb_max_dirty_pages_pct, innodb_max_purge_lag, innodb_table_locks, innodb_max_purge_lag, innodb_autoextend_increment, -Eric On Sun, Apr 26, 2009 at 11:48

Re: Oracle , what else ?

2009-04-27 Thread Joshua D. Drake
On Fri, 2009-04-24 at 12:15 -0700, David Sparks wrote: > Glyn Astill wrote: > >> Begone Postgres troll! > > > > Oh the hostility of a scorned mysql user. Joshua has posted no more FUD > > than you mysql chaps have done yourselvs over the past few days. You were > > worried about the future and he'

Re: Oracle , what else ?

2009-04-27 Thread Joshua D. Drake
On Fri, 2009-04-24 at 18:15 +, Glyn Astill wrote: > > > Begone Postgres troll! > > > > Oh the hostility of a scorned mysql user. Joshua has posted no more FUD than > you mysql chaps have done yourselvs over the past few days. You were worried > about the future and he's posted a few ideas

Re: Oracle , what else ?

2009-04-27 Thread Joshua D. Drake
On Fri, 2009-04-24 at 10:42 -0700, David Sparks wrote: > > > -- > > PostgreSQL - XMPP: jdr...@jabber.postgresql.org > > Your FUD would be better posted on a Postres list with all the onging > discussions on how Mysql doesn't support foreign keys, transactions, etc. There is no FUD here. The que

Question on replication terminology

2009-04-27 Thread Vikram Vaswani
Hi I'm new to replication and looking through some docs on how to use it. Could someone please tell me if the following terms mean the same thing or, if not, what is the difference: master-master replication dual-master replication bidirectional replication TIA -BT

RE: Resetting MySQL Root Password

2009-04-27 Thread bruce
jason... did a fresh mysql install.. simply type foo> mysql and mysq will start, assuming you have the mysq daemon started. to start the mysql daemon, /etc/init.d/service/mysql start (check it first, but it's something like the above..) -Original Message- From: Jason Todd Slack-Moeh

Re: Resetting MySQL Root Password

2009-04-27 Thread David Giragosian
On 4/27/09, Jason Todd Slack-Moehrle wrote: > Hi All, > > CentOS 5.3 > > I installed MySQL Server via yum and started it. > > I tried entering: > > mysqladmin -u root password yourrootsqlpassword > mysqladmin -h server1.example.com -u root password yourrootsqlpassword > > But I get: > > r...@serv

Resetting MySQL Root Password

2009-04-27 Thread Jason Todd Slack-Moehrle
Hi All, CentOS 5.3 I installed MySQL Server via yum and started it. I tried entering: mysqladmin -u root password yourrootsqlpassword mysqladmin -h server1.example.com -u root password yourrootsqlpassword But I get: r...@server1 ~]# /usr/bin/mysqladmin -u root -h localhost password mypassw

setting useGmtMillisForDatetimes being ignored in context.xml

2009-04-27 Thread Sid Lane
hey, While developing against MySQL, we ran across its habit of adjusting the Epoch timestamp for your local timezone; adding "?useGmtMillisForDatetimes=true" to the end of the connection URL nipped that issue in the bud. However, when we moved to a Tomcat environment and started using a block in

RE: Index time columns?

2009-04-27 Thread Andrew Braithwaite
Hi, If you have that date column in your where clause for example: SELECT .. FROM . WHERE tstamp > NOW() - INTERVAL 1 WEEK; Then it's essential to index that column to speed up a table with lots of data. On a table with many rows, an index on a timestamp column is invaluable. However,

Building 5.1 on Tru64 5.1b

2009-04-27 Thread Didier Godefroy
Hello all, I've been having troubles building mysql on Tru64 v5.1b. I tried several versions and there are always some kind of issues with undefined symbols and things to be changed in the source to allow the build to continue. Lately I've been trying to get 5.1.33 compiled, and after many differe

innodb_thread_concurrency at runtime in 4.1 ?

2009-04-27 Thread Alagar samy
Hi,i am using mysql_server-4.1.23 and in the documentation of 4.1 (http://dev.mysql.com/doc/refman/4.1/en/dynamic-system-variables.html) , it is mentioned innodb_thread_concurrency variable can be set at runtime.but i am getting error when trying to set dynamically .. mysql> SET GLOBAL innodb_thr

Re: Ordering cars

2009-04-27 Thread Olav Mørkrid
thanks zhu. i found a solution using your suggestion and the manual: http://dev.mysql.com/doc/refman/5.0/en/union.html (select 1 as one, brand, max(year) two from cars group by brand) union (select 2 as one, brand, year two from cars) order by one, two desc; the important question now is perform