If I use iconv to convert mysql dump data file with some blob field then blob binary data will be corrupted ?

2008-12-23 Thread KLEIN Stéphane
Hi,

This my script to convert latin1 database to utf8 :

$ mysqldump --user=root --password=password --host=mybox mydatabase --
default-character-set=latin1  mydatabase.latin1.sql$ mysqldump --
user=root --password=password --host=mybox mydatabase --default-character-
set=latin1  mydatabase.latin1.sql
$ sed -e 's/latin1/utf8/g' mydatabase.latin1.sql  mydatabase.utf8.sql
$ iconv -f latin1 -t utf8 mydatabase.utf8.sql  mydatabase.utf8.sql
$ echo SET NAMES utf8;  tmp.sql
$ cat mydatabase.utf8.sql  tmp.sql
$ mv tmp.sql mydatabase.utf8.sql

I've one question : 

* if my database have some blob field with binary data (like image...), 
iconv convert also this data then this data will be corrupted ?

Thanks for your information,
Stephane



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: If I use iconv to convert mysql dump data file with some blob field then blob binary data will be corrupted ?

2008-12-23 Thread KLEIN Stéphane
I've break line misteak in my previous message, this is the fix :

$ mysqldump --user=root --password=password --host=mybox mydatabase --
default-character-set=latin1  mydatabase.latin1.sql$ mysqldump --
user=root --password=password --host=mybox mydatabase
--default-character- set=latin1  mydatabase.latin1.sql

$ sed -e 's/latin1/utf8/g' mydatabase.latin1.sql  mydatabase.utf8.sql 

$ iconv -f latin1 -t utf8 mydatabase.utf8.sql  mydatabase.utf8.sql 

$ echo  SET NAMES utf8;  tmp.sql

$ cat mydatabase.utf8.sql  tmp.sql

$ mv tmp.sql mydatabase.utf8.sql

Regards,
Stephane



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: If I use iconv to convert mysql dump data file with some blob field then blob binary data will be corrupted ?

2008-12-23 Thread KLEIN Stéphane
Le Tue, 23 Dec 2008 14:42:40 +, KLEIN Stéphane a écrit :

 Hi,
 
 This my script to convert latin1 database to utf8 :
 
 $ mysqldump --user=root --password=password --host=mybox mydatabase --
 default-character-set=latin1  mydatabase.latin1.sql$ mysqldump --
 user=root --password=password --host=mybox mydatabase
 --default-character- set=latin1  mydatabase.latin1.sql
 $ sed -e 's/latin1/utf8/g' mydatabase.latin1.sql  mydatabase.utf8.sql $
 iconv -f latin1 -t utf8 mydatabase.utf8.sql  mydatabase.utf8.sql $ echo
 SET NAMES utf8;  tmp.sql
 $ cat mydatabase.utf8.sql  tmp.sql
 $ mv tmp.sql mydatabase.utf8.sql
 
 I've one question :
 
 * if my database have some blob field with binary data (like image...),
 iconv convert also this data then this data will be corrupted ?

I've the answer !

My previous script corrupt binary data.

To fix this issue I need to dump data with --hex-dump option :

$ mysqldump --hex-dump --user=root --password=password --host=mybox 
mydatabase --default-character-set=latin1  mydatabase.latin1.sql$ 
mysqldump --user=root --password=password --host=mybox mydatabase

Regards,
Stephane



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: If I use iconv to convert mysql dump data file with some blob field then blob binary data will be corrupted ?

2008-12-23 Thread KLEIN Stéphane
Le Tue, 23 Dec 2008 15:33:34 +, KLEIN Stéphane a écrit :

 Le Tue, 23 Dec 2008 14:42:40 +, KLEIN Stéphane a écrit :
 
 Hi,
 
 This my script to convert latin1 database to utf8 :
 
 $ mysqldump --user=root --password=password --host=mybox mydatabase --
 default-character-set=latin1  mydatabase.latin1.sql$ mysqldump --
 user=root --password=password --host=mybox mydatabase
 --default-character- set=latin1  mydatabase.latin1.sql $ sed -e
 's/latin1/utf8/g' mydatabase.latin1.sql  mydatabase.utf8.sql $ iconv
 -f latin1 -t utf8 mydatabase.utf8.sql  mydatabase.utf8.sql $ echo SET
 NAMES utf8;  tmp.sql
 $ cat mydatabase.utf8.sql  tmp.sql
 $ mv tmp.sql mydatabase.utf8.sql
 
 I've one question :
 
 * if my database have some blob field with binary data (like image...),
 iconv convert also this data then this data will be corrupted ?
 
 I've the answer !
 
 My previous script corrupt binary data.
 
 To fix this issue I need to dump data with --hex-dump option :
 
 $ mysqldump --hex-dump --user=root --password=password --host=mybox
 mydatabase --default-character-set=latin1  mydatabase.latin1.sql$
 mysqldump --user=root --password=password --host=mybox mydatabase

Sorry, it's --hex-blob not --hex-dump

$ mysqldump --hex-blob --user=root --password=password --host=mybox
mydatabase --default-character-set=latin1  mydatabase.latin1.sql

Regards,
Stephane



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: How can I do something like this SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3); ?

2007-06-14 Thread KLEIN Stéphane

2007/6/13, Ricardas S [EMAIL PROTECTED]:

ops again you probably needed just
select greatest(col1,col2,col3) from t order by 1


Thanks, it's work very well.

best regards

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



How can I do something like this SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3); ?

2007-06-13 Thread KLEIN Stéphane

Hi,

I would like do something like :

SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3);

I know this syntax is wrong but I would like get a solution to this stuff.

Thanks for your help.
Stephane

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



Re: How can I do something like this SELECT MAX(col1, col2, col3) FROM mytable ORDER BY MAX(col1, col2, col3); ?

2007-06-13 Thread KLEIN Stéphane

2007/6/13, Ricardas S [EMAIL PROTECTED]:

Ops, small mistake, shoud be

MAX((col1*(MAX_VALUE_OF_COL2+1)+col2)*(MAX_VALUE_OF_COL3+1)+col3)



Sorry, my question is ashamed.

Example, I've this row :

Col1 | Col2 | Col3
1  |   5   |   8
6  |   2   |   4
12|   13   |  6

After my query, I would like this :

Max_value_col
6
8
13

Well, I would like MAX value of cols of one row, not on all the column.

I don't know if my explication it more clear.

Stephane

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



Are there any tools to get diff (alter commands) between tow tables ?

2007-03-19 Thread KLEIN Stéphane

Hello,

I wonder if there are any tools to do a diff between two tables
struture to result alter command to convert table A structure to table
B structure ?

Thanks for your information.
Stephane

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



Re: Are there any tools to get diff (alter commands) between tow tables ?

2007-03-19 Thread KLEIN Stéphane

2007/3/19, Martijn Tonies [EMAIL PROTECTED]:

Hi,

 I wonder if there are any tools to do a diff between two tables
 struture to result alter command to convert table A structure to table
 B structure ?

Yes, our tool Database Workbench includes a so-called
Schema Compare tool which allows you to compare structures
and create a change script.

Download a trial copy at www.upscene.com


I would like script tool, not gui software.

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



Re: Can I set many IP address with bind-address ? If not, how can do same thing ?

2006-10-04 Thread KLEIN Stéphane

2006/10/4, Dominik Klein [EMAIL PROTECTED]:

 You can only specify one IP address to bind to.

If you omit this option, mysqld will bind to all addresses on the
machine. If this is not what you want, you could block mysql-access with
a packet filter for the IP addresses you do not want to bind to.


I'll use firewall rule to allow only some IP.

Regards,
Stephane

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



Can I set many IP address with bind-address ? If not, how can do same thing ?

2006-10-03 Thread KLEIN Stéphane

Hi,

Can I set many IP address with bind-address ? If not, how can do same thing ?

In documentation, I read this :

'''
-bind-address=IP

The IP address to bind to.
'''

They don't say if I can use comma to separate two or many IP.

Thanks for your help,
Stephane

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



How to READ/WRITE directly on MyISAM data files ?

2003-12-11 Thread Stéphane Bischoff

Hello,

I would like to know how to write directly to MyISAM files, without passing
by SELECT or UPDATE queries.

I believe this info can be found in the files myisam.h and myisammrg.h, but
I am not shure if its safe and 
how to do it. 

I would very much like to have an example of this code (C code).

thank you 

Stéphane.



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



RE: How to READ/WRITE directly on MyISAM data files ?

2003-12-11 Thread Stéphane Bischoff

Good question,

I am not shure if I need to.

Here's why I am asking:

I have a table that does not have a primary key and I need to update only
one row.
This complicates my Update Query since I cannot specify a Where clause.

I did had a primary key RowID (AUTO INCREMENT) to be sble to specify a row
in my query.
But this Field (RowID) can now be seen when I do a SELECT query. I did not
find a
way to hide this field.

So my first question should be : Is there a way to hide a field ??

Best Regards,

Stéphane.

-Original Message-
From: Martijn Tonies [mailto:[EMAIL PROTECTED]
Sent: 11 décembre, 2003 08:22
To: MySQL (E-mail)
Subject: Re: How to READ/WRITE directly on MyISAM data files ?


Hi,

 I would like to know how to write directly to MyISAM files, without
passing
 by SELECT or UPDATE queries.

 I believe this info can be found in the files myisam.h and myisammrg.h,
but
 I am not shure if its safe and
 how to do it.

I guess it will only be safe if you're sure you've got all bugs out, like
in the MySQL engine.

So the question would be: WHY?

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL  MS SQL
Server.
Upscene Productions
http://www.upscene.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: How to READ/WRITE directly on MyISAM data files ?

2003-12-11 Thread Stéphane Bischoff

Thank you, but I already know the basics of SQL SELECT statements.

What I am trying to say is, if a User writes a SELECT clause, I do not want
him to
see the RowID field. I do not want him to write a long SELECT statement,
especially if my
table has 20 FIELDS or more. (Can you imagine the user writing these queries
all the time).

I want him to be able to write SELECT * FROM ATABLE.

Thank you,

Stéphane.

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 11 décembre, 2003 08:41
To: Stéphane Bischoff; Martijn Tonies; MySQL (E-mail)
Subject: RE: How to READ/WRITE directly on MyISAM data files ?


[snip]
So my first question should be : Is there a way to hide a field ??
[/snip]

SELECT only the information you want. Let's say I have

RowID 
Name
Address
City

And I only want Name Address  and City

SELECT Name, Address, City FROM table WHERE RowID = 'foo'
UPDATE table SET Name = 'foo' WHERE RowID = '12'

etcetera

A good book on SQL basics will get you a long way on things like this.

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



RE: How to READ/WRITE directly on MyISAM data files ?

2003-12-11 Thread Stéphane Bischoff

Hello,

Here's an example :


I have a table named Product.

TABLE : PRODUCT
+-+-+-+-+-+
|RowID| Name|  Company| Price   |   Warranty  |

| | | | | |
+-+-+-+-+-+
|   1 |   PC 1000   |  MyCom Inc. |  1000.00|   1 year|

|   2 |   PC 1000   |  MyCom Inc. |  1200.00|   2 year|

|   3 |   PC 1000   |  MyCom Inc. |  1300.00|   3 year|

|   4 |   PC 2000   |  MyCom Inc. |  1200.00|   1 year|

|   4 |   PC 2000   |  MyCom Inc. |  1300.00|   2 year|

|   4 |   PC 2000   |  MyCom Inc. |  1400.00|   3 year|

|   4 |   PC 3000   |  MyCom Inc. |  1500.00|   1 year|

|   4 |   PC 3000   |  MyCom Inc. |  1600.00|   2 year|

|   4 |   PC 3000   |  MyCom Inc. |  1700.00|   3 year|

|   4 |   PC AR3|  SPCom Inc. |  1200.00|   2 year|

|   4 |   PC AR3|  SPCom Inc. |  1300.00|   3 year|

|   4 |   PC AR4|  SPCom Inc. |  1400.00|   4 year|

+-+-+-+-+-+

From My Server Side Application (C code)

I can Update my Rows using my RowID.

Example : UPDATE TABLE product SET Price=2000.00 WHERE RowID=3;


But For My Client Side Applications :

User logs in my Client app.
User types in SELECT * FROM product.
User does NOT WANT TO SEE RowID numbers.
User wants to see this output :

+-+-+-+-+
| Name|  Company| Price   |   Warranty  |   
| | | | |
+-+-+-+-+
|   PC 1000   |  MyCom Inc. |  1000.00|   1 year|
|   PC 1000   |  MyCom Inc. |  1200.00|   2 year|   
|   PC 1000   |  MyCom Inc. |  1300.00|   3 year|   
|   PC 2000   |  MyCom Inc. |  1200.00|   1 year|   
|   PC 2000   |  MyCom Inc. |  1300.00|   2 year|   
|   PC 2000   |  MyCom Inc. |  1400.00|   3 year|   
|   PC 3000   |  MyCom Inc. |  1500.00|   1 year|   
|   PC 3000   |  MyCom Inc. |  1600.00|   2 year|   
|   PC 3000   |  MyCom Inc. |  1700.00|   3 year|   
|   PC AR3|  SPCom Inc. |  1200.00|   2 year|   
|   PC AR3|  SPCom Inc. |  1300.00|   3 year|   
|   PC AR4|  SPCom Inc. |  1400.00|   4 year|   
+-+-+-+-+

I know there are ways to bypass this problem, but it involves much more
coding in my Delphi applications
on my Client side.

So my question is, Is there a way to hide a field from select statements.

Of course, if my user wrote SELECT RowId, Name, Company, Price, Warranty
FROM product
he would get the RowId in his query output.

Best Regards,

Stéphane.


 


-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 11 décembre, 2003 08:49
To: Stéphane Bischoff; MySQL (E-mail)
Subject: RE: How to READ/WRITE directly on MyISAM data files ?


[snip]
Thank you, but I already know the basics of SQL SELECT statements.

What I am trying to say is, if a User writes a SELECT clause, I do not want
him to
see the RowID field. I do not want him to write a long SELECT statement,
especially if my
table has 20 FIELDS or more. (Can you imagine the user writing these queries
all the time).

I want him to be able to write SELECT * FROM ATABLE.
[/snip]

Well, that pretty much misses the point then, doesn't it? Are your records
not unique? There is no way that you can write an update statement that
would perform the operation on the proper record? Can you show us a bit of
the table? With more information we can help.

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



RE: How to READ/WRITE directly on MyISAM data files ?

2003-12-11 Thread Stéphane Bischoff

Just wanted to know if it was possible to hide fields for whatever reason.
Judging by your response, the answer is no.

Therefore, I will look at other alternatives.

Thanks,

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 11 décembre, 2003 09:09
To: Stéphane Bischoff; MySQL (E-mail)
Subject: RE: How to READ/WRITE directly on MyISAM data files ?


[snip]
|   4 |   PC AR3|  SPCom Inc. |  1200.00|   2 year|

|   4 |   PC AR3|  SPCom Inc. |  1300.00|   3 year|

|   4 |   PC AR4|  SPCom Inc. |  1400.00|   4 year|

+-+-+-+-+-+

From My Server Side Application (C code)

I can Update my Rows using my RowID.

Example : UPDATE TABLE product SET Price=2000.00 WHERE RowID=3;
[/snip]

Yes, but if you use RowID 4 you'll be updating multiple rows

[snip]
But For My Client Side Applications :

I know there are ways to bypass this problem, but it involves much more
coding in my Delphi applications
on my Client side.
[/snip]

So?

[snip]
So my question is, Is there a way to hide a field from select statements.

Of course, if my user wrote SELECT RowId, Name, Company, Price, Warranty
FROM product
he would get the RowId in his query output.
[/snip]

Does the user know all of the columns? If so, and he chose to see them that
would be his choice, no?

Really, it is just bad database design. Each row should have a unique
identifier.  What is the big deal about the user seeing the RowID?

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



RE: Licence question

2003-12-04 Thread Stéphane Bischoff
Thank you for all your response, but my question is very simple :

Example :

We have company 1 that make's a product that communicate with MySQL server
using TCP/IP.
This product (company 1) does not use the MySQL client to connect to MySQL
server. (Don't ask me how, I don't know)
(By the way, this product really exist, that is why I am asking this
question).

Therefore, if Company 2 has a MySQL server (commercial license) and
purchases 100 product from company 1, 
does company 2 need a 100 MySQL client or driver licenses ???

I believe not (2 reasons)

1 - I paid company 1 for its product.
2 - the product does not use MySQL client to connect to MySQL server.

This is what is bugging me, can you help ?

thank you, 

-Original Message-
From: Ron Albright [mailto:[EMAIL PROTECTED]
Sent: 3 décembre, 2003 18:27
To: [EMAIL PROTECTED]
Subject: Re: Licence question


At 01:26 PM 12/3/2003, Chuck Gadd [EMAIL PROTECTED] wrote:

This is your standard I am not a lawyer type answer, because reading
the text of the GPL can be overwhelming, but the way I understand it,
if you are shipping MySql with your app, then you've either got to
release your app under the GPL, or you've got to buy a commercial
Mysql license for each copy of your app that you ship.

If you were to simply download and install MySQL at your company
office, then write apps for in-house use at your company, then
you have no license issues.  Your apps would not need to be
GPL, and you do not need a Mysql commercial license.

This was discussed by a Mysql AB employee during the MySQL
training class I took a few weeks ago.

This is somewhat ambiguous. From the statements below it would appear to me 
that you can ship MySQL with an application as long as the your application 
does not directly link to the MySQL libraries as would be the case if 
embedded. But mere aggregation seems to apply even if your application 
starts the database as a separate executable. The last paragraph of the 
first question seems to allow shipping it along with your application but 
the last sentence leaves it somewhat open to question.

 From the GPL FAQ (http://www.gnu.org/licenses/gpl-faq.html):


What is the difference between mere aggregation and combining two 
modules into one program?

Mere aggregation of two programs means putting them side by side on the 
same CD-ROM or hard disk. We use this term in the case where they are 
separate programs, not parts of a single program. In this case, if one of 
the programs is covered by the GPL, it has no effect on the other program.

Combining two modules means connecting them together so that they form a 
single larger program. If either part is covered by the GPL, the whole 
combination must also be released under the GPL--if you can't, or won't, do 
that, you may not combine them.

What constitutes combining two parts into one program? This is a legal 
question, which ultimately judges will decide. We believe that a proper 
criterion depends both on the mechanism of communication (exec, pipes, rpc, 
function calls within a shared address space, etc.) and the semantics of 
the communication (what kinds of information are interchanged).

If the modules are included in the same executable file, they are 
definitely combined in one program. If modules are designed to run linked 
together in a shared address space, that almost surely means combining them 
into one program.

By contrast, pipes, sockets and command-line arguments are communication 
mechanisms normally used between two separate programs. So when they are 
used for communication, the modules normally are separate programs. But if 
the semantics of the communication are intimate enough, exchanging complex 
internal data structures, that too could be a basis to consider the two 
parts as combined into a larger program.



If a program released under the GPL uses plug-ins, what are the 
requirements for the licenses of a plug-in.

It depends on how the program invokes its plug-ins. If the program uses 
fork and exec to invoke plug-ins, then the plug-ins are separate programs, 
so the license for the main program makes no requirements for them.

If the program dynamically links plug-ins, and they make function calls to 
each other and share data structures, we believe they form a single 
program, so plug-ins must be treated as extensions to the main program. 
This means they must be released under the GPL or a GPL-compatible free 
software license, and that the terms of the GPL must be followed when those 
plug-ins are distributed.

If the program dynamically links plug-ins, but the communication between 
them is limited to invoking the `main' function of the plug-in with some 
options and waiting for it to return, that is a borderline case.



Can I use the GPL for a plug-in for a non-free program?

If the program uses fork and exec to invoke plug-ins, then the plug-ins are 
separate programs, so the license for the main program makes no 
requirements for them. 

How do I know what my MySQL server IP is ??

2003-12-04 Thread Stéphane Bischoff

Hi,

w do I know what my MySQL server IP is ??

thanks


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



Licence question

2003-12-03 Thread Stéphane Bischoff

Hi,

We are programming a Delphi application that interacts with the MySQL server
from Windows.

Normally we would need a client side licence ?

But if we use a set of components (from a third party) that allow us to
interact with the MySQL server without using the MySQL client. In this case,
do we need to buy a client licence at all ?

Thank you


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



Unable to access primary key

2003-11-12 Thread Stéphane Pinel
I get an error Unable to access primary key each time I attempt to 
insert or update a record. But everything seems to be OK with my PK. 
CHECK TABLE doesn't see any problem.

Any idea ?

Regards.

Stéphane

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


Unable to access primary key

2003-11-12 Thread Stéphane Pinel
I get an error Unable to access primary key each time I attempt to=20
insert or update a record. But everything seems to be OK with my PK.=20
CHECK TABLE doesn't see any problem.
Any idea ?

Regards.

Stéphane

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


issues with mysql

2003-02-21 Thread Stéphane Pinel
I've installed 3.23.53 on a MacOS X box.

verything seems to be OK except:

when I use mysql like this :

/usr/local/bin/mysql test

..no problem.

but if I want to use any option like :

/usr/local/bin/mysql  test -u

I get a zillion lines that start with
./bin/mysql Ver 11.18 Distrib 3.23.53, for apple-darwin6.2 (powerpc)
Copyright (c) 2000 MySQL AB  MyQL AB Finland ...etc...

..then the lines continue with:

Usage: ./bin/mysql [OPTIONS] [database] ..ect ect ect...

...then I'm dropped back at:

[wallstreet:~] spinel%

I've never seen this before.

mysqld is running but I'm unable to create a user with privileges.

Any idea ?

Regards.

 
---
Stéphane Pinel
Information System
Equinox Partners Paris
iChat/AIM: s.pinel
 
---

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Mysqld to listen from an other port than 3306

2002-10-06 Thread Stéphane Pinel

What is the best strategy to make mysqld listen from another port than 3306
? 

In fact we have 2 servers that handle mysql. The first is listening at port
3306 but we need that the second one listen from another port in order to
run in our local network IP Port Mapping

What is the simple way to do that ( MacOS X ).

Thanks.

-- 
Stéphane Pinel
Equinox Partners France
Information System


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Mysqld to listen from an other port than 3306 (2)

2002-10-06 Thread Stéphane Pinel

What is the best strategy to make mysqld listen from another port than 3306
? 

In fact we have 2 servers that handle mysql. The first is listening at port
3306 but we need that the second one listen from another port in order to
run in our local network IP Port Mapping

What is the simple way to do that ( MacOS X ).

Thanks.

-- 
Stéphane Pinel
Equinox Partners France
Information System


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Mysqld to listen from an other port than 3306 (2)

2002-10-06 Thread Stéphane Pinel

Le 7/10/02 7:33, « Iikka Meriläinen » [EMAIL PROTECTED] a
écrit :

 On Mon, 7 Oct 2002, Stéphane Pinel wrote:
 
 What is the best strategy to make mysqld listen from another port than 3306
 ?
 
 In fact we have 2 servers that handle mysql. The first is listening at port
 3306 but we need that the second one listen from another port in order to
 run in our local network IP Port Mapping
 
 What is the simple way to do that ( MacOS X ).
 
 Hi,
 
 Consider using --port=1234 parameter to mysqld.

Yes but if the server is down and need to be restart, this will cause some
troubles...

 
 Also, if Mac OS supports it, you can specify those parameters along with
 numerous others in my.cnf.
 

I've tried using my.cnf but it doesn't work for me. Is someone knows where
to put this file in a MacOS X binaries installation (Marc Liyanage Packages)
?

Thanks.

-- 
Stéphane Pinel
Equinox Partners France
Information System


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: install mysql on osx 10.2

2002-10-01 Thread Stéphane Pinel

Le 1/10/02 19:51, « webmaster » [EMAIL PROTECTED] a écrit :

 Hi, I am looking for some help installing mysql
 I have downloaded a copy and have it on my
 desktop , and well I am sorta wondering where to
 go from here. Because the instructions are too vague
 
 for me, as a newbie to mysql
 
 please assist   james
 

You'd better get the Marc Liyanage package and follow his very clear and
understandable instructions:

http://www.entropy.ch/software/macosx/mysql/

Regards.
-- 
Stéphane Pinel
Equinox Partners France
Information System


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




[NEWBIE] Master Account

2002-09-30 Thread Stéphane Pinel


I've just installed MySQL on a MacOS X 10.2 system. Everything is OK but I
can't find how I can login as a master to create users and give privileges ?

Thanks.

-- 
S.PINEL


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




mysql log rotate

2002-05-01 Thread Stéphane HENRY

in mysql docs, http://www.mysql.com/doc/L/o/Log_file_maintenance.html :

1) shell cd mysql-data-directory
2) shell mv mysql.log mysql.old
3) shell mysqladmin flush-logs

What's happening if there is a query between line 2 and 3, is it logged ?
How could I rotate my files without a query not logged and without stopping
the server ?

Thanks for help


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: SQL Query Help

2002-04-03 Thread Danis Stéphane (NHQ-AC)

My best code is this:

SELECT SUM(invoice_amount), state, statement_date 
FROM invoice
GROUP BY state, statement_date


The results are have followed:
+-+---++
| SUM(invoice_amount) | state | statement_date |
+-+---++
|65389.35 | Manitoba  | 2001-12-01 |
|   194224.45 | New Brunswick | 2001-12-01 |
|   271516.40 | Quebec| 2001-12-01 |
|   361673.95 | Quebec| 2002-01-01 |
+-+---++


The main problem is the layout and the order of the results set. I will have
9 state (provinces) and I would prefer the month to be the columns. The
ideal results would look like this, Please note I have only included 5 state
and there is 9 but you see what I'm looking for, also the statement_date is
always the 1st of the month: 

+-+---++
| SUM(invoice_amount) | state | statement_date |
+-+---++
|0.00 | Alberta   | 2001-12-01 |
|65389.35 | Manitoba  | 2001-12-01 |
|   194224.45 | New Brunswick | 2001-12-01 |
|0.00 | Ontario   | 2001-12-01 |
|   271516.40 | Quebec| 2001-12-01 |
|0.00 | Alberta   | 2002-01-01 |
|0.00 | Manitoba  | 2002-01-01 |
|0.00 | New Brunswick | 2002-01-01 |
|0.00 | Ontario   | 2002-01-01 |
|   361673.95 | Quebec| 2002-01-01 |
+-+---++


Stephane

-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 3:47 PM
To: Danis Stéphane (NHQ-AC); [EMAIL PROTECTED]
Subject: Re: SQL Query Help


Stéphane,

 I have INVOICE table here is the layout:


+-+---+--+-+-+--

 --+
 | Field   | Type  | Null | Key | Default |
Extra
 |

+-+---+--+-+-+--

 --+
 | ID  | int(11)   |  | PRI | NULL|
 auto_increment |
 | CLIENT_NAME | int(11)   | YES  | | NULL|
 |
 | STATE   | varchar(255)  | YES  | | NULL|
 |
 | STATEMENT_DATE  | date  | YES  | | NULL|
 |
 | INVOICE_AMOUNT  | double(16,2)  | YES  | | NULL|
 |
 | LAST_MODIFIED_DATE  | timestamp(14) | YES  | | NULL|
 |
 | ACTIVE_FLAG | tinyint(1)| YES  | | NULL|
 |

+-+---+--+-+-+--

 --+

 I would like to produce a result set that would give me the following
 report:
 it would be a sum of the INVOICE_AMOUNT grouped by state(STATE) and
 month(STATEMENT_DATE).

 ++-+-+-+-+
 | MONTH  | STATE_1 | STATE_2 | STATE_3 | ... |
 ++-+-+-+-+
 | JANUARY|1234 |   12345 | 124 | |
 | FEBRUARY   |2536 |   65874 | 457 | |
 | MARCH  |4578 |   87452 | 547 | |
 | ...| | | | |
 ++-+-+-+-+

 Any idea, I tried a bunch of different syntax without any solutions.
 mysql, query


This can be done in a single query...
How many different states do you want to list in columns?
Would it be easier to list the months as columns/switch rows and cols?
It doesn't much matter but are we talking significant numbers of rows?
What is your best code so far/the problem(s) that need fixing?

=dn

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: SQL Query Help

2002-04-03 Thread Danis Stéphane (NHQ-AC)

I didn't have time to try out your hints/techniques described in your
earlier post, but after playing around a bit with the web frontend I decided
that it would be more user intuitive to used the month as column and the
state as row... The reason being my change of heart is I also have a similar
report to build for cities, so I prefer using the variable data (ie.
state/city) as rows and keep the fixed data (ie. month) as column.

Stephane 

-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 11:01 AM
To: Danis Stéphane (NHQ-AC); [EMAIL PROTECTED]
Subject: Re: SQL Query Help


Stéphane,
Have just re-read my response...

*
The main problem is the layout and the order of the results set. I will
have
9 state (provinces) and I would prefer the month to be the columns. The
ideal results would look like this, Please note I have only included 5
state
and there is 9 but you see what I'm looking for, also the statement_date
is
always the 1st of the month:
*

After asking you if the months and states/rows and columns could be
transposed, was I dozy enough to suggest an answer that is the wrong way
around??? Whilst I would recommend that the answer table be constructed
to have fewer columns than rows, maybe you have your reasons...

If you do want to transpose the answer given, can you manage it from the
hints/techniques described, or do you need me to take another run at
it?

Regards,
=dn

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




SQL Query Help

2002-04-02 Thread Danis Stéphane (NHQ-AC)

I have INVOICE table here is the layout:

+-+---+--+-+-+--
--+
| Field   | Type  | Null | Key | Default | Extra
|
+-+---+--+-+-+--
--+
| ID  | int(11)   |  | PRI | NULL|
auto_increment |
| CLIENT_NAME | int(11)   | YES  | | NULL|
|
| STATE   | varchar(255)  | YES  | | NULL|
|
| STATEMENT_DATE  | date  | YES  | | NULL|
|
| INVOICE_AMOUNT  | double(16,2)  | YES  | | NULL|
|
| LAST_MODIFIED_DATE  | timestamp(14) | YES  | | NULL|
|
| ACTIVE_FLAG | tinyint(1)| YES  | | NULL|
|
+-+---+--+-+-+--
--+

I would like to produce a result set that would give me the following
report:
it would be a sum of the INVOICE_AMOUNT grouped by state(STATE) and
month(STATEMENT_DATE). 

++-+-+-+-+
| MONTH  | STATE_1 | STATE_2 | STATE_3 | ... |
++-+-+-+-+
| JANUARY|1234 |   12345 | 124 | |
| FEBRUARY   |2536 |   65874 | 457 | |
| MARCH  |4578 |   87452 | 547 | |
| ...| | | | |
++-+-+-+-+

Any idea, I tried a bunch of different syntax without any solutions.

Stephane
mysql, query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MySQL Book

2002-02-21 Thread Danis Stéphane (NHQ-AC)

Any book you guys recommend for learning the specific strenght of MySQL, I'm
have a Oracle background and would like to learn more on MySQL.

Stephane

SQL, Query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Best solution for a very busy MySQL server

2002-02-20 Thread Stéphane HENRY

Hello,

Have a look at :
http://www.compagnie.com/stef/solution1.jpg
http://www.compagnie.com/stef/solution2.jpg

I'm searching for a solution to change a high traffic mysql server with a
distributed system.

1)Is the solution 1 is good for a writing + reading access ? Are there
problems with locking processus ?
2)Is the solution 2 is good for :
 -direct writing to mysql server (insert, update, replace ...)
 -using MyODBC to read tables (select)

3) I found another MySQL cluster solution
http://prometheus.zerodivide.net/mysql_cluster/about/ This system uses MySQL
replication.

Thanks for advices.

Stéphane HENRY


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Cannot UPDATE mysql record in ASP

2002-02-13 Thread Danis Stéphane (NHQ-AC)

I get this error when trying to update a record using ASP recordsets.

Microsoft OLE DB Provider for ODBC Drivers error '80040e21' 
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done. 
/Web_local/admin/xt_save.asp, line 39 


What is really strange is that the line # is referencing a line where I
assign a value to a field see code below the line is marked with asterisk.

Sub Update()
Set rs = Server.CreateObject(ADODB.Recordset)
sSql = select * from table where ID=ID
rs.Open sSql,aCn,3,3
*--rs(DESCRIPTION)   = strDesc
rs(DETAILS)   = strDetails
rs(LAST_MODIFIED_DATE)= Now()
rs(ACTIVE_FLAG)   = 1
rs.Update
rs.Close
Set rs = Nothing
End Sub

I tried a bunch of different things and I always get his error, any clue on
what is going on! BTW, this is my first system using MySQL as a back end.

Stephane

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Installation of grant tables failed

2001-11-04 Thread Stéphane

Description:
I've tried to install MySQL-2.23.37 on LinuxPPC dr4 (not a recent
distribution, I know that...), from the source code (mysql-3.23.37.tar.gz).
unzip of the file was successfull, configuration and compilation seem to
have worked fine, but the installation of the grant tables failed, and
returned the following message:


[root@localhost mysql-3.23.37]# sh .scripts/mysql_install_db --log
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
mysqld got signal 11;
The manual section 'Debugging a MySQL server' tells you how to use a
stack trace and/or the core file to produce a readable backtrace that may
help in finding out why mysqld died.
Installation of grant tables failed!

Examine the logs in /usr/local/mysql/var for more information.
You can also try to start the mysqld daemon with:
/usr/local/mysql/libexec/mysqld --skip-grant 
You can use the command line tool
/usr/local/mysql/bin/mysql to connect to the mysql
database and look at the grant tables:

shell /usr/local/mysql/bin/mysql -u root mysql
mysql show tables

Try 'mysqld --help' if you have problems with paths.Using --log
gives you a log in /usr/local/mysql/var that may be helpful.

The latest information about MySQL is available on the web at ... etc...




The log file was not much more explicit :

/usr/local/mysql/libexec/mysqld, Version: 3.23.37-log, started with:
Tcp port: 3306  Unix socket: /tmp/mysql.sock
Time Id CommandArgument


At least, I would like to know what does 'mysqld got signal 11;' means,
or refers to !!
Thanks for help

How-To-Repeat:
sources of MySQL in /root
[root@localhost root]# gunzip -c mysql-3.23.37.tar.gz | tar xf -
[root@localhost root]# cd mysql-3.23.37
[root@localhost mysql-3.23.37]# /sbin/groupadd mysql
[root@localhost mysql-3.23.37]# /sbin/useradd -g mysql mysql
[root@localhost mysql-3.23.37]# ./configure --prefix=/usr/local/mysql --with-low-memory

[root@localhost mysql-3.23.37]# make ; make install

[root@localhost mysql-3.23.37]# sh .scripts/mysql_install_db --log

here, I get message saying that mysqld got signal 11, and that
installation of grant tables failed


Fix:

Submitter-Id:  KLEGOU stéphane
Originator:root
Organization:Personnal user
MySQL support: none
Synopsis:  'mysqld got signal 11;' when I've tried to install the grant
tables with the command-line 'sh .scripts/mysql_install_db --log', and
installation of grant tables failed.
Severity:  non-critical
Priority:  medium
Category:  mysql
Class: support
Release:   mysql-3.23.37 (Source distribution)

Environment:
PowerMacintosh 5500/275
MacOS 8.1
System: Linux localhost.localdomain 2.2.1 #101 Fri Feb 5 16:17:12 EST
1999 ppc unknown
Architecture: ppc

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from 
/opt/egcs/lib/gcc-lib/powerpc-unknown-linux-gnulibc1/egcs-2.90.25/specs
gcc version egcs-2.90.25 980302 (egcs-1.0.2 prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx   1 root root   12 Nov  1 00:46 /lib/libc.so.6 - libc-1.99.so
-rwxr-xr-x   1 root root   909419 Jun 16  1998 /lib/libc-1.99.so
-rw-r--r--   1 root root  1672250 Jun 16  1998 /usr/lib/libc.a
-rwxr-xr-x   1 root root  332 Jun 16  1998 /usr/lib/libc.so
Configure command: ./configure  --prefix=/usr/local/mysql --with-low-memory
Perl: This is perl, version 5.004_01


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




UPDATE :-(

2001-04-25 Thread Stéphane PRIN

 database,sql,query

 Hi everybody,
 
 i have 2 tables
 
 1) test
 - id_test
 - country_name
 - etc...
 
 2) country
 - id_country
 - contry_name
 
 
 i want to join this 2 tables in case of  deuce of the country_name
 and update test.id_test with the value of country.id_country
 
 i try tis syntax: update test,country set id = country.id_country where
 test.country_name = country.country_name
 but it doesn't works ...
 
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php