Re: service problems

2004-09-16 Thread Stano Paska
C:\mysql\bin>mysqld.exe start C:\mysql\bin\mysqld.exe: Too many arguments (first extra is 'start'). Use --help to get a list of available options I wrote: When I reboot computer, service in Service manager is up and running, Problem is not in starting service (service started correctly), problem is

formating output

2004-09-16 Thread Donna Hinshaw
Hi folks - I have looked thru the documentation and the books I have on MySQL - but have not found anything on how to format column output from select statements. I'm trying to do several things - a) if a date is the default of -00-00 then just show a blank b) for a phone number of 99

Re: service problems

2004-09-16 Thread Pahlevanzadeh Mohsen
Dear,You must run "mysqld.exe start" --- Stano Paska <[EMAIL PROTECTED]> wrote: > Hi, > > I have one problem with service MySQL on Windows XP > Home Edition. > I use unzipped version of MySQL. Problem occurs in > version 4.1.2 alpha, > 4.1.2b alpha, 4.1.3 beta, 4.1.3b beta. > Let me explatin: >

Re: Query with group by

2004-09-16 Thread Michael Stassen
Rhino wrote: I agree that Michael's solution with the temporary tables is the best I have seen so far. I can't take much credit. It's just an adaptation of the solution in the manual. I am running MySQL 4.0.15 so I don't have any subquery capability. As a result, I went to DB2 to come up with on

service problems

2004-09-16 Thread Stano Paska
Hi, I have one problem with service MySQL on Windows XP Home Edition. I use unzipped version of MySQL. Problem occurs in version 4.1.2 alpha, 4.1.2b alpha, 4.1.3 beta, 4.1.3b beta. Let me explatin: I unzipped mysql into c:\mysql. Set some variables in my.ini (only default-character-set), install

About mysql_thread_init()

2004-09-16 Thread Lung Fan Ying Lung
Dear All, I need to share few connections between C program's threads. I would like to ask one question: Do I need to call mysql_thread_init() per each connection in each thread? Or I just need to call mysql_thread_init() once per thread? Thank you. Regards, ---

Re: grants to multiple DBs at once

2004-09-16 Thread Michael Stassen
This is documented in the manual: Note: the '_' and '%' wildcards are allowed when specifying database names in GRANT statements that grant privileges at the global or database levels. So, if dev is the prefix, you need: GRANT SELECT ON

RE: Query Help

2004-09-16 Thread Lewick, Taylor
Thank you much, both you and Rhino responded quickly with same answer. Doh!, That was simple. It usually is. Thanks again. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 3:57 PM To: Lewick, Taylor Cc: [EMAIL PROTECTED] S

Re: Query Help

2004-09-16 Thread SGreen
Add Backup date to your SELECT clause _and_ your GROUP BY clause. SELECT count(1) as attempts, client, status, bkupdate FROM bpdjobs WHERE Status not in (0,1) GROUP BY bkupdate, status, client HAVING attempts >5 This will break your report down by date, then status, then client Shawn Green D

Re: grants to multiple DBs at once

2004-09-16 Thread Rhino
- Original Message - From: "Brian C. Hill" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 16, 2004 4:22 PM Subject: grants to multiple DBs at once > I have about 20 DB's with the same prefix. > > How can I do something like > > GRANT SELECT ON dev_*.* > > I h

Re: Query Help

2004-09-16 Thread Rhino
This is the right place to ask the question but we could be a lot more helpful if you told us two additional things: 1. Which version of MySQL are you using? (Different versions of MySQL have different SQL capabilities so we don't want to show you a solution which wouldn't work on your version.) 2

Re: how to count columns in SQL?

2004-09-16 Thread Rhino
Shawn, Monet: Actually, there is one other approach that works today: you can use the Java DatabaseMetaData interface to see almost every aspect of your data, including the number of columns in a table, the names and datatypes of those columns, the primary keys, and many more things. I tried this

RE: how to count columns in SQL?

2004-09-16 Thread Lewick, Taylor
Kind of klugy, but it works... Using perl or php, do a fetchrow on a table. With any query, i.e. select * from table. Now assign @row to a scalar variable. This will give you the length of the array. The length is the number of columns. -Original Message- From: [EMAIL PROTECTED] [mailt

Query Help

2004-09-16 Thread Lewick, Taylor
I have a mysql database/tables of information about netbackup jobs. I would like to see a count of which clients are failing more than 5 times (any status code other than 1 or 0) with the same error codes. That was easy enough. The query... select count(*) as 'attempts', client, status from bpdbj

grants to multiple DBs at once

2004-09-16 Thread Brian C. Hill
I have about 20 DB's with the same prefix. How can I do something like GRANT SELECT ON dev_*.* I have seen examples for the _other_ DB software, like msql, that does something like: SELECT 'GRANT SELECT ON '+name+' TO webuser;' from s

4.1 client protocol?

2004-09-16 Thread Todd Gruben
I have an interesting problem. I have developed a custom mysql replication client that we use for monitoring our mysql database. Kinda like a poor man's trigger, but the power of an asynchronus trigger is very beneficial. Any way, I developed this client based on the 4.0 version of mysql. It

Re: how to count columns in SQL?

2004-09-16 Thread SGreen
AFAIK, exposing the database schema tables/views is on the todo list for 5.x. Until then you will have to count the # of rows that comes back from describe table. Shawn Green Database Administrator Unimin Corporation - Spruce Pine Monet <[EMAIL PROTECTED]> wrote on 09/16/2004 03:50:55 PM: > H

problem of revoking global privileges

2004-09-16 Thread Zhe Wang
Hi, all, I am having trouble of revoking global privileges. Your help will be greatly appreciated. I created a user called "dummy" identified by password "dummy" by : grant usage on *.* to 'dummy'@'%' identified by 'dummy'; Then I did: mysql> show grants for dummy; +

how to count columns in SQL?

2004-09-16 Thread Monet
Hi, everyone, I have a sql question here, please don’t ignore it and help please. I know one can use “describe table” in mysql to get number of columns. Is there any way to do so in SQL? I have some tables on SQL sever 2000. I use Access 2000 Link table function to link to the server. And I want

Re: Join and Performance Question

2004-09-16 Thread gerald_clark
Ronan Lucio wrote: Hi, Supposing we have for tables: One master table (student) and three independent tables. There is no relationship between them. Each of the three table have a relationship with table student. City | Teacher | TestLocal | === | = city_id | teac_

Join and Performance Question

2004-09-16 Thread Ronan Lucio
Hi, Supposing we have for tables: One master table (student) and three independent tables. There is no relationship between them. Each of the three table have a relationship with table student. City | Teacher | TestLocal | === | = city_id | teac_id | test_id cit

Which file to backup

2004-09-16 Thread Mauricio Pellegrini
Sorry for my bad English!! From: Mauricio Pellegrini <[EMAIL PROTECTED]> To: MySql List <[EMAIL PROTECTED]> Subject: Wich file to backup Date: 16 Sep 2004 11:28:56 -0700 Hi , I'm trying to backup the 'binary log' and don't know which file is it. these are the files I see in my datadir -rw-rw---

Re: UTF8 pre-4.1?

2004-09-16 Thread V. M. Brasseur
Many thanks, Tim. I don't know to what use they intend to put the strings which they are storing, but I'll pass on this information to the developers with the question. Thanks again, --V Little, Tim wrote: There isn't "support" for it prior to that. But you absolutely can store and retrieve UTF8

Re: UTF8 pre-4.1?

2004-09-16 Thread Jim Winstead
On Thu, Sep 16, 2004 at 10:56:55AM -0700, V. M. Brasseur wrote: > *I* understand that Unicode utf8 support does not happen until version > 4.1 (I can read the manual), but there are some in the office who are > skeptical and somehow believe that there is support for it in earlier > versions (as

UTF8 pre-4.1?

2004-09-16 Thread V. M. Brasseur
*I* understand that Unicode utf8 support does not happen until version 4.1 (I can read the manual), but there are some in the office who are skeptical and somehow believe that there is support for it in earlier versions (as early as 3.23, according to them). To set all of our minds at ease, cou

ANN: MyCon 2004.2 released

2004-09-16 Thread SciBit MySQL Team
Hi All, SciBit is happy and proud to announce the 2004.2.0 release of MyCon. Upgrading your current version is free and you can download the new MyCon Pro version at: http://download.scibit.com/release/mycon/mcp.exe What's new summary: * One of the newest features, and by all accounts a firs

Re: I thought --safe-show-database was default?

2004-09-16 Thread Mark
Michael Stassen wrote: That word "global" is the key. CREATE TEMPORARY TABLES, LOCK TABLES And only ALL privileges on its own database. phpMyadmin is not actually allowing access to other databases with this user, but it does LIST them, which I do not like either. How can I revert things back to th

Re: SV: Mysql goes down when executing query

2004-09-16 Thread Mauricio Pellegrini
Heikki, I've tried a different query this time but always using the "INTO OUTFILE" syntax. Mysqld went down and up again. This is the resolved stack dump 0x808a183 handle_segfault + 423 0x82d3cb8 pthread_sighandler + 184 0x80ae46f yyparse__FPv + 59623 0x809d894 mysql_parse__FP3THDPcUi

Re: Query execution time?

2004-09-16 Thread Aman Raheja
As far as I know there isn't a way, though ideally there should be to do so. I would also look more for the answer and ask you to post it on the PER DBI mailinglist. Thanks Aman Raheja joe mcguckin wrote: Does the mysql server return to the client (DBI in this case) the query execution time? If s

Re: Query with group by

2004-09-16 Thread Jose Miguel Pérez
Hi Michael! Yes, you're right, thanks for extending and clarifying my message. However, I'm not confident about your comments on the inefficiency for the following query: > > SELECT c1.date, c1.location, c1.version > > FROM cities c1 > > LEFT JOIN cities c2 > >

Re: Global privileges - everyone has them!!!

2004-09-16 Thread Greg Donald
On Thu, 16 Sep 2004 11:24:08 -0400, Dave Shacket <[EMAIL PROTECTED]> wrote: > I have a database up and running on my server. (Windows XP Pro, IIS, mySQL > 4.1.1a). I have created 4 users, including root (which I had completely > removed, then recreated with the same name). My problem is that everyo

Global privileges - everyone has them!!!

2004-09-16 Thread Dave Shacket
I have a database up and running on my server. (Windows XP Pro, IIS, mySQL 4.1.1a). I have created 4 users, including root (which I had completely removed, then recreated with the same name). My problem is that everyone has global priviledges to the entire server. There are no items to add or remov

Re: Query with group by

2004-09-16 Thread Vincent . Badier
>Which version of MySQL are you running? > >I'm having trouble thinking of a solution that doesn't involve a subquery >but subqueries aren't supported until version 4.1.x; I don't want to give >you a subquery if you can't run it. > >Rhino I'm running 3.23.43. -- Vincent -- MySQL General Mai

Re: drop database after lost of synchro in innodb

2004-09-16 Thread Heikki Tuuri
Johanne, have you moved .ibd files and .frm files around? Looks like the .frm file and the .ibd file exists, but the InnoDB table is missing from the InnoDB data dictionary inside the ibdata1 file. Try removing BOTH the .frm file and .ibd file manually. Regards, Heikki - Alkuperäinen vie

Re: SV: Mysql goes down when executing query

2004-09-16 Thread Heikki Tuuri
Mauricio, looks like a bug in the MySQL parser. Please file a DETAILED bug report at bugs.mysql.com Make sure you describe precisely how we can REPEAT the problem here. Thank you, Heikki - Alkuperäinen viesti - Lähettäjä: "Mauricio Pellegrini" <[EMAIL PROTECTED]> Vastaanottaja: "Heik

Re: Query with group by

2004-09-16 Thread Rhino
I agree that Michael's solution with the temporary tables is the best I have seen so far. I am running MySQL 4.0.15 so I don't have any subquery capability. As a result, I went to DB2 to come up with one solution that does give the right answer via a subquery: select content, location, version, d

Re: I thought --safe-show-database was default?

2004-09-16 Thread Michael Stassen
Mark wrote: Mark wrote: Indeed, I thought --safe-show-database was default now? Running MySql It is. Users can only see dbs to which they have access. 4.0.21, I noticed, to my dismay, that phpMyadmin still shows the databases the user has no access to! I have a user, call it testuser, who has the

Re: Query with group by

2004-09-16 Thread Michael Stassen
Jose Miguel Pérez wrote: Hi Vincent! i'm trying to built a query that report me the latest tuple for a given field. I explain myself a bit. Let's say i have a table such this : There is no simple solution to your problem. Strictly speaking, it's forbidden to name a column in the SELECT clause w

Re: Anyone else having trouble contacting MySQL AB?

2004-09-16 Thread Santino
Me too! I sent my first e-mail in may and I have not received any reply. Then last week I sent an e-mail to a MySql people (technical people); he forwarded my question about commercial licenses to the right contact but I have no lucky: he/she supports north American people only so I'm looking ag

Re: How many UNIQUE Columns per table

2004-09-16 Thread Rhino
Have you tried looking in the manual? This information should all be there somewhere. The URL is http://dev.mysql.com/doc/mysql/en/index.html. According to relational theory, there can only be one PRIMARY KEY in any table, although it may contain multiple columns. I *think* you can have as many UN

Wich file to backup

2004-09-16 Thread Mauricio Pellegrini
Hi , I'm trying to backup the 'binary log' and don't know wich file is it. these are the files I see in my datadir -rw-rw 1 mysql users175K Sep 14 14:21 hrrgp01-bin.07 -rw-rw 1 mysql users345K Sep 14 15:03 hrrgp01-bin.08 -rw-rw 1 mysql users1.6

Re: Problem with tables

2004-09-16 Thread Michael Stassen
You can describe a column from a table if you wish, but you have to name the table the column belongs to. To describe column id from table spamdata, you'd do this: DESC spamdata id; DESCRIBE syntax is documented in the manual . Michael Beaufo

Re: Problem with tables;

2004-09-16 Thread SGreen
That's correct. You successfully created the table (you didn't get an error message did you?) and neither wrote any records to nor changed any records on the new table: "Query OK, 0 rows affected ..." This format is more useful when you use the compound form of "CREATE TABLE" that allows you to

Re: I thought --safe-show-database was default?

2004-09-16 Thread Mark
Mark wrote: Indeed, I thought --safe-show-database was default now? Running MySql 4.0.21, I noticed, to my dismay, that phpMyadmin still shows the databases the user has no access to! I have a user, call it testuser, who has the following global privileges: CREATE TEMPORARY TABLES, LOCK TABLES And

How many UNIQUE Columns per table

2004-09-16 Thread Mulley, Nikhil
Hi all, I have a query , Please can someone just tell me the details of restrictions on how many maximum no of UNIQUE Columns can be there per table and how many maximum PRIMARY KEY Columns,HOW many maximumum AUTO_INCREMENT Columns can be there per table

Re: AUTO_INCREMENT

2004-09-16 Thread SGreen
According to http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html: Note: There can be only one AUTO_INCREMENT column per table, it must be indexed, and it cannot have a DEFAULT value. It did not specify that the AUTO_INCREMENT column couldn't have a regular index on it. If you have this table:

RE: Problem with tables

2004-09-16 Thread Beauford
Duh.That's what I get for doing this stuff late at night. Funning how some things just don't click in until someone kicks you in the butt Thanks -Original Message- From: Aman Raheja [mailto:[EMAIL PROTECTED] Sent: September 16, 2004 8:35 AM To: [EMAIL PROTECTED] Subject: Re: Pro

Re: Mysql and PHP

2004-09-16 Thread leegold
On Thu, 16 Sep 2004 09:27:08 -0400, "John Nichel" <[EMAIL PROTECTED]> said: > nestor(earth) wrote: > > People, > > > > This more of a php mysql question. I have installed PHP ( 5.01) with > > Apache(1.31) and it runs. > > I have install Mysql (the latest as of last night) and it runs. My >

Re: Query with group by

2004-09-16 Thread Jose Miguel Pérez
Hi Vincent! > i'm trying to built a query that report me the latest tuple for a given > field. > I explain myself a bit. Let's say i have a table such this : There is no simple solution to your problem. Strictly speaking, it's forbidden to name a column in the SELECT clause which is NOT on th

Re: Mysql and PHP

2004-09-16 Thread John Nichel
nestor(earth) wrote: People, This more of a php mysql question. I have installed PHP ( 5.01) with Apache(1.31) and it runs. I have install Mysql (the latest as of last night) and it runs. My problem is that PHP does not see Mysql. Now I have done this installation 4 or 5 times but th elast t

Changing datatype of a large table's column

2004-09-16 Thread Wouter van Vliet
Howdy, I'm running a website (dah) and chose to store images in the database. What I didn't take into consideration however, was that some images would be larger than the amount of data a BLOB can store. Just didn't notice it while testing. (Stupid me). Currently, the site is stuck with some half

I thought --safe-show-database was default?

2004-09-16 Thread Mark
Indeed, I thought --safe-show-database was default now? Running MySql 4.0.21, I noticed, to my dismay, that phpMyadmin still shows the databases the user has no access to! I have a user, call it testuser, who has the following global privileges: CREATE TEMPORARY TABLES, LOCK TABLES And only ALL

Re: Query with group by

2004-09-16 Thread Rhino
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 16, 2004 3:05 AM Subject: Query with group by > Hello all, > > i'm trying to built a query that report me the latest tuple for a given > field. > I explain myself a bit. Let's say i have a t

Re: Problem with tables;

2004-09-16 Thread Aman Raheja
You need to do desc spamdata; NOT desc id. Aman Raheja Beauford wrote: Hi, I'm trying to create a table using the commands below, and everything seems to work and the table is there - I just can's access any of the fields. This happens on both my Windows and Linux versions of MySQL. Any help is app

RE: Problem with tables;

2004-09-16 Thread Laercio Xisto Braga Cavalcanti
Hi Beauford, Try this: desc spamdata ; Regards, Laercio Cavalcanti. -Original Message- From: Beauford [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 16 de setembro de 2004 01:19 To: [EMAIL PROTECTED] Subject: Problem with tables; Hi, I'm trying to create a table using the commands be

Re: Problem with tables;

2004-09-16 Thread Vincent . Badier
>> CREATE TABLE spamdata ( >> id bigint(20) NOT NULL, >> dates varchar(60) NOT NULL, >> probe varchar(100) NOT NULL, >> ip varchar(15) NOT NULL, >> fqdnvarchar(100) NOT NULL, >> reason varchar(100) NOT NULL, >> portvarchar(2) NOT NULL

Re: Anyone else having trouble contacting MySQL AB?

2004-09-16 Thread Patrick Connolly
Somewhere about Mon, 13-Sep-2004 at 07:23PM +0300 (give or take), Egor Egorov wrote: |> Patrick Connolly <[EMAIL PROTECTED]> wrote: |> |> > I've been trying to contact MySQL AB using the "contact us" link. I |> > got a auto-response to the effect that I'd get a real reply in 2 days, |> > but tha

Sample MySQL 5 scripts wanted

2004-09-16 Thread Martijn Tonies
Hi all, I'm going to test some stuff with scripts that include Stored Procedures/Functions and a lot more. Could someone provide me with some huge scripts that include tables, indices, FKs and some Stored Prcedures or Functions? If so, please do so - much appreciated. With regards, Martijn To

Re: SV: Mysql goes down when executing query

2004-09-16 Thread Heikki Tuuri
Mauricio, please resolve the stack dump below. Best regards, Heikki Tuuri Innobase Oy Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables http://www.innodb.com/order.php Order MySQL technical support from

Re: drop database after lost of synchro in innodb

2004-09-16 Thread Heikki Tuuri
Johanne, looks like the file Alias.frm exists, but the corresponding InnoDB table does not exist. Delete manually the .frm file. Then it should be in sync again. Best regards, Heikki Tuuri Innobase Oy Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - a hot backup t

Query with group by

2004-09-16 Thread Vincent . Badier
Hello all, i'm trying to built a query that report me the latest tuple for a given field. I explain myself a bit. Let's say i have a table such this : +++-+--+-+ | id | date | content | location | version | +++-+--+