MySQL SQL statistics

2006-08-07 Thread
Hello everyone:

I want to get some SQL statistics including executions, CPU time for each SQL 
Statement.

How can I get it from MySQL?

regards,

Gu Lei

Re: MySQL SQL statistics

2006-08-07 Thread
Thanks a lot for your reply.

I need know SQLs that consume most resources(CPU time, disk IO etc.) of 
database server.

Sometimes the same SQL could be executed many times to hold most time of CPU.
Sometimes executed only one time.

Maybe I can say I am looking for something like STATSPACK of Oracle for MySQL.

Regards,

Gu Lei
- Original Message - 
From: Daniel da Veiga [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, August 08, 2006 12:43 AM
Subject: Re: MySQL SQL statistics


 On 8/7/06, 古雷 [EMAIL PROTECTED] wrote:
 Hello everyone:

 I want to get some SQL statistics including executions, CPU time for each 
 SQL Statement.
 
 The number of each type of query can be found using the show status
 like 'Com%';, I don't believe there's a way to know how much CPU time
 MySQL is using for each query, for once, it would be different on each
 OS MySQL can run (there are a lot), also, it would take CPU time to
 check that ;-). I can't see any advantage of knowing this... Depending
 on your OS, you can check the whole MySQL process resources with
 specific commands like top on *ix or CTRL+ALT+DEL on windows.
 
 -- 
 Daniel da Veiga
 Computer Operator - RS - Brazil
 -BEGIN GEEK CODE BLOCK-
 Version: 3.1
 GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
 PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
 --END GEEK CODE BLOCK--
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: May I create more than 200 databases for one mysqld?

2006-07-10 Thread
Thanks a lot!
- Original Message - 
From: paul rivers [EMAIL PROTECTED]
To: '古雷' [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Monday, July 10, 2006 11:41 AM
Subject: RE: May I create more than 200 databases for one mysqld?


 Yes, you can.
 
 Whether there are disadvantages depends mainly on how you are using mysql.
 
 When there are many databases (an order of magnitude or more than what you
 propose), some people report that show databases can be slow.  
 
 Otherwise, the disadvantages are mainly administrative.  For example, do you
 find permissions and accounts too messy for that many databases?  When you
 are trying to troubleshoot activity in one database by examining the client
 log, is it too noisy due to the other databases?  Do you find it too
 burdensome to upgrade that many databases from one version to the next?
 
 Since mysql is threaded, sometimes it makes sense to run multiple mysqld
 processes on the same machine.  But again, this is more an administrative
 decision than a technical one.  200+ databases is certainly well within
 practical mysqld limits.
 
 Regards,
 Paul
 
 -Original Message-
 From: 古雷 [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, July 09, 2006 8:27 PM
 To: mysql@lists.mysql.com
 Subject: May I create more than 200 databases for one mysqld?
 
 May I create more than 200 databases for one mysqld?
 And is there any disadvantage when there're many databases on one mysqld?
 
 Thanks.
 
 Regards,
 
 Gu Lei


May I create more than 200 databases for one mysqld?

2006-07-09 Thread
May I create more than 200 databases for one mysqld?
And is there any disadvantage when there're many databases on one mysqld?

Thanks.

Regards,

Gu Lei

Re: finding the slow query

2006-06-20 Thread
Hi,

Maybe you can use --log-slow-queries.

http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html

Gu Lei
- Original Message - 
From: Peter Van Dijck [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, June 20, 2006 3:49 PM
Subject: finding the slow query


 Hi,
 I have some troubles finding the slowest queries.
 
 My server has regular high loads when a lot of queries that hit the
 same tables slow down. The question is, which query is slowing it
 down? The others are probably just slow because the whole thing is
 slow.
 
 And a related question: what's a good strategy to figure out if table
 locking is causing queries to be slow?
 
 Thanks for any pointers,
 Peter
 
 -- 
 find videoblogs: http://mefeedia.com
 my blog: http://poorbuthappy.com/ease/
 my job: http://petervandijck.net
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: ERROR 2013 (HY000): Lost connection to MySQL server during query

2006-06-08 Thread
Hello

That version is quite old and is an alpha version. I think you can download a 
release for production use.

Gu Lei
- Original Message - 
From: murthy gandikota [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Thursday, June 08, 2006 9:04 PM
Subject: ERROR 2013 (HY000): Lost connection to MySQL server during query


 Hi,
 I am getting this error. Can anyone please help?
 
 mysql create table sfgbackup.advEmail select * from sfg.advEmail;
 ERROR 2013 (HY000): Lost connection to MySQL server during query
 Bye
 [EMAIL PROTECTED] mgandikota]$ mysql -V
 mysql  Ver 14.7 Distrib 5.0.2-alpha, for pc-linux (i686)
 
 
 Thanks
 Murthy
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com

mysql-5.0/Docs

2006-06-08 Thread
Hello:

In MySQL Internals Manual:

With the BitKeeper downloads, /Docs is nearly empty. The important files are 
only present if you do a regular source-file download, or if you do a separate 
'bk clone' for 'mysqldoc' instead of 'mysql-5.0' (in which case this major 
directory is mysqldoc/Docs instead of mysql-5.0/Docs). 

Then how can I download that docs ? What is the exact command ?

Thanks.

Regards,

Gu Lei



Re: mysql-5.0/Docs

2006-06-08 Thread

Thanks a lot.

In MySQL Internals Manual:

At this moment, internals.xml has over 100 pages of information, including 
some details about the formats of MySQL files that you won't find anywhere 
else, and a complete description of the message formats that the client and 
server use to communicate. Although it's rough and may contain errors and is 
obsolete in parts, it is a document that you must read to truly understand the 
workings of MySQL. 

Where is that over 100 pages of information ? And how could I get it?

Regards,

Gu Lei
- Original Message - 
From: Paul DuBois [EMAIL PROTECTED]
To: åˆóã [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Friday, June 09, 2006 10:22 AM
Subject: Re: mysql-5.0/Docs


At 9:52 +0800 6/9/06, å^óã wrote:
Hello:



In MySQL Internals Manual:



With the BitKeeper downloads, /Docs is nearly 
empty. The important files are only present if 
you do a regular source-file download, or if you 
do a separate 'bk clone' for 'mysqldoc' instead 
of 'mysql-5.0' (in which case this major 
directory is mysqldoc/Docs instead of 
mysql-5.0/Docs). 



Then how can I download that docs ? What is the exact command ?

The documentation repository is maintained using Subversion.
Check out a copy with this command:

svn checkout http://svn.mysql.com/svnpublic/mysqldoc/

See:

http://dev.mysql.com/tech-resources/sources.html

If you just want to download pre-built documentation in various
output formats:

http://dev.mysql.com/doc/

-- 
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Re: mysql-5.0/Docs

2006-06-08 Thread
hahaha, I see. Thank you very much.

Regards,

Gu Lei

- Original Message - 
From: Paul DuBois [EMAIL PROTECTED]
To: åˆóã [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Friday, June 09, 2006 11:02 AM
Subject: Re: mysql-5.0/Docs


At 10:45 +0800 6/9/06, å^óã wrote:
Thanks a lot.



In MySQL Internals Manual:



At this moment, internals.xml has over 100 
pages of information, including some details 
about the formats of MySQL files that you won't 
find anywhere else, and a complete description 
of the message formats that the client and 
server use to communicate. Although it's rough 
and may contain errors and is obsolete in parts, 
it is a document that you must read to truly 
understand the workings of MySQL. 


Where is that over 100 pages of information ? And how could I get it?

It's the document from which you're quoting.

-- 
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

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


Where is the more detailed document of MySQL Network?

2006-04-16 Thread
Hello:

For example:
What does Web Access and Remote Troubleshooting mean in this page
https://shop.mysql.com/network.html?rz=s2

regards,
gu lei

How could I know which transaction or thread hold the lock

2006-04-06 Thread
Hello:

How could I know  which transaction or thread hold the lock?

For example:

show innodb status\G

---TRANSACTION 0 78076313, ACTIVE 3906 sec, process no 12729, OS thread id 
2952076208 starting index read
mysql tables in use 1, locked 1
LOCK WAIT 2 lock struct(s), heap size 1024
MySQL thread id 268, query id 40997 localhost root Updating
UPDATE CORPSMSINFO SET PERMISSIONS='1000' WHERE 
CUSTOMERID='100010A'
--- TRX HAS BEEN WAITING 13 SEC FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 20032 n bits 192 index `PRIMARY` of table 
`ea191/CORPSMSINFO` trx id 0 78076313 lock_mode X locks rec but not gap waiting
Record lock, heap no 122 PHYSICAL RECORD: n_fields 19; compact format; info 
bits 0
 0: len 11; hex 3130303030303030313041; asc 100010A;; 1: len 6; hex 
04a755e1; asc U ;; 2: len 7; hex 00562927be; ascV)' ;; 3: len 
3; hex 415350; asc ASP;; 4: len 4; hex 4435c9e1; asc D5  ;; 5: len 5; hex 
61646d696e; asc admin;; 6: len 4; hex 4434cb9b; asc D4  ;; 7: len 4; hex 
4434cb9b; asc D4  ;; 8: len 1; hex 30; asc 0;; 9: SQL NULL; 10: SQL NULL; 11: 
SQL NULL; 12: len 4; hex 4434cb9b; asc D4  ;; 13: len 4; hex 4434cb9b; asc D4  
;; 14: len 1; hex 30; asc 0;; 15: len 2; hex 3220; asc 2 ;; 16: SQL NULL; 17: 
len 30; hex 313030303030303030303030303030303030303030303030303030303030; asc 
10;...(truncated); 18: len 4; hex 8000; asc 
;;

--

How could I find which one hold that lock?

Regards,

gu lei

Re: Multiple-Master Replication recovery

2006-03-29 Thread
Thanks a lot. I'll try.
- Original Message - 
From: Kishore Jalleda [EMAIL PROTECTED]
To: 古雷 [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Wednesday, March 29, 2006 11:53 PM
Subject: Re: Multiple-Master Replication recovery


 any one of the servers could go down in many ways like
 1) disk crash
 2) replication failure
 3) power failure
 4) any hardware component failure
 5) OS hang
 6) Network failure
 7) MYSQL bug
 8) table corruption etc ...
 9) or just scheduled donwtime
 
 in any case what really matters is the difference in status of the failed
 server from the point of failure to the point of recovery , so it all
 depends on how up-to-date your data is on the failed server.. here are some
 typical cases ..
 1) you have everything intact ( data, bin logs, *.info files, etc ) then
 just bring back the failed server online and you are good to go
 2) if you rebuild the server from scratch it depends on how current your
 backup is , in this take a snapshot of the main server ( either hot or cold
 depending on your setup) and start the multi-master replication ..
 
 In theory you really dont have to take the server offline unless it really
 demands , in the worst case as Barry said its lot easier to shut down the
 master (if you can afford some downtime) take a complete
 snapshot/backup/dump ( varies for MYISAM and INNODB)  and bring back the
 failed server back online
 
 Hope this helps
 
 Kishore Jalleda
 
 
 On 3/28/06, 古雷 [EMAIL PROTECTED] wrote:

 Hello:

 If I use Multiple-Master Replication with two mysql server, when one of
 them goes down(disk crashed) must I shutdown the good one to recover the
 Multiple-Master Replication ?

 regards,

 gu lei


C API Prepared Statement Data types with unsigned int

2006-03-29 Thread
mysql desc MSGDB_20060330;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| CREATETIME| char(14)| NO   | | |   |
| MESSAGEUUID   | char(33)| YES  | MUL | |   |
| SMSSEQ| int(10) unsigned| NO   | PRI | 0   |   |
| DESTTERMID| varchar(80) | YES  | | |   |
| MSGOVER   | smallint(6) | YES  | | |   |
| ERRORCODE | int(11) | YES  | | |   |
| MSGIDREPLY| bigint(20) unsigned | YES  | MUL | |   |
| OVERTIME  | char(14)| YES  | | |   |
| REPLYOVER | smallint(6) | YES  | | |   |
| REPLYOVERTIME | char(14)| YES  | | |   |
| MSGSTATUS | varchar(20) | YES  | | |   |
+---+-+--+-+-+---+

SMSSEQ is int unsigned.

This is part of my code:

unsigned int parm_smsSeq_;

 bindResParm_[parmNum].buffer_type = MYSQL_TYPE_LONG;
 bindResParm_[parmNum].buffer = (char*)parm_smsSeq_;
 bindResParm_[parmNum].is_null = 0;
 bindResParm_[parmNum].length = 0;

When parm_smsSeq is grater than max value of signed int, I always get an zero 
value in that table after INSERT INTO SMSSEQ.

Please help me.

regards,

gu lei

祝您工作顺利,身体健康,家庭和睦,一切吉祥。

古雷

中企动力科技集团
技术架构部


Multiple-Master Replication recovery

2006-03-28 Thread
Hello:

If I use Multiple-Master Replication with two mysql server, when one of them 
goes down(disk crashed) must I shutdown the good one to recover the 
Multiple-Master Replication ?

regards,

gu lei

Re: Unicode (UTF-8) question

2006-03-23 Thread
http://dev.mysql.com/doc/refman/5.0/en/myodbc-windows-binary-installation.html

I don't know how to use Delphi. But I think Delphi is easy to use ODBC just 
like VB or PB.

Run set names utf8 just like a normal SQL statement after connect.

If you don't understand let me know.

regards,

gu lei

- Original Message - 
From: Daniel Levy [EMAIL PROTECTED]
To: 古雷 [EMAIL PROTECTED]
Sent: Thursday, March 23, 2006 3:26 PM
Subject: Re: Unicode (UTF-8) question


 Dear Gu Lei,
 
 Again, thank you very much for your reply and your help.
 
 I'm working with MySQL 5.0.18-nt via TCP/IP, MyODBC 3.51.12.00, and Delphi 5 
 on Windows XP Pro. The database in installed locally on the computer.
 
 From what you say, I understand that you need to set set names utf8 before 
 every attempt to connect to the db and retrieve data. Is this correct?
 
 Also, in the sample code you sent me, you call routines defined in 
 odbc32.dll, such as SQLAllocHandle and SQLExecDirect. Is there a file on the 
 internet with the definitions (interface) of the routines defined in this 
 dll, so that I can call them from Delphi?
 
 Thanks again. Best regards,
 Daniel
 
 
 
 - Original Message - 
 From: 古雷 [EMAIL PROTECTED]
 To: Daniel Levy [EMAIL PROTECTED]
 Sent: Thursday, March 23, 2006 3:41 AM
 Subject: Re: Unicode (UTF-8) question
 
 
 Daniel Levy,

 My pleasure.

 We have serveral communication servers such as mail server, SIP server and 
 conference server. All of them connect to and get data from a server 
 called PS server. And PS server read and write data from and to MySQL5.0 
 through MyODBC. Some of the data include Chinese. We use utf8 to store 
 Chinese in MySQL. All of those servers are on Linux.

 We use mysql-connector-odbc 3.51.12.
 Before this version mysql-connector-odbc reconnected to MySQL 
 automatically after connection lost. After reconnection ,variables' value 
 set by set unames utf8 were restored to default latin1. At that time 
 PS server can not read and write correct Chinese from and to MySQL.

 I don't know if what I said is enough.

 Regards,

 gu lei

 - Original Message - 
 From: Daniel Levy [EMAIL PROTECTED]
 To: 古雷 [EMAIL PROTECTED]
 Sent: Wednesday, March 22, 2006 6:57 PM
 Subject: Re: Unicode (UTF-8) question


 Dear Gu Lei,

 I have been reviewing your reply to the question I posted on the mysql 
 list.

 Due to the problems I was having trying to retrieve Unicode data using
 MyODBC, I decided to try other third-party data access components. When I
 thought that I finally found a solution, I started getting some strange
 internal errors in the IDE. I'm using Delphi 5.

 I want to give MyODBC another try. Can you please explain briefly where 
 you
 are using this code you sent me? What else do I need? Any tip you can 
 give
 me will be greatly appreciated.

 Thanks in advance,
 Daniel Levy


 - Original Message - 
 From: 古雷 [EMAIL PROTECTED]
 To: Daniel Levy [EMAIL PROTECTED]; Paun [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, February 06, 2006 3:09 AM
 Subject: Re: Unicode (UTF-8) question


 I have tried setting the character set of the table to utf8, and the
 specific column character set to utf8. I've also tried configuring 
 the
 ODBC's Connect Options to 'set names utf8';
 How did you configure that option?
 This is my may:
SQLHSTMT hstmtset;
SQLINTEGER rc;
rc = SQLAllocHandle (SQL_HANDLE_STMT, hdbc, hstmtset);
if(rc0)
{
ostringstream err;
errSQLAllocHandle (SQL_HANDLE_STMT, hdbc, 
 hstmtset)endl;
errgetSQLError(SQL_HANDLE_STMT,hstmtset);
throwExecption(__FILE__,__LINE__,err.str());
}
char setnames[]=SET names utf8;
rc = 
 SQLExecDirect(hstmtset,(SQLCHAR*)setnames,sizeof(setnames)-1);
if(rc0)
{
ostringstream err;
errsetnamesendl;
errgetSQLError(SQL_HANDLE_STMT,hstmtset);
throwExecption(__FILE__,__LINE__,err.str());
}
 Our C/C++ application reads and writes utf8 Chinese with myODBC3.51. Our
 java application connect to MYSQL with JDBC. Both of them and MySQL 
 Query
 Browser can get correct Chinese from MySQL.

 Moreover, MySQL can convert character set between GB2312 and UTF-8. If 
 my
 program SQLExecDirect SET NAMES gb2312, it can read and write GB2312
 Chinese from and to MySQL correctly even the columns' character set is
 utf8.

 regards,
 gu lei
 


Re: insert my_ulonglong data with C API

2006-03-15 Thread
Thanks a lot!
But my test is not successful. Please help me.
This is my test code:

#ifdef WIN32
#include windows.h
#endif

#include mysql.h
#include stdio.h
main()
{
 union ull {
  unsigned char a[8];
  my_ulonglong id;
 } ull;
 for(int i=0;i8;i++) ull.a[i]=(unsigned char)255;
 
 char s[200];
 sprintf(s,%llu\n,ull.id);
 printf(%s\n,s);

 return 0;
}

On Windows its output is:
4294967295
It's still a 4bytes integer.

Regards,
Gu Lei
- Original Message - 
From: Dan Nelson [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Wednesday, March 15, 2006 3:34 PM
Subject: Re: insert my_ulonglong data with C API


 In the last episode (Mar 15),  said:
 Hello,everyone!
 
 My table has a bigint column which needs store 8bytes integer.
 
 I looked up in Mysql Menual. It seems that , if I use C API I can
 only use preapared statement functions to insert bigint values.

 I can not use mysql_real_query or mysql_query to insert bigint values
 because I do not know how to convert a my_ulonglong to a string or
 character array.
 
 sprintf(buf, insert into mytable values ( %llu ), myulonglongint);
 
 -- 
 Dan Nelson
 [EMAIL PROTECTED]
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: insert my_ulonglong data with C API

2006-03-15 Thread
 Nelson:

Thanks a lot.

I found that sprintf(s,%llu\n,ull.id); works with gcc but not with VC6.0 .

Thanks.

Regards,
Gu Lei

- Original Message - 
From: Dan Nelson [EMAIL PROTECTED]
To: ?? [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Wednesday, March 15, 2006 11:27 PM
Subject: Re: insert my_ulonglong data with C API


 In the last episode (Mar 15), ?? said:
 Thanks a lot! But my test is not successful. Please help me. This is
 my test code:
 
 #ifdef WIN32
 #include windows.h
 #endif
 
 #include mysql.h
 #include stdio.h
 main()
 {
  union ull {
   unsigned char a[8];
   my_ulonglong id;
  } ull;
  for(int i=0;i8;i++) ull.a[i]=(unsigned char)255;
  
  char s[200];
  sprintf(s,%llu\n,ull.id);
  printf(%s\n,s);
 
  return 0;
 }
 
 On Windows its output is:
 4294967295
 It's still a 4bytes integer.
 
 Maybe your compiler doesn't understand the %llu syntax.  If it's a
 posix-compatible compiler, try this (although if it was posix, %llu
 would have worked, so this probably won't either):
 
  #include inttypes.h
 
  ...
 
  sprintf(s,%PRIu64\n,ull.id);
 
 Or read your compiler documentation to verify that can print 64-bit
 integers at all.
 
 -- 
 Dan Nelson
 [EMAIL PROTECTED]
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


insert my_ulonglong data with C API

2006-03-14 Thread
Hello,everyone!

My table has a bigint column which needs store 8bytes integer.

I looked up in Mysql Menual. It seems that , if I use C API I can only use 
preapared statement functions to insert bigint values.
I can not use mysql_real_query or mysql_query to insert bigint values because I 
do not know how to convert a my_ulonglong to a string or character array.
Am I right?
Any ideas?

Thanks.

Regards,

Gu Lei

Re: Unable to duplicate a database at home, possible encoding problem

2006-02-14 Thread
You can set character set for each column or set default character set for each 
table when CREATE TABLE.
Also you can set default character set for each database when CREATE DATABASE.

- Original Message - 
From: Dave M G [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Wednesday, February 15, 2006 1:54 AM
Subject: Re: Unable to duplicate a database at home, possible encoding problem


 
 detailed info here:
 http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
 
 
 Thank you for that link. I think this is the heart of the issue.
 
 Following the advice on the web page, I ran these commands:
 SET NAMES utf8;
 SET CHARACTER_SET utf8;
 
 But I can check my MySQL system variables in phpMyAdmin, and here's what 
 it says:
 VariableSession valueGlobal value
 character set clientutf8   latin1
 character set connection utf8 latin1
 character set database latin1 latin1
 character set results utf8 latin1
 character set server latin1 latin1
 character set system utf8 utf8
 collation connection utf8_general_ci latin1_swedish_ci
 collation database latin1_swedish_ci latin1_swedish_ci
 collation server latin1_swedish_ci latin1_swedish_ci
 
 What I want to do is change *all* of these to utf8. That's the only 
 encoding I ever work in, and I want to make my system as consistent as 
 possible.
 
 What commands do I run to permanently fix all of these collation and 
 character set variables to utf8?
 
 --
 Dave M G
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: How can I keep character_set_client value after MyODBC auto reconnect?

2006-01-11 Thread
Hi, Shawn Green

Thanks for your reply. But I expect new version of MyODBC(one of 
mysql-connectors), not of mysqld. We now use mysql5.0. The newest version of 
MyODBC is 3.51.12.

Regards,

gulei

- Original Message - 
From: [EMAIL PROTECTED]
To: 古雷 [EMAIL PROTECTED]
Cc: MySQL List mysql@lists.mysql.com; Dušan Pavlica [EMAIL PROTECTED]
Sent: Wednesday, January 11, 2006 11:16 PM
Subject: Re: How can I keep character_set_client value after MyODBC auto 
reconnect?


I wouldn't hold your breath for any new 3.xx releases or updates. MySQL AB 
 has moved through developing and releasing and almost retiring the 4.0.x 
 and 4.1.x versions of its server line and is actively promoting v5.0.x 
 while still working on v5.1.x.  The 4.1.x version is  being supported with 
 patches (if the issue still affects that versions) but I cannot remember 
 if 4.0 still is.  No new features are planned for any versions lower than 
 5 that I am aware of.  I think now might be a good time to  upgrade your 
 server.
 
 Shawn Green
 Database Administrator
 Unimin Corporation - Spruce Pine
 
 
 古雷 [EMAIL PROTECTED] wrote on 01/10/2006 09:49:04 PM:
 
 Thanks a lot.
 I needs SET AUTOCOMMIT=0, SET NAMES utf8 and SET TRANSACTION 
 ISOLATION LEVEL READ COMMITTED after a new connection.
 Further more, MyODBC3.51.10 reconnects automatically when connection
 lost but MyODBC3.51.12 doesn't.
 I think automatic reconnection is not bad when it can keep 
 variables' value or can give me a chance to run more than one SQL 
 statement to init my session.
 
 Another question: when will new verison of MyODBC3.5 be released?
 One of our application often disconnect and connect MySQL and then 
 MyODBC often core dump.
 
 Best regards,
 
 gulei
 - Original Message - 
 From: Dušan Pavlica [EMAIL PROTECTED]
 To: 古雷 [EMAIL PROTECTED]; MySQL List mysql@lists.mysql.com
 Sent: Tuesday, January 10, 2006 6:34 PM
 Subject: Re: How can I keep character_set_client value after MyODBC 
 auto reconnect?
 
 
  Hi,
  
  did you try SET CHARACTER SET utf8 as Initial Statement under 
 Connection 
  Options of your MyODBC DSN?
  HTH,
  Dusan
  - Original Message - 
  From: 古雷 [EMAIL PROTECTED]
  To: MySQL List mysql@lists.mysql.com
  Sent: Monday, January 09, 2006 10:19 AM
  Subject: How can I keep character_set_client value after MyODBC auto 
  reconnect?
  
  
  Hello:
 
  I found that MyODBC use mysql_ping to check connection and reconnect.
  After reconnect by using mysql_ping character_set_client, 
  character_set_connection and character_set_results go back to latin1.
  But I need them to be utf8.
  What can I do with MyODBC?
 
  Regards,
 
  gu lei
 
  祝 事业有成,家庭和睦,身体健康,一切吉祥
 
  古雷
  ---
  中企动力科技集团
  技术事业发展部___技术架构部
   \__企业IP通讯部
  电话:010 58022278-302
  地址:北京亦庄经济技术开发区北工大软件园
   (地盛北街1号)A区3号楼
  邮编:100176
  
 


Re: How can I keep character_set_client value after MyODBC auto reconnect?

2006-01-10 Thread
Thanks a lot.
I needs SET AUTOCOMMIT=0, SET NAMES utf8 and SET TRANSACTION ISOLATION LEVEL 
READ COMMITTED after a new connection.
Further more, MyODBC3.51.10 reconnects automatically when connection lost but 
MyODBC3.51.12 doesn't.
I think automatic reconnection is not bad when it can keep variables' value or 
can give me a chance to run more than one SQL statement to init my session.

Another question: when will new verison of MyODBC3.5 be released?
One of our application often disconnect and connect MySQL and then MyODBC often 
core dump.

Best regards,

gulei
- Original Message - 
From: Dušan Pavlica [EMAIL PROTECTED]
To: 古雷 [EMAIL PROTECTED]; MySQL List mysql@lists.mysql.com
Sent: Tuesday, January 10, 2006 6:34 PM
Subject: Re: How can I keep character_set_client value after MyODBC auto 
reconnect?


 Hi,
 
 did you try SET CHARACTER SET utf8 as Initial Statement under Connection 
 Options of your MyODBC DSN?
 HTH,
 Dusan
 - Original Message - 
 From: 古雷 [EMAIL PROTECTED]
 To: MySQL List mysql@lists.mysql.com
 Sent: Monday, January 09, 2006 10:19 AM
 Subject: How can I keep character_set_client value after MyODBC auto 
 reconnect?
 
 
 Hello:

 I found that MyODBC use mysql_ping to check connection and reconnect.
 After reconnect by using mysql_ping character_set_client, 
 character_set_connection and character_set_results go back to latin1.
 But I need them to be utf8.
 What can I do with MyODBC?

 Regards,

 gu lei

 祝 事业有成,家庭和睦,身体健康,一切吉祥

 古雷
 ---
 中企动力科技集团
 技术事业发展部___技术架构部
  \__企业IP通讯部
 电话:010 58022278-302
 地址:北京亦庄经济技术开发区北工大软件园
  (地盛北街1号)A区3号楼
 邮编:100176
 


How can I keep character_set_client value after MyODBC auto reconnect?

2006-01-09 Thread
Hello:

I found that MyODBC use mysql_ping to check connection and reconnect.
After reconnect by using mysql_ping character_set_client, 
character_set_connection and character_set_results go back to latin1.
But I need them to be utf8.
What can I do with MyODBC?

Regards,

gu lei

祝 事业有成,家庭和睦,身体健康,一切吉祥

  
古雷
---
中企动力科技集团
技术事业发展部___技术架构部
  \__企业IP通讯部
电话:010 58022278-302
地址:北京亦庄经济技术开发区北工大软件园
  (地盛北街1号)A区3号楼
邮编:100176

Re: (瑞星提示-此邮件可能是垃圾邮 件)Re: insert utf8 character in L inux commind-line tool

2005-12-19 Thread
export LANG=zh_CN.UTF-8
- Original Message - 
From: wangxu [EMAIL PROTECTED]
To: Andreas Streichardt [EMAIL PROTECTED]; mysql@lists.mysql.com
Sent: Tuesday, December 20, 2005 10:10 AM
Subject: Re: (瑞星提示-此邮件可能是垃圾邮件)Re: insert utf8 character in Linux commind-line 
tool


 Are there two option?
 How to use them? 
 
 - Original Message - 
 From: Andreas Streichardt [EMAIL PROTECTED]
 To: mysql@lists.mysql.com
 Sent: Tuesday, December 20, 2005 3:55 AM
 Subject: (瑞星提示-此邮件可能是垃圾邮件)Re: insert utf8 character in Linux commind-line tool
 
 
 On Monday 19 December 2005 08:47, wangxu wrote:
 I can't operate utf8 characters within command-line in linux operating
 system. Mysql doesn't support?
 
 --without-libedit –with-readline=/usr/include/readline
 
 that fixed it for me
 
 Kind Regards,
 
 Andreas Streichardt
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]