Re: administrtor-user

2006-10-23 Thread Renish

in windows.. Pls explain me as though I am a beginner.

- Original Message - 
From: Visolve DB Team [EMAIL PROTECTED]

To: Renish [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Monday, October 23, 2006 12:49 PM
Subject: Re: administrtor-user



Hi,
On which platform?
It do good in Linux and Unix.

Thanks
ViSolve DB Team.
- Original Message - 
From: Renish [EMAIL PROTECTED]

To: Visolve DB Team [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Monday, October 23, 2006 10:05 AM
Subject: Re: administrtor-user


I am using sql 4.1.21. useradd mysql itself is not working

Regards
 - Original Message - 
 From: Visolve DB Team

 To: Renish ; mysql@lists.mysql.com
 Sent: Monday, October 23, 2006 12:17 PM
 Subject: Re: administrtor-user


 Hi

 First,

shell useradd mysql
 Changing UserName and Group name for data directory
shell chown -R mysql:mysql data
  Create Initial database
 shell scripts/mysql_install_db   --user=mysql
  Start the Server

 Then to User:

 First, use the mysql program to connect to the server as the MySQL root 
user:

 shell mysql --user=root mysql

 1.  After connecting to the server as root, you can add new accounts. The 
following statements use

 GRANT to set up four new accounts:
 mysql GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'  IDENTIFIED 
BY 'some_pass' WITH GRANT OPTION;

 [OR]
 mysql GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'  IDENTIFIED BY 
'some_pass' WITH GRANT OPTION;


 2. mysql INSERT INTO user (Host,User,Password) 
VALUES('localhost','UN','PWD');



 Then to Change Password:

 1. Passwords may be assigned from the command line by using the 
mysqladmin command:

 shell mysqladmin -u user_name -h host_name password newpwd

 2. Another way to assign a password to an account is to issue a SET 
PASSWORD statement:

 mysql SET PASSWORD FOR 'jeffrey'@'%' = PASSWORD('biscuit');

 3. mysql SET PASSWORD = PASSWORD('biscuit');


 To Drop user:

 1. mysql DELETE FROM user WHERE User='' and HOST=''


 Thanks
 ViSolve DB Team.
 - Original Message - 
 From: Renish [EMAIL PROTECTED]

 To: mysql@lists.mysql.com
 Sent: Monday, October 23, 2006 9:30 AM
 Subject: administrtor-user


  Can u guys tell me..
 
  How can I be the administrator for the mysql and thenI I need to create
  users x, y,z and assign them a password.
  and give them privilages..
 
 
  -- 
  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: administrtor-user

2006-10-23 Thread Visolve DB Team

Hi,

Pls plaly with the link for Info :
http://fogwater.com/Articles/InstallingMySQLforWindows.html
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
http://dev.mysql.com/tech-resources/articles/securing_mysql_windows.html

MySQL Administrator for Windows 1.0.12 A powerful visual administration 
console that enables you to easily administer your MySQL environment.

http://www.softpedia.com/get/Internet/Servers/Database-Utils/MySQL-Administrator-for-Windows.shtml

Thanks
ViSolve DB Team.

- Original Message - 
From: Renish [EMAIL PROTECTED]

To: Visolve DB Team [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Monday, October 23, 2006 11:16 AM
Subject: Re: administrtor-user



in windows.. Pls explain me as though I am a beginner.

- Original Message - 
From: Visolve DB Team [EMAIL PROTECTED]

To: Renish [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Monday, October 23, 2006 12:49 PM
Subject: Re: administrtor-user



Hi,
On which platform?
It do good in Linux and Unix.

Thanks
ViSolve DB Team.
- Original Message - 
From: Renish [EMAIL PROTECTED]
To: Visolve DB Team [EMAIL PROTECTED]; 
mysql@lists.mysql.com

Sent: Monday, October 23, 2006 10:05 AM
Subject: Re: administrtor-user


I am using sql 4.1.21. useradd mysql itself is not working

Regards
 - Original Message - 
 From: Visolve DB Team

 To: Renish ; mysql@lists.mysql.com
 Sent: Monday, October 23, 2006 12:17 PM
 Subject: Re: administrtor-user


 Hi

 First,

shell useradd mysql
 Changing UserName and Group name for data directory
shell chown -R mysql:mysql data
  Create Initial database
 shell scripts/mysql_install_db   --user=mysql
  Start the Server

 Then to User:

 First, use the mysql program to connect to the server as the MySQL root 
user:

 shell mysql --user=root mysql

 1.  After connecting to the server as root, you can add new accounts. 
The following statements use

 GRANT to set up four new accounts:
 mysql GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' 
IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

 [OR]
 mysql GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'  IDENTIFIED BY 
'some_pass' WITH GRANT OPTION;


 2. mysql INSERT INTO user (Host,User,Password) 
VALUES('localhost','UN','PWD');



 Then to Change Password:

 1. Passwords may be assigned from the command line by using the 
mysqladmin command:

 shell mysqladmin -u user_name -h host_name password newpwd

 2. Another way to assign a password to an account is to issue a SET 
PASSWORD statement:

 mysql SET PASSWORD FOR 'jeffrey'@'%' = PASSWORD('biscuit');

 3. mysql SET PASSWORD = PASSWORD('biscuit');


 To Drop user:

 1. mysql DELETE FROM user WHERE User='' and HOST=''


 Thanks
 ViSolve DB Team.
 - Original Message - 
 From: Renish [EMAIL PROTECTED]

 To: mysql@lists.mysql.com
 Sent: Monday, October 23, 2006 9:30 AM
 Subject: administrtor-user


  Can u guys tell me..
 
  How can I be the administrator for the mysql and thenI I need to 
create

  users x, y,z and assign them a password.
  and give them privilages..
 
 
  -- 
  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]



Does 'insert' return a value?

2006-10-23 Thread 黄小聪

When I insert a record into a table
Does the insert return a value that where the record have been inserted
into?


RE: Reports

2006-10-23 Thread andy.lawton
Try this:

www.eclipse.org/birt

Andy

-Original Message-
From: Kristen G. Thorson [mailto:[EMAIL PROTECTED] 
Sent: 20 October 2006 15:07
To: Ahmad Al-Twaijiry; MySQL List
Subject: RE: Reports

 -Original Message-
 From: Ahmad Al-Twaijiry [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 20, 2006 10:00 AM
 To: MySQL List
 Subject: Reports
 
 Hi everyone
 
 do you know any good (free) application that make it easy to generate
 (with charts) a very nice reports from mysql ?



This is a very good tool.  I don't use the charts features, so I'm not
sure how advanced those are.

http://jasperforge.org/sf/projects/ireport


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



Re: Does 'insert' return a value?

2006-10-23 Thread Chris

黄小聪 wrote:

When I insert a record into a table
Does the insert return a value that where the record have been inserted
into?


No.

You need to select last_insert_id() or use a function in your 
programming language (eg php has php.net/mysql_insert_id).


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



Upgrade issue

2006-10-23 Thread Ben Clewett

MySQL,

I am trying to upgrade from 4.1 to 5.1.

Your manual states I should run mysql_upgrade.

But there is no such program in our pre-compiled binary, only a man page!

$ find . -name mysql_upgrade*
./mysql-5.1.11-beta-aix5.2-powerpc-64bit/man/man1/mysql_upgrade.1

However the on-line manual states the follows does the same thing:

$ mysqlcheck --check-upgrade --all-databases --auto-repair
$ mysql_fix_privilege_tables

Is this safe?

I only ask because the last time I tried to upgrade, MySQL core-dumped 
every few minutes when an unknown user connected.  So I am looking at 
every incontinuity to try and work out if this is the reason.


Thanks for any help,

Ben Clewett.







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



Re: Does 'insert' return a value?

2006-10-23 Thread Martijn Tonies



 When I insert a record into a table
 Does the insert return a value that where the record have been inserted
 into?

What do you mean by where the record have been inserted into?

The physical position?

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

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



RE: help with query: select customers that ARO NOT in orders table

2006-10-23 Thread Jerry Schwartz
Is a sub-select more efficient than an outer join?

SELECT cust_id FROM customers LEFT JOIN orders on customers.cust_id =
  orders.cust_id WHERE orders.cust_id IS NULL;

Or am I missing something (as usual)?

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


 -Original Message-
 From: Waldemar Jankowski [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 20, 2006 1:53 PM
 To: [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Subject: Re: help with query: select customers that ARO NOT
 in orders table

 On Fri, 20 Oct 2006, [EMAIL PROTECTED] wrote:

  hi to all,
  I have table customers (PK cust_id)
  I have table orders (PK order_id, FK cust_id)
 
  I need query that will selecct all customers from
 'customers' they don't
  have any order, there is not their cust_id in 'orders'.
 
  couls somebody help me?
 
  thanks.
 
  -afan

 I think the most explicit way is with a sub select:

 select cust_id from customers where
 cust_id not in
   (select cust_id from orders);

 -w

  --
  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: help with query: select customers that ARO NOT in orders t

2006-10-23 Thread Waldemar Jankowski
You're right. A join is often more efficient than a subselect especially 
if you have good indices set up.  I believe the IS NULL will also get 
optimized away in your query. In this example I personally like the 
subselect syntax for it's explicitness if the speed difference is negligible.
For large data sets I would definetly go with your solution of using an 
outer join.


Waldemar

On Mon, 23 Oct 2006, Jerry Schwartz wrote:


Is a sub-select more efficient than an outer join?

SELECT cust_id FROM customers LEFT JOIN orders on customers.cust_id =
 orders.cust_id WHERE orders.cust_id IS NULL;

Or am I missing something (as usual)?

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341



-Original Message-
From: Waldemar Jankowski [mailto:[EMAIL PROTECTED]
Sent: Friday, October 20, 2006 1:53 PM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: help with query: select customers that ARO NOT
in orders table

On Fri, 20 Oct 2006, [EMAIL PROTECTED] wrote:


hi to all,
I have table customers (PK cust_id)
I have table orders (PK order_id, FK cust_id)

I need query that will selecct all customers from

'customers' they don't

have any order, there is not their cust_id in 'orders'.

couls somebody help me?

thanks.

-afan


I think the most explicit way is with a sub select:

select cust_id from customers where
cust_id not in
(select cust_id from orders);

-w


--
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]



replica on 5.0.26 doesn't work any more

2006-10-23 Thread Enzo Arlati
Hi 
I upgrade mysql on win2000 from 5.0.18 to 5.0.26.

Inside my.ini I have this setup
# 
# Replica DB
# 
server-id=1
log-bin=pmv_manager_log_bin
relay-log=fep1-relay-bin
replicate-ignore-table=pmv_manager.parametri_configurazione
replicate-ignore-table=pmv_manager.lista_fep
replicate-ignore-table=pmv_manager.stato_fep_slave
replicate-ignore-table=pmv_manager.debug_log

At startup I get the following error:
061023 15:48:24  InnoDB: Started; log sequence number 0 266563613
061023 15:48:24 [ERROR] Error reading master configuration
061023 15:48:24 [ERROR] Failed to initialize the master info structure
061023 15:48:24 [Note] c:\Programmi\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready 
for connect

Also whe I try to setup the master_host with the command:
change master to master_host='';

I get the error 061023 16:01:01 [ERROR] Error reading master configuration in 
the err log.

With the old revision of mysql all this works fine.
Someone of you have a problem like this and mybe some suggestions on how solve 
it ??

regrds, Enzo

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



R: replica on 5.0.26 doesn't work any more

2006-10-23 Thread Enzo Arlati

Now it's ok
I have just deleted all logs and relay files included master.info and 
relay-log.info.
The log files were named fep1_x, while the host is named differently ( 
\\arlati-e ).
Mybe the relay-log=fep1-relay-bin is not working well, so the replication 
looks only for files named arlati-e_ despite the realay-log directive.


-Messaggio originale-
Da: Enzo Arlati 
Inviato: lunedì 23 ottobre 2006 16.04
A: [EMAIL PROTECTED] Mysql. Com (E-mail)
Oggetto: replica on 5.0.26 doesn't work any more


Hi 
I upgrade mysql on win2000 from 5.0.18 to 5.0.26.

Inside my.ini I have this setup
# 
# Replica DB
# 
server-id=1
log-bin=pmv_manager_log_bin
relay-log=fep1-relay-bin
replicate-ignore-table=pmv_manager.parametri_configurazione
replicate-ignore-table=pmv_manager.lista_fep
replicate-ignore-table=pmv_manager.stato_fep_slave
replicate-ignore-table=pmv_manager.debug_log

At startup I get the following error:
061023 15:48:24  InnoDB: Started; log sequence number 0 266563613
061023 15:48:24 [ERROR] Error reading master configuration
061023 15:48:24 [ERROR] Failed to initialize the master info structure
061023 15:48:24 [Note] c:\Programmi\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready 
for connect

Also whe I try to setup the master_host with the command:
change master to master_host='';

I get the error 061023 16:01:01 [ERROR] Error reading master configuration in 
the err log.

With the old revision of mysql all this works fine.
Someone of you have a problem like this and mybe some suggestions on how solve 
it ??

regrds, Enzo

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



Re: Upgrade issue

2006-10-23 Thread Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem
On Mon, Oct 23, 2006 at 01:49:14PM +0100, Ben Clewett wrote:
 MySQL,
 
 I am trying to upgrade from 4.1 to 5.1.
 
 Your manual states I should run mysql_upgrade.
 
 But there is no such program in our pre-compiled binary, only a man page!
 
 $ find . -name mysql_upgrade*
 ./mysql-5.1.11-beta-aix5.2-powerpc-64bit/man/man1/mysql_upgrade.1
 
 However the on-line manual states the follows does the same thing:
 
 $ mysqlcheck --check-upgrade --all-databases --auto-repair
 $ mysql_fix_privilege_tables
 
 Is this safe?
 
 I only ask because the last time I tried to upgrade, MySQL core-dumped 
 every few minutes when an unknown user connected.  So I am looking at 
 every incontinuity to try and work out if this is the reason.
 
 Thanks for any help,
 
 Ben Clewett.
 


Go from 4.1 to 5.0 to 5.1  .  This is safer.
 
 
 
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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



Re: Upgrade issue

2006-10-23 Thread Ben Clewett

Hi David,

 Go from 4.1 to 5.0 to 5.1  .  This is safer.

Thanks for the advise, I'll plan this route.

I still have the problem that 5.1 has no 'mysql_upgrade' program.

I would really be interested in hearing from somebody from MySQL.  Does 
this version need no upgrading?  I am confused...


Regards,

Ben


Dave Shariff Yadallee - System Administrator a.k.a. The Root of the 
Problem wrote:

On Mon, Oct 23, 2006 at 01:49:14PM +0100, Ben Clewett wrote:

MySQL,

I am trying to upgrade from 4.1 to 5.1.

Your manual states I should run mysql_upgrade.

But there is no such program in our pre-compiled binary, only a man page!

$ find . -name mysql_upgrade*
./mysql-5.1.11-beta-aix5.2-powerpc-64bit/man/man1/mysql_upgrade.1

However the on-line manual states the follows does the same thing:

$ mysqlcheck --check-upgrade --all-databases --auto-repair
$ mysql_fix_privilege_tables

Is this safe?

I only ask because the last time I tried to upgrade, MySQL core-dumped 
every few minutes when an unknown user connected.  So I am looking at 
every incontinuity to try and work out if this is the reason.


Thanks for any help,

Ben Clewett.




Go from 4.1 to 5.0 to 5.1  .  This is safer.
 





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






--
Ben Clewett
+44(0)1923 46
Project Manager
Road Tech Computer Systems Ltd
http://www.roadrunner.uk.com

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



Re: Upgrade issue

2006-10-23 Thread Ben Clewett

Hi David,

 Go from 4.1 to 5.0 to 5.1  .  This is safer.

Thanks for the advise, I'll plan this route.

I still have the problem that 5.1 has no 'mysql_upgrade' program.

I would really be interested in hearing from somebody from MySQL.  Does 
this version need no upgrading?  I am confused...


Regards,

Ben


Dave Shariff Yadallee - System Administrator a.k.a. The Root of the 
Problem wrote:

On Mon, Oct 23, 2006 at 01:49:14PM +0100, Ben Clewett wrote:

MySQL,

I am trying to upgrade from 4.1 to 5.1.

Your manual states I should run mysql_upgrade.

But there is no such program in our pre-compiled binary, only a man page!

$ find . -name mysql_upgrade*
./mysql-5.1.11-beta-aix5.2-powerpc-64bit/man/man1/mysql_upgrade.1

However the on-line manual states the follows does the same thing:

$ mysqlcheck --check-upgrade --all-databases --auto-repair
$ mysql_fix_privilege_tables

Is this safe?

I only ask because the last time I tried to upgrade, MySQL core-dumped 
every few minutes when an unknown user connected.  So I am looking at 
every incontinuity to try and work out if this is the reason.


Thanks for any help,

Ben Clewett.




Go from 4.1 to 5.0 to 5.1  .  This is safer.
 





--
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]



warn before mentioning deprecated material

2006-10-23 Thread Dan Jacobson
In the manual we see:

   * Columns selected for output can be referred to in `ORDER BY' and
 `GROUP BY' clauses using column names, column aliases, or column
 positions.  Column positions are integers and begin with 1:

  mysql SELECT college, region, seed FROM tournament
  - ORDER BY region, seed;
  mysql SELECT college, region AS r, seed AS s FROM tournament
  - ORDER BY r, s;
  mysql SELECT college, region, seed FROM tournament
  - ORDER BY 2, 3;

 To sort in reverse order, add the `DESC' (descending) keyword to
 the name of the column in the `ORDER BY' clause that you are
 sorting by.  The default is ascending order; this can be specified
 explicitly using the `ASC' keyword.

 Use of column positions is deprecated because the syntax has been
 removed from the SQL standard.

Only in the last sentence are we alerted that what we have just
studied is deprecated! Warn before, not after, mentioning deprecated
material.

P.S., mention how to SELECT * except one or two fields. E.g., one
wants to SELECT 24 of the 25 fields. Does he have to list all 24 in
the command or is there some shortcut to say SELECT * EXCPET nurd?
Or is he best just piping to Unix cut(1).

P.S., in 12.3 String Functions
mention how one can do the equivalent of Unix cat -v, to convert non
printable characters into something printable. (I don't want to send a
0x83 to iconv -f big5 -t utf8, but at the same time don't want to use
ASCII() on perfectly printable ASCII. Maybe I could use
EXPORT_SET() but it is documented over my head.
OK, did SELECT IF(ASCII(x)127,ASCII(x),x) for now.

P.S., make valid HTML:
$ mysql -H ...|validate
*** Errors: ***
Error at line 1, character 1:  missing document type declaration; assuming
HTML 4.01 Transitional
Error at line 1, character 16:  document type does not allow element
TABLE here
And why don't you (optionally, default=yes) throw a newline in after
each line, in case one ever needs to view the source.
$ mysql -H ...|wc
  0 476   31519
By gosh, that is the longest line I have ever encountered in my life
with computers.

While you are at it, here we have to look into the 180+ column to get
at the meat of this error message:
 ERROR 1064 (42000) at line 1: 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 'SEPARATOR ' '' at line 1
Perhaps add newlines, or put the meat before column 80, or both.

P.S., admit the bug mailing address mysql@lists.mysql.com at the end
of the bug submission discussion, so e.g., even if mysqlbug is broken,
one can still get thru.

P.S., GNU General Public License: their address is no longer on Temple Place.

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



big5 stored as latin1 and want utf

2006-10-23 Thread Dan Jacobson
In the manual we see
  If you have non-`latin1' data stored in a 4.0 `latin1' table and want
  to convert the table column definitions to reflect the actual character
  set of the data, use the instructions in *Note Charset-conversion::.

But what about e.g., users who have big5 data sorted as latin1 but
want it instead converted and stored as utf8? Do also mention it.

A table with 25 fields, most of which varchar, he will surely need to
manually do many commands.

OK, gasp,
$ mysqldump --default-character-set=binary test dict|
  iconv -f big5 -t utf8|sed s/latin1/utf8/g\;s/dict/dict2/g|mysql test
$ echo SELECT * from dict2;|mysql --default-character-set=utf8  
data_unscathed

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



Creating new table from distinct entries

2006-10-23 Thread Alan Milnes

MySQL 4.1.21-community-nt

I have a table in my database that has a Primary key on 2 fields  (MyID 
and MyChange) and a field that indicates if there is a problem with the 
record (MyError)- I want to create a new table that only has unique 
MyIDs and where there is more than 1 I only want the record with the 
highest MyChange number.  The table has about 50 fields so I have the 
following code:-


CREATE TABLE mystats SELECT  *, DISTINCT MyID FROM oldstats WHERE 
MyError IS NULL ORDER BY MyChange DESC ;


but I am getting an MySQL error #1064.

Any ideas or suggestions as to where I am going wrong?

Alan

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