Re: MySQL 4 Grant command

2008-03-05 Thread Paul DuBois
At 4:12 PM -0800 3/5/08, Garris, Nicole wrote: OK, what is wrong with the following statement? MySQL 4.1 doesn't like my syntax ... mysql> grant all privileges on *.* to [EMAIL PROTECTED] identified by 'myownpassword'; % needs quotes around it. I recommend always quoting the username and hos

MySQL 4 Grant command

2008-03-05 Thread Garris, Nicole
OK, what is wrong with the following statement? MySQL 4.1 doesn't like my syntax ... mysql> grant all privileges on *.* to [EMAIL PROTECTED] identified by 'myownpassword';

Re: what is a schema? what is a database?

2008-03-05 Thread Thufir
On Wed, 05 Mar 2008 15:01:12 +0100, Joerg Bruehe wrote: > I have not heard of a three level naming scheme yet. Aha, thanks for the history, helps to put what I was reading into context. -Thufir -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: what is a schema? what is a database?

2008-03-05 Thread Joerg Bruehe
Hi ! Martin Gainty wrote: my understanding is that Namespace is a defined grouping of classes http://m5.eecs.umich.edu/docs/namespaceMySQL.html My use of the term "name space" was much more generic, similar to how compilers use it: When you define a record type (C: "struct", Pascal: "recor

Re: Using MySQL with its data files on a CD-R (recordable CD)

2008-03-05 Thread Michael Hemer
""Daniel Brown"" <[EMAIL PROTECTED]> wrote > On Wed, Mar 5, 2008 at 12:13 AM, Michael Hemer <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have been researching to see if it's possible to have a MySQL database >> with it's data files on a cd-rom, but could use some help to determine if >> I have fou

Help with a pivot-type issue

2008-03-05 Thread roger.maynard
This may take a bit of explaining! I have a incoming table structure of PartRef AttribValue ABC0011 10.00 ABC0012 4 ABC0013 A ABC0021 12.00 ABC0022 6 ABC002

Re: Using MySQL with its data files on a CD-R (recordable CD)

2008-03-05 Thread Daniel Brown
On Wed, Mar 5, 2008 at 12:13 AM, Michael Hemer <[EMAIL PROTECTED]> wrote: > Hi, > > I have been researching to see if it's possible to have a MySQL database > with it's data files on a cd-rom, but could use some help to determine if I > have found out the full truth of what's possible. I would

Re: what is a schema? what is a database?

2008-03-05 Thread Martin Gainty
my understanding is that Namespace is a defined grouping of classes http://m5.eecs.umich.edu/docs/namespaceMySQL.html where MySQL triggers a namespace must be unique within the schema (database). http://markmail.org/message/m5icpi2luv6baijt?q="Joerg+Bruehe"+AND+"namespace "+AND+"definition"&page=1

Re: Query runs very sloooow

2008-03-05 Thread Rob Wultsch
Also you have a composite key on for the prymary key in tag_keys . ad_id should probably be a seperate index for "LEFT JOIN tag_ad_map tm2 ON tm1.ad_id = tm2.ad_id " to join well. The Index should be ignored because the left most portion of the the index is not used... On 3/5/08, Rob Wultsch <[EMA

Re: Query runs very sloooow

2008-03-05 Thread Rob Wultsch
>From a brief glance: 1 * seems odd to me. Is this an attempt at some sort of cast? "ORDER BY viktatantal DESC, RAND() LIMIT 80" How many results would this return without the limit. The ORDER BY RAND() will never help a query. All the possible results have to be computed... Do you mean LEFT JO

Re: Query runs very sloooow

2008-03-05 Thread Johan Thorvaldsson
CREATE TABLE structure looks like this: CREATE TABLE `tag_ad_map` ( `ad_id` int(11) NOT NULL default '0', `tag_id` int(11) NOT NULL default '0', `termfreq` int(11) NOT NULL default '0', PRIMARY KEY (`tag_id`,`ad_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 CREATE TABLE `tag_keys` (

Select Statement

2008-03-05 Thread velen
Hi, I have 2 tables as follows: table 1 contains code,order_qty table 2 contains code,stock_qty table 1: code1, 10 code2, 2 code3, 5 table 2: code1, 3 code3, 5 code1, 4 code3, 2 I need to see the following result: code | order_qty| stock_qty code1 | 10 | 7 code2 | 2| 0 The

Re: what is a schema? what is a database?

2008-03-05 Thread Garris, Nicole
Sorry. An example of a fully qualified SQL Server object name is: SELECT * FROM Server123.Database456.Sales.Product The object Server123.Database456.Manufacture.Product is a different table from Server123.Database456.Sales.Product. Joerg Bruehe in his post called a "schema" a "namespace", I be

Re: Query runs very sloooow

2008-03-05 Thread Johan Thorvaldsson
Thanks baron for you reply. Here is the result from the explain: 1 SIMPLE t2 ref PRIMARY,url url 194 const 1 Using where; Using temporary; Using filesort 1 SIMPLE tm1 index PRIMARY PRIMARY 8 NULL 149115 Using index 1 SIMPLE t1 eq_ref PRIMARY,url PRIMARY 4 rubbetdev.tm1.tag_id 1 Using where 1 SIMPL

Re: Query runs very sloooow

2008-03-05 Thread Baron Schwartz
Hi, On Wed, Mar 5, 2008 at 9:11 AM, Johan Thorvaldsson <[EMAIL PROTECTED]> wrote: > I need help to optimize this following query. It runs very slow and I cant > find any direct errors in it. > SELECT > 1 * t1.termfreq as viktatantal, > t1.tag, t1.url FROM tag_keys t1 > LEFT JOIN tag_ad_map tm

Query runs very sloooow

2008-03-05 Thread Johan Thorvaldsson
I need help to optimize this following query. It runs very slow and I cant find any direct errors in it. SELECT 1 * t1.termfreq as viktatantal, t1.tag, t1.url FROM tag_keys t1 LEFT JOIN tag_ad_map tm1 ON t1.id = tm1.tag_id LEFT JOIN tag_ad_map tm2 ON tm1.ad_id = tm2.ad_id LEFT JOIN tag_keys t2 ON t

Re: Using MySQL with its data files on a CD-R (recordable CD)

2008-03-05 Thread Michael Hemer
I believe that this situation could work with ldap, but it is not what I had imagined. I was picturing a database for retail. The database could hold a list of products for sale and details relating to those products. -Michael "Thufir" <[EMAIL PROTECTED]> wrote > On Wed, 05 Mar 2008 00:13:56

Re: what is a schema? what is a database?

2008-03-05 Thread Joerg Bruehe
Hi Thufir, all ! Thufir wrote: On Tue, 04 Mar 2008 09:48:03 -0600, Paul DuBois wrote: [[...]] In MySQL, the two are equivalent. The keyword DATABASE or DATABASES can be replaced with SCHEMA or SCHEMAS wherever it appears. Right, but that wasn't exactly what I was asking. I'm fairly fa

Re: password for system user

2008-03-05 Thread Dan Rogart
Hi, On 3/5/08 5:58 AM, "Thufir" <[EMAIL PROTECTED]> wrote: > On Tue, 04 Mar 2008 08:44:47 -0500, Dan Rogart wrote: > >> You can have a file called .my.cnf in your home directory that stores >> it. > > > Ah, thanks. I don't have a .my.cnf file in my home directory, but I do > have something i

Re: how to select total votes for each comment?

2008-03-05 Thread Thufir
On Wed, 05 Mar 2008 09:29:03 +0100, Sebastian Mendel wrote: > SELECT > comments.content, > SUM(votes.votes) > FROM > comments > LEFT JOIN > votes > ON > comments.id = votes.comment_id > GROUP BY > comments.id Interesting :) -Thufir -- MySQL General Mailing Lis

Re: Debugging mysql limits

2008-03-05 Thread Thufir
On Tue, 04 Mar 2008 08:18:08 -0500, Phil wrote: > Just inheritance from an old design that has passed it's limits. Just checking :) I was talking to someone about redundancy in a table and he was like "that's good though, because there are multiple (blah, blah, blah)...but it does screw up som

Re: FW: Re: what is a schema? what is a database?

2008-03-05 Thread Thufir
On Tue, 04 Mar 2008 07:21:21 -0800, Garris, Nicole wrote: > My experience (Oracle, PostgreSQL, MySQL, SQL Server) is that every > DBMS is different in this regard. Microsoft's SQL Server works like > this: > > A SQL Server instance ("server") can have many databases. > > A database can have man

Re: password for system user

2008-03-05 Thread Thufir
On Tue, 04 Mar 2008 08:44:47 -0500, Dan Rogart wrote: > You can have a file called .my.cnf in your home directory that stores > it. Ah, thanks. I don't have a .my.cnf file in my home directory, but I do have something in /etc which seems to be what I'm after. I can get it working for logging

Re: Using MySQL with its data files on a CD-R (recordable CD)

2008-03-05 Thread Thufir
On Wed, 05 Mar 2008 00:13:56 -0500, Michael Hemer wrote: > I have been researching to see if it's possible to have a MySQL database > with it's data files on a cd-rom, but could use some help to determine > if I have found out the full truth of what's possible. I would > appreciate any additiona

Re: unnormalize db here is more efficient?

2008-03-05 Thread Thufir
On Tue, 04 Mar 2008 15:04:30 +0100, Nacho Garcia wrote: > or count the comments on elements_comments table. I guess the last > option could be very slow with lot of rows because mysql has to scan all > of them .. and the first option seems to be very fast. I would certainly want to be able to:

Re: what is a schema? what is a database?

2008-03-05 Thread Thufir
On Tue, 04 Mar 2008 09:48:03 -0600, Paul DuBois wrote: >>Apparently MySQL lacks this feature, but what feature is it lacking? >>There's no equivalent to: >> >>SELECT * FROM database.schema.table; > > > In MySQL, the two are equivalent. The keyword DATABASE or DATABASES can > be replaced with SC

Re: Importing and exporting from MySQL, escape slash problem

2008-03-05 Thread Sebastian Mendel
Dave M G schrieb: PHP List, MySQL List In my PHP environment, I have "Magic Quotes" turned off, and I use the mysql_real_escape_string() function clean strings of SQL syntax before inserting them into my database. So the data stored in my database does not have escape characters in it. Part

Re: how to select total votes for each comment?

2008-03-05 Thread Sebastian Mendel
Patrick Aljord schrieb: Hey all, I have comments(id,content) and votes(comment_id,vote). vote is a tinyint. I would like to select total votes for each comment, I tried: "select content, sum(v.votes) from comments c left join votes v on c.id=v.comment_id" but it only returns first result obvi