Re: Broken Tables, was:Memory Problems

2007-05-21 Thread Christoph Klünter
Mike,

I had the same failures without network.
And it is a onboard-controller :-)

Christoph

 Christoph,
 Have you tried replacing the network card with the one from the
 working machine? Network cards can cause problems under high load but will
 appear fine otherwise. Cheers.

 Mike

-- 
NMMN - New Media Markets  Networks GmbH
Geschäftsführung: Kfm. Michael Schütt
Finanzamt HH-Altona UStID DE 812 699 852  HRB 71102 Hamburg
HypoVereinsbank  -   BLZ 200 300 00  -  Konto-Nr. 156 29 82

http://www.nmmn.com   Tel.: +49 40 284 118 -0
Langbehnstrasse 6 Technische Hotline   -700
22761 Hamburg Fax: -999

Rufen Sie uns kostenlos an: http://www.nmmn.com/call/technik

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



show warnings.

2007-05-21 Thread Ananda Kumar

Hi All,
When i load data using LOAD DATA LOCAL INFILE, it shows

Query OK, 56678 rows affected, 789 warnings (4.47 sec)
Records: 56678  Deleted: 0  Skipped: 0  Warnings: 789


When i do.

show warnings

It display only 64 rows, can i see all the 789 warning messages as show
above. Please let me know what is the command i need to use to see all the
warning messages.

regards
anandkl


Re: index number of a specific cell

2007-05-21 Thread Sebastian Mendel
sam rumaizan schrieb:
   Is there a function in mysql to view the index number of a specific 
 cell/field?

index number = primary key?

i guess no

   For example if I want the index number for info4 or info7. Is it possible?

index number = row number?

no - without an ORDER BY there is no guaranty on which row-position a
specific entity (data-row) will be


   Column 1  Column 2  Column 3  Column 4  Column 5 
   
   Info1  Info2 Info3 Info4  Info5
   Info6  Info7 Info8Info9  Info10
   Info11  Info12Info13 Info14  Info15

SELECT `pk_field` FROM `table` WHERE `field` = 'val'

seems to me you are missing some fundamental database design knowledge and
understanding ... or you are just have problems describing your problem ...
or i understanding your problem ...


-- 
Sebastian Mendel

www.sebastianmendel.de

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



index number of a specific cell

2007-05-21 Thread sam rumaizan
  Is there a function in mysql to view the index number of a specific 
cell/field?
  For example if I want the index number for info4 or info7. Is it possible?
   
  Column 1  Column 2  Column 3  Column 4  Column 5 
  
   
   
  Info1  Info2 Info3 Info4  Info5
   
   
  Info6  Info7 Info8Info9  Info10
   
   
  Info11  Info12Info13 Info14  Info15
   
   
   



 

   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.

Re: show warnings.

2007-05-21 Thread Sebastian Mendel
Ananda Kumar schrieb:

 When i do.
 
 show warnings
 
 It display only 64 rows, can i see all the 789 warning messages as show
 above.

http://dev.mysql.com/doc/refman/5.0/en/show-warnings.html

The maximum number of error, warning, and note messages to store is
controlled by the max_error_count  system variable. By default, its value is
64. To change the number of messages you want stored, change the value of
max_error_count.

SHOW VARIABLES LIKE 'max_error_count';
SET max_error_count=1000;

-- 
Sebastian Mendel

www.sebastianmendel.de

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



Re: show warnings.

2007-05-21 Thread Ananda Kumar

Hi Sebastian,
Thanks a lot for the info.

Also i am automating the LOAD DATA LOCAL INFILE script.
Is it possible for me to show any error or spool the error to the file.

My script take 4 input parameters

a.login b.password. c.database d.hostname -e load data local infile. How
do spool any error messages into a file.

regards
anandkl


On 5/21/07, Sebastian Mendel [EMAIL PROTECTED] wrote:


Ananda Kumar schrieb:

 When i do.

 show warnings

 It display only 64 rows, can i see all the 789 warning messages as show
 above.

http://dev.mysql.com/doc/refman/5.0/en/show-warnings.html

The maximum number of error, warning, and note messages to store is
controlled by the max_error_count  system variable. By default, its value
is
64. To change the number of messages you want stored, change the value of
max_error_count.

SHOW VARIABLES LIKE 'max_error_count';
SET max_error_count=1000;

--
Sebastian Mendel

www.sebastianmendel.de

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




spool command to file.

2007-05-21 Thread Ananda Kumar

Hi All,
I am executing a script from  mysql prompt as below

mysql  source ddl.txt

I want to spool the out put of the above command to a file along with the
sql statments. Can you please let me know what parameter should i set for
the this.

regards
anandkl


Re: spool command to file.

2007-05-21 Thread Ananda Kumar

Hi Baron,
This will give only the results of the command. It does not include sql
statement.
I need the sql statement to know which sql errored out.

Database changed
+--+
| count(*) |
+--+
|5 |
+--+
1 row in set (0.00 sec)



On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:


Hi,

Ananda Kumar wrote:
 Hi All,
 I am executing a script from  mysql prompt as below

 mysql  source ddl.txt

 I want to spool the out put of the above command to a file along with
the
 sql statments. Can you please let me know what parameter should i set
for
 the this.

Use the 'tee' command in the mysql client.  Press ? in the client and it
will give you
instructions.

Baron



Re: spool command to file.

2007-05-21 Thread Baron Schwartz

Hi,

I see now -- you want to see which commands were executed from the file you sourced. 
As far as I know you cannot do this.  You could add some debugging statements in the 
file, like


SELECT 'about to drop the table';

Then in the output you will see this, and it may give you a hint as to where the error 
happened.


Baron

Ananda Kumar wrote:

Hi Baron,
This will give only the results of the command. It does not include sql
statement.
I need the sql statement to know which sql errored out.

Database changed
+--+
| count(*) |
+--+
|5 |
+--+
1 row in set (0.00 sec)



On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:


Hi,

Ananda Kumar wrote:
 Hi All,
 I am executing a script from  mysql prompt as below

 mysql  source ddl.txt

 I want to spool the out put of the above command to a file along with
the
 sql statments. Can you please let me know what parameter should i set
for
 the this.

Use the 'tee' command in the mysql client.  Press ? in the client and it
will give you
instructions.

Baron





--
Baron Schwartz
http://www.xaprb.com/

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



Re: spool command to file.

2007-05-21 Thread Ananda Kumar

Hi Baron,
I cannot do this, becuase the file would be given by engineers and to be
applied on mysql and i need to inform them about any error after i apply
them in mysql db.

regards
anandkl


On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:


Hi,

I see now -- you want to see which commands were executed from the file
you sourced.
As far as I know you cannot do this.  You could add some debugging
statements in the
file, like

SELECT 'about to drop the table';

Then in the output you will see this, and it may give you a hint as to
where the error
happened.

Baron

Ananda Kumar wrote:
 Hi Baron,
 This will give only the results of the command. It does not include sql
 statement.
 I need the sql statement to know which sql errored out.

 Database changed
 +--+
 | count(*) |
 +--+
 |5 |
 +--+
 1 row in set (0.00 sec)



 On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:

 Hi,

 Ananda Kumar wrote:
  Hi All,
  I am executing a script from  mysql prompt as below
 
  mysql  source ddl.txt
 
  I want to spool the out put of the above command to a file along with
 the
  sql statments. Can you please let me know what parameter should i set
 for
  the this.

 Use the 'tee' command in the mysql client.  Press ? in the client and
it
 will give you
 instructions.

 Baron



--
Baron Schwartz
http://www.xaprb.com/



Re: need help...LOAD DATA INFILE

2007-05-21 Thread Ananda Kumar

Hi All,
I was able to load data properly.
We need to set the parameter

set session collation_database=latin1_swedish_ci;
set session character_set_database=latin1;

please check this url for more info

http://lists.mysql.com/commits/16915


On 5/19/07, Ananda Kumar [EMAIL PROTECTED] wrote:


Hi All,
I am loading data into mysql database using LOAD DATA INFILE. After the
load i am getting this error.

Warning | 1366 | Incorrect string value: '\xE9cor' for column
'CATEGORY_NAME' at row 2137 .

My database character set is as below

character_set_database   | utf8
 character_set_client | latin1 |
| character_set_connection | latin1
 character_set_server | utf8   |
| character_set_system | utf8

and collation information is

 collation_connection | latin1_swedish_ci |
| collation_database   | utf8_general_ci   |
| collation_server | utf8_general_ci

I have spooled this data from oracle and trying to insert this data into
mysql. Can you please set me know how should i fix this error.

The actual value in oracle database is Other Home Décor, but in the
spool file its coming as some Other Home D\351cor. Can you please let me
know how i can fix this error.

regards
anandkl





Re: spool command to file.

2007-05-21 Thread Baron Schwartz

Hi,

You could change your server's SQL mode to be as restrictive as possible 
(STRICT_TRANS_TABLES, etc) so the scripts cause errors, instead of warnings.  Read the 
MySQL manual section on SQL mode and decide which things you want to throw errors.  Not 
all things can be changed to errors; you will still have the possibility of some warnings.


Note that you can change the SQL mode for just the current connection; it doesn't have 
to be server-wide.


By the way, did you notice from the output of ? in the mysql client that you can 
instruct it to automatically print warnings when they exist?


You could also write a small script to parse the SQL file from your engineers into 
individual commands separated by blank lines, and execute them one at at time, catch 
errors, and if there's an error print out the statement that caused it.  I wrote a Perl 
module to do this at my employer.  I use it to run batch commands.  If you do this, 
take a look at the DBD::mysql documentation; there is a place where the warning count 
is exposed, and you can examine this after each command and see if it raised any 
warnings.  I wrote code to treat this just like an error: fetch and print the warnings, 
then exit with an error.


Cheers
Baron

Ananda Kumar wrote:

Hi Baron,
I cannot do this, becuase the file would be given by engineers and to be
applied on mysql and i need to inform them about any error after i apply
them in mysql db.

regards
anandkl


On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:


Hi,

I see now -- you want to see which commands were executed from the file
you sourced.
As far as I know you cannot do this.  You could add some debugging
statements in the
file, like

SELECT 'about to drop the table';

Then in the output you will see this, and it may give you a hint as to
where the error
happened.

Baron

Ananda Kumar wrote:
 Hi Baron,
 This will give only the results of the command. It does not include sql
 statement.
 I need the sql statement to know which sql errored out.

 Database changed
 +--+
 | count(*) |
 +--+
 |5 |
 +--+
 1 row in set (0.00 sec)



 On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:

 Hi,

 Ananda Kumar wrote:
  Hi All,
  I am executing a script from  mysql prompt as below
 
  mysql  source ddl.txt
 
  I want to spool the out put of the above command to a file along 
with

 the
  sql statments. Can you please let me know what parameter should i 
set

 for
  the this.

 Use the 'tee' command in the mysql client.  Press ? in the client and
it
 will give you
 instructions.

 Baron



--
Baron Schwartz
http://www.xaprb.com/





--
Baron Schwartz
http://www.xaprb.com/

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



Re: spool command to file.

2007-05-21 Thread Ananda Kumar

Hi Baron,
I will read about sql_mode. Also you scripting method sounds great.

I will check on that.

regards
anandkl


On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:


Hi,

You could change your server's SQL mode to be as restrictive as possible
(STRICT_TRANS_TABLES, etc) so the scripts cause errors, instead of
warnings.  Read the
MySQL manual section on SQL mode and decide which things you want to throw
errors.  Not
all things can be changed to errors; you will still have the possibility
of some warnings.

Note that you can change the SQL mode for just the current connection; it
doesn't have
to be server-wide.

By the way, did you notice from the output of ? in the mysql client that
you can
instruct it to automatically print warnings when they exist?

You could also write a small script to parse the SQL file from your
engineers into
individual commands separated by blank lines, and execute them one at at
time, catch
errors, and if there's an error print out the statement that caused it.  I
wrote a Perl
module to do this at my employer.  I use it to run batch commands.  If you
do this,
take a look at the DBD::mysql documentation; there is a place where the
warning count
is exposed, and you can examine this after each command and see if it
raised any
warnings.  I wrote code to treat this just like an error: fetch and print
the warnings,
then exit with an error.

Cheers
Baron

Ananda Kumar wrote:
 Hi Baron,
 I cannot do this, becuase the file would be given by engineers and to be
 applied on mysql and i need to inform them about any error after i apply
 them in mysql db.

 regards
 anandkl


 On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:

 Hi,

 I see now -- you want to see which commands were executed from the file
 you sourced.
 As far as I know you cannot do this.  You could add some debugging
 statements in the
 file, like

 SELECT 'about to drop the table';

 Then in the output you will see this, and it may give you a hint as to
 where the error
 happened.

 Baron

 Ananda Kumar wrote:
  Hi Baron,
  This will give only the results of the command. It does not include
sql
  statement.
  I need the sql statement to know which sql errored out.
 
  Database changed
  +--+
  | count(*) |
  +--+
  |5 |
  +--+
  1 row in set (0.00 sec)
 
 
 
  On 5/21/07, Baron Schwartz [EMAIL PROTECTED] wrote:
 
  Hi,
 
  Ananda Kumar wrote:
   Hi All,
   I am executing a script from  mysql prompt as below
  
   mysql  source ddl.txt
  
   I want to spool the out put of the above command to a file along
 with
  the
   sql statments. Can you please let me know what parameter should i
 set
  for
   the this.
 
  Use the 'tee' command in the mysql client.  Press ? in the client
and
 it
  will give you
  instructions.
 
  Baron
 
 

 --
 Baron Schwartz
 http://www.xaprb.com/



--
Baron Schwartz
http://www.xaprb.com/



load control character....help

2007-05-21 Thread Ananda Kumar

Hi All,
We are having some data load issues. We are moving data from oracle to mysql
and in oracle we have some control characters like U^?.
Is it possible to load such data into mysql, if possible please give
details.

Please help.

regards
anandkl


string to timestamp conversion

2007-05-21 Thread Bryan Cantwell
I have a table with a varchar column that contains a timestamp like
this: 'Thu May 17 09:15:47 2007'
I need to grab this and include it in an insert sql that puts that value
in a table as a timestamp...



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



Re: string to timestamp conversion

2007-05-21 Thread seungp
Have you considered using the string to time function?


Sent via BlackBerry from T-Mobile  

-Original Message-
From: Bryan Cantwell [EMAIL PROTECTED]
Date: Mon, 21 May 2007 12:08:11 
To:MySQL General mysql@lists.mysql.com
Subject: string to timestamp conversion

I have a table with a varchar column that contains a timestamp like
this: 'Thu May 17 09:15:47 2007'
I need to grab this and include it in an insert sql that puts that value
in a table as a timestamp...



--
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: string to timestamp conversion

2007-05-21 Thread Bryan Cantwell
I see no string to date function that does this conversion...

 
-Original Message-
From: Bryan Cantwell 
Sent: Monday, May 21, 2007 2:08 PM
To: MySQL General
Subject: string to timestamp conversion

I have a table with a varchar column that contains a timestamp like
this: 'Thu May 17 09:15:47 2007'
I need to grab this and include it in an insert sql that puts that value
in a table as a timestamp...



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



RE: string to timestamp conversion

2007-05-21 Thread Chris Boget
Take a look at the following:

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#func
tion_unix-timestamp

That looks like exactly what you need...

thnx,
Chris 

-Original Message-
From: Bryan Cantwell [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 21, 2007 4:45 PM
To: MySQL General
Subject: RE: string to timestamp conversion

I see no string to date function that does this conversion...

 
-Original Message-
From: Bryan Cantwell
Sent: Monday, May 21, 2007 2:08 PM
To: MySQL General
Subject: string to timestamp conversion

I have a table with a varchar column that contains a timestamp like
this: 'Thu May 17 09:15:47 2007'
I need to grab this and include it in an insert sql that puts that value
in a table as a timestamp...



--
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: speedup mysql restore

2007-05-21 Thread Eric Bergen

The best way to speed up restores is to not use mysqldump at all.
Instead take a snapshot of the filesystem with something like
mylvmbackup. Then restore is as fast as copying the files over.


Also mysqldump adds disable keys and disable unique checks to the
output by default when using the --opt flag.

-Eric

On 5/20/07, Ray Cauchi [EMAIL PROTECTED] wrote:

Have you tried using the

  use db
  source /path/to/dumpfile.sql

command via the mysql command line client?

At 08:28 AM 5/20/2007, Vitaliy Okulov wrote:
Здравствуйте, mysql.

How i can speedup restore of mysql DB from file created by mysqldump?

MySQL is quite fast at reloading data, but if
you don't have enough memory or if
key_buffer_size is not set high enough, then it
can take days to re-index the data. You need to
stuff as much RAM as possible in your machine
and set key_buffer_size to at least 30% of your
machine RAM. I've had indexed take 2+ days to
rebuild and adding more RAM and tweaking
key_buffer_size allowed the same keys to be rebuilt in under an hour.

Mike



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





--
Eric Bergen
[EMAIL PROTECTED]
http://www.provenscaling.com


Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
 If you don't specify a hostname in SHOW GRANTS, '%' is assumed.  My mistake
 for not telling you this before.  If you enable networking, and connect
 with

   mysql -h 127.0.0.1

 instead of

   mysql -h localhost

Well, in fact 127.0.0.1 and localhost produce the same effect but by using the 
ip address of the server works fine :D

Somebody has just sent a comment saying that localhost and a normal ip address 
work different, and in fact was right, now am able to connect to the ip 
instead of localhost...

Thanks for all your comments

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
 Localhost is indeed a special value that isn't include in '%'. It's a
 feature not a bug ;)

 Regards,

Bingo! That was the point! If i connect to the server ip or server name it 
works perfectly, but if I try to connect to localhost it fails unless I add a 
new user specific to localhost :D

Thanks for your comments

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
 Hm, I didn't know that!  I thought it was only a special value to the
 client tools, which I know will try to connect via socket on UNIX machines
 when they see 'localhost' but will try to connect via TCP/IP when they see
 '127.0.0.1'. Thanks for pointing this out!

 Baron

In fact that was the problem, connecting to localhost didn't work unless I add 
specifically localhost... If tried with the host ip or name worked perfectly, 
so your comment had sense and solved it all...

Just one comment, 127.0.0.1 had the same effect as localhost, I should connect 
to the specific host ip or name.

Thanks for all your comments

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