Mysqldump and read lock

2004-12-09 Thread olivier . maurice
Hi all,


Looking for a way to automate backup I was thinking of scheduling mysqldump on 
a daily base. It want to use the read lock, but I am not really sure about the 
consequences of this.
Does putting a read lock on the files can cause loss of data?
It is no problem pausing the flow of incoming data (invoices and other 
documents that are put in a monitored directory).
But what about the data coming from the application that accesses the database? 
Say a user changes preferences or creates a new query, which are saved in the 
database. Is that data lost or buffered by MySql? Or does the application have 
to provide functionality to anticipate his situation?
I know, I could bring down the whole system (webserver, application services 
and MySql), but with the read lock, the system would be 'down' (querying still 
possible) for only half an hour and it keeps running.
The platform is Win2K.


Regards,

Olivier

Re: where is my my.cnf files??

2004-12-09 Thread Mysql Plusplus
 Hi,
In my system my.cnf is in 
/etc/ directory.
Bye.


On Fri, 10 Dec 2004 Hiu Yen Onn wrote :
hi,

i compiled mysql-4.1.7 from source. actually, i want to configure a mysql 
cluster. from the documentation, i need to add some flag into a file called 
my.cnf. i searched through the files. it consisted of my-small.cnf, 
my-medium.cnf, my-huge.cnf. but, i cant see the file my.cnf file. where does 
it located pls enlighten me..thanks



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



Truncating trailing blanks of a constant

2004-12-09 Thread Thomas Spahni
Hi everyone,

recently I encountered the following problem:

SELECT COUNT(id) FROM sometable WHERE somevarchar LIKE 'thistext ';

returned 0 (of course!) because trailing blanks can't exist in a column of
type VARCHAR.

But: Shouldn't the constant be truncated automatically in this context
before the comparison is made? I can certainly do it in my application but
I think that it would be a consistent behaviour if MySQL would do it. Any
opinions from the list?

Thomas Spahni


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



selection

2004-12-09 Thread N. Kavithashree

hello,

i hv created a table with 11 fields. two of them where i m getting problem
are country name and the country code

all other fields work properly during selection except these two

fileds are : (country varchar(30),code char(2));

when i retrieve records using follwg query :
select * from table where country='United States' and code='US';
or
select * from table where country='Iran' limit 2;
or
select * from table where country like 'Nepal' limit 3;

it gives empty set;

But if i give :s
select * from table where country like 'United S%' and code='US'; it works
select * from table where code='NP';  it works;

why is it so

bcoz of the Space between 2 words, the problem arises ?  How to retrieve
such fields then by giving specific value?

can anybody help me


N. Kavithashree
===


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



Re: Excel 2 mysql

2004-12-09 Thread David Ziggy Lubowa
On Wednesday 08 December 2004 05:07, Patrick Sherrill wrote:
 David,
 Please provide the complete LOAD DATA INFILE command you used.

mysql -e LOAD DATA INFILE '/home/dlubowa/clients.csv' INTO TABLE bush   -p 
test


thats what i did ...



 Pat...

 [EMAIL PROTECTED]
 CocoNet Corporation
 SW Florida's First ISP


 - Original Message -
 From: David Ziggy Lubowa [EMAIL PROTECTED]
 To: Eric Bergen [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, December 08, 2004 6:54 PM
 Subject: Re: Excel 2 mysql

  On Tuesday 07 December 2004 20:02, Eric Bergen wrote:
  The easiest way to turn excel into MySQL is to have excel save the
  file as a .csv (comma separated values) file and use the mysqlimport
  utility or a load data infile query to insert it into a table in
 
  cheers guys, i have managed to change my excel file into a .csv and done
  a LOAD DATA INFILE  and dumped the data in the mysql db the only problem
  though
  that all the data is going into one field in the table yet it is comma
  separated with the exact columns.
 
  How can i solve this .
 
  All help is highly appreciated.
 
  -Z
 
  MySQL.
 
  -Eric
 
 
  On Tue, 7 Dec 2004 16:02:23 -0800, David Ziggy Lubowa
 
  [EMAIL PROTECTED] wrote:
   Hey guys ,
  
   i know this has been discussed but looking through the archives i have
   more less hit a stand still , i have one big excel file which has data
   i
   would like to extract., Now i am no expert in perl neither am i in php
   ,
   i have looked at some tools like navicat but i dont see where you
   actually start the app , if that is what happens.  Any help is highly
   appreciated.
  
   cheers
  
   -Z
  
   --
   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]



OT, can someone send me headers from two email messages

2004-12-09 Thread Scott Haneda
My spam filter got the mysql list in a fit and I want to know why.  However,
since the emails were blocked, I can not look at the headers, which is what
I need to do.

There are two emails, subjects are
Where overload: Is there such a thing
http://lists.mysql.com/mysql/176634
-and-
handshake problem with resin
http://lists.mysql.com/mysql/176238

Could someone please email me off list the full source of those 2 emails?
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com Fax: 313.557.5052
[EMAIL PROTECTED]  Novato, CA U.S.A.



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



copy2diffdatabase

2004-12-09 Thread N. Kavithashree

hello,

i hv a database ONE with some 10 tables;

i want to have a backup so how can i copy these tales to another database
in the same server and also to any other server?


N. Kavithashree
===


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



Merge-union operation returnes index null

2004-12-09 Thread rosemarie . arnmark
Hello!
I have been struggling with this, and don´t know how to move on.

I have several databases they have the same stucture.
I want to gather all data från one type of table in the databases to
another table: merge-union operation.

I have done that operation and it looks okay, but aren´t.  Beacuse the
index in the new tables are null, in the old tables the index are the same
as the number of instances in the table. And it mathers beacuse the
webapplikation shows nothing of whats seems to be in the tables.

I have an webbapplikation in php to present the data (it´s formated into
statistics). And the webbapplikation need besides the answer table also a
person table. I have Mysql-admin to administrate Mysql. I have some
knowledge about databases in general, but Mysql are new to me.

My queries looks like this:

CREATE TABLE answer (id INT, value TINYINT, question INT, person INT,
INDEX(id) ) TYPE=MERGE UNION=( answer1, person2, person3)

CREATE TABLE person (id INT(10) unsigned NOT NULL auto_increment, namecode
VARCHAR(50) NOT NULL default '', password VARCHAR (8) default NULL,
isinvited TINYINT(4) NOT NULL default '0', isdone TINYINT (4) NOT NULL
default '0', section TINYINT (3) unsigned default NULL, INDEX(id) ,
INDEX(namecode) ) TYPE=MERGE UNION=(person1, person2, person3

I am very thankful for help in this matter.


regards
Rosemarie



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



Re: Excel 2 mysql

2004-12-09 Thread David Ziggy Lubowa
On Thursday 09 December 2004 14:33, David Ziggy Lubowa wrote:
 On Wednesday 08 December 2004 05:07, Patrick Sherrill wrote:
  David,
  Please provide the complete LOAD DATA INFILE command you used.

 mysql -e LOAD DATA INFILE '/home/dlubowa/clients.csv' INTO TABLE bush  
 -p test

this is test output that is in my test table, this is how my info is 

mysql select * from bush;
++--+-+-+-++
| clients| location | service | 
PhoneNo | contact | emails |
++--+-+-+-++
|| NULL | NULL| 
NULL| NULL| NULL   |
| CRS, Nsambya, HSDN 350 , 041-267733 / 077-7 | NULL | NULL| 
NULL| NULL| NULL   |
++--+-+-+-++

sorry for the distorted info, but basically the   CRS, Nsambya, HSDN 
350 , 041-267733 / 077-7  are all under clients field,  Yet the info is 
supposed to be distributed to all the columns of the table.  What could i be 
doing wrong here.  



cheers





 thats what i did ...

  Pat...
 
  [EMAIL PROTECTED]
  CocoNet Corporation
  SW Florida's First ISP
 
 
  - Original Message -
  From: David Ziggy Lubowa [EMAIL PROTECTED]
  To: Eric Bergen [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Wednesday, December 08, 2004 6:54 PM
  Subject: Re: Excel 2 mysql
 
   On Tuesday 07 December 2004 20:02, Eric Bergen wrote:
   The easiest way to turn excel into MySQL is to have excel save the
   file as a .csv (comma separated values) file and use the mysqlimport
   utility or a load data infile query to insert it into a table in
  
   cheers guys, i have managed to change my excel file into a .csv and
   done a LOAD DATA INFILE  and dumped the data in the mysql db the only
   problem though
   that all the data is going into one field in the table yet it is comma
   separated with the exact columns.
  
   How can i solve this .
  
   All help is highly appreciated.
  
   -Z
  
   MySQL.
  
   -Eric
  
  
   On Tue, 7 Dec 2004 16:02:23 -0800, David Ziggy Lubowa
  
   [EMAIL PROTECTED] wrote:
Hey guys ,
   
i know this has been discussed but looking through the archives i
have more less hit a stand still , i have one big excel file which
has data i
would like to extract., Now i am no expert in perl neither am i in
php ,
i have looked at some tools like navicat but i dont see where you
actually start the app , if that is what happens.  Any help is
highly appreciated.
   
cheers
   
-Z
   
--
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]



query data from two tables

2004-12-09 Thread Reinhart Viane
Table chat_online:
session (varchar)
activity (datetime)

Table persons
persons_region_int(int)

Table regions
region_id
region_name

On a page i list all persons which are in the chat_online dbase and
within a certain period: 

$limit_time = time() - 130; // 2 Minutes time out. 60 * 2 = 120 
$sqlchatonline = SELECT * FROM chat_online WHERE
UNIX_TIMESTAMP(activity) = $limit_time AND
(sessionid!='.session_id().');
$resultchatonline=mysql_query($sqlchatonline) or die (mysql_error()); 
$chatvisits = mysql_num_rows($resultchatonline);
while($rowchatonline = mysql_fetch_object($resultchatonline)){
$chattersessionid=$rowchatonline-sessionid;

//get the username, userid, mainpicid from the online chatter
$getinfo= select * from persons where
person_session_id='$chattersessionid';
$resultgetinfo = mysql_query($getinfo) or die (mysql_error());
$rowgetinfo= mysql_fetch_array($resultgetinfo);
echo $rowgetinfo['person_nick'];
}

Now i want these online chatters to be listed by person_region_int:
something like: 
region A
  chatter1
  chatter2
region B
  none
region C
  chatter3
  chatter4

How do i do this?


And a second question:
I have created a menu box which lists all regions, if a option is
selected by the user, i only want to show the online chatters of the
selected region (selecting an option defines a variable $region which
holds the region_id) 

Something like: 
if ($region) { $sqlchatonline = SELECT * FROM chat_online, persons
WHEREUNIX_TIMESTAMP(chat_online.activity) = $limit_time AND
(chat_online.sessionid!='.session_id().' AND
(persons.persons_region_int='$region');
}
This doe not give me the correct result: it shows all online chatters *
total amount of users of that region. It should be all online chatters
from that specified region.

What can be the correct syntax?



Thx in advance
Reinhart Viane 



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



MySQL technical issue

2004-12-09 Thread Marika Matveeva



Dear Sirs, 

Our company is developing software 
forSetTopBox STI 5528. We are interested in using your DBMS. 

Our target platform is STI5528 (SH4 (Hitachi) 
compliant) platform. 
OS Linux: kernel 2.4.24Compiler: gcc 
3.03

Our attempts to install 4th or 5th version of MySQL 
on our platform end in a failure. Whatever table we try to create we have an 
error. Please find the detailed log attached. 

Witha standardserver running 
onLinux RedHat 9 X86 these operations are completed successfully. 


We kindly ask you to give us your recommendations 
regarding this problem and, if possible, advise possible solutions to the 
problem to our team of programmers. 

We are looking forward to your reply.

Kindest regards, 
Artem Dikov, 
Programming Department Chief

Ricor Holding
105120 Russia, Moscow
Kostomarovsky pereulok, 3
Tel: 007 095 363 45 50
Fax: 007 095 363 45 60

Email:[EMAIL PROTECTED]
Site: www.ricor.ru



To: [EMAIL PROTECTED]
Subject: [for SQL request create table mysqld return Error 1033 ]

Description:
When we try to create a table mysqd responds the following: Error 1033 
Incorrect information in file tablename.frm The error occurs any time we try 
to execute a query on creation of a table,including start of the script 
mysql_install_db.

--
Daemon is initiated by command mysqld_safe --skip-grant

mysql use mysql;
Database changed
mysql create table t2(rrr float);
ERROR 1033  (HY000): Incorrect information in file: './mysql/t2.frm'


 or during the installation:

[EMAIL PROTECTED]:/usr/local/sh4-mysql/bin/mysql_install_db --user=mysql
...
Installing all prepared tables
041209 15:13:50 [ERROR] /usr/local/sh4-mysql/libexec/mysqld: Incorrect 
information
in file: './mysql/db.frm'

041209 15:13:50 [ERROR] /usr/local/sh4-mysql/libexec/mysqld: Incorrect 
information
in file: './mysql/host.frm'


-


Category:   mysql
Release:mysql-4.1.7 (Source distribution)

C compiler:3.0.3
C++ compiler:  3.0.3
Environment:
STI5528 espresso, Linux 
System: Linux espresso 2.4.24_st1.7test7-st-espresso sh4 unknown
Architecture: sh4

Some paths:  /usr/local/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/sh4-linux/3.0.3/specs
Configured with: ../configure --host=sh4-linux --build=i686-pc-linux-gnu 
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin 
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include 
--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var 
--sharedstatedir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info 
--target=sh4-linux --enable-shared --enable-languages=c,c++ --enable-threads 
--disable-c99 --with-system-zlib --with-cpu=sh4
Thread model: posix
gcc version 3.0.3 (STMicroelectronics/Linux Base 3.0.3-3)
Compilation info: CC='sh4-linux-gcc'  CFLAGS=''  CXX='sh4-linux-g++'  
CXXFLAGS=''  LDFLAGS=''  ASFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Jan  1  2000 /lib/libc.so.6 - 
libc-2.2.4.so
-rwxr-xr-x1 root root  1515580 Feb 21  2003 /lib/libc-2.2.4.so
-rw-r--r--1 root root  2760322 Feb 21  2003 /usr/lib/libc.a
-rw-r--r--1 root root  164 Feb 21  2003 /usr/lib/libc.so
Configure command: ./configure '--cache-file=config.cache' 
'--prefix=/usr/local/sh4-mysql' '--host=sh4-linux' '--with-debug' 
'--without-largefile' 'host_alias=sh4-linux'


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

Re: Excel 2 mysql

2004-12-09 Thread David Ziggy Lubowa


Looks like i have solved the issue, thanks guys for the help 

this did the trick 

mysql load data infile '/home/dlubowa/test' into table bush fields terminated 
by ',' (clients,location,service,PhoneNo,contact,emails);

-Z

On Thursday 09 December 2004 15:54, David Ziggy Lubowa wrote:
 On Thursday 09 December 2004 14:33, David Ziggy Lubowa wrote:
  On Wednesday 08 December 2004 05:07, Patrick Sherrill wrote:
   David,
   Please provide the complete LOAD DATA INFILE command you used.
 
  mysql -e LOAD DATA INFILE '/home/dlubowa/clients.csv' INTO TABLE bush 
  -p test

 this is test output that is in my test table, this is how my info is

 mysql select * from bush;
 ++--+-+
-+-++

 | clients| location | service |

 PhoneNo | contact | emails |
 ++--+-+
-+-++

 || NULL | NULL|

 NULL| NULL| NULL   |

 | CRS, Nsambya, HSDN 350 , 041-267733 / 077-7 | NULL | NULL|

 NULL| NULL| NULL   |
 ++--+-+
-+-++

 sorry for the distorted info, but basically the   CRS, Nsambya, HSDN
 350 , 041-267733 / 077-7  are all under clients field,  Yet the info is
 supposed to be distributed to all the columns of the table.  What could i
 be doing wrong here.



 cheers

  thats what i did ...
 
   Pat...
  
   [EMAIL PROTECTED]
   CocoNet Corporation
   SW Florida's First ISP
  
  
   - Original Message -
   From: David Ziggy Lubowa [EMAIL PROTECTED]
   To: Eric Bergen [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Wednesday, December 08, 2004 6:54 PM
   Subject: Re: Excel 2 mysql
  
On Tuesday 07 December 2004 20:02, Eric Bergen wrote:
The easiest way to turn excel into MySQL is to have excel save the
file as a .csv (comma separated values) file and use the mysqlimport
utility or a load data infile query to insert it into a table in
   
cheers guys, i have managed to change my excel file into a .csv and
done a LOAD DATA INFILE  and dumped the data in the mysql db the only
problem though
that all the data is going into one field in the table yet it is
comma separated with the exact columns.
   
How can i solve this .
   
All help is highly appreciated.
   
-Z
   
MySQL.
   
-Eric
   
   
On Tue, 7 Dec 2004 16:02:23 -0800, David Ziggy Lubowa
   
[EMAIL PROTECTED] wrote:
 Hey guys ,

 i know this has been discussed but looking through the archives i
 have more less hit a stand still , i have one big excel file which
 has data i
 would like to extract., Now i am no expert in perl neither am i in
 php ,
 i have looked at some tools like navicat but i dont see where you
 actually start the app , if that is what happens.  Any help is
 highly appreciated.

 cheers

 -Z

 --
 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: Excel 2 mysql

2004-12-09 Thread Ian Sales
David Ziggy Lubowa wrote:
On Thursday 09 December 2004 14:33, David Ziggy Lubowa wrote:
 

On Wednesday 08 December 2004 05:07, Patrick Sherrill wrote:
   

David,
Please provide the complete LOAD DATA INFILE command you used.
 

mysql -e LOAD DATA INFILE '/home/dlubowa/clients.csv' INTO TABLE bush  
-p test
   

this is test output that is in my test table, this is how my info is 

mysql select * from bush;
++--+-+-+-++
| clients| location | service | 
PhoneNo | contact | emails |
++--+-+-+-++
|| NULL | NULL| 
NULL| NULL| NULL   |
| CRS, Nsambya, HSDN 350 , 041-267733 / 077-7 | NULL | NULL| 
NULL| NULL| NULL   |
++--+-+-+-++

sorry for the distorted info, but basically the   CRS, Nsambya, HSDN 
350 , 041-267733 / 077-7  are all under clients field,  Yet the info is 
supposed to be distributed to all the columns of the table.  What could i be 
doing wrong here.  

 

- add FIELDS TERMINATED BY ','  ENCLOSED BY '' to your LOAD DATA INFILE
- ian
--
+---+
| Ian Sales  Database Administrator |
|   |
| eBuyer  http://www.ebuyer.com |
+---+
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


MYSQL is getting slow

2004-12-09 Thread Patrick Marquetecken
Hi,

I have 3 snort sensors logging to a central mySQL database after two weeks the 
size of the database is about 3.3GB and the machine is getting slow, as i'm not 
used to be working with mySQL is my question how far can i go before the 
machine stop responding ?

HP Pentium4 - 2.2mhz - 512 mb, 99% used and no swap, HD of 40GB.

TIA
Patrick 


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



Re: MYSQL is getting slow

2004-12-09 Thread Jeff Smelser
On Thursday 09 December 2004 09:49 am, Patrick Marquetecken wrote:

 I have 3 snort sensors logging to a central mySQL database after two weeks
 the size of the database is about 3.3GB and the machine is getting slow, as
 i'm not used to be working with mySQL is my question how far can i go
 before the machine stop responding ?

 HP Pentium4 - 2.2mhz - 512 mb, 99% used and no swap, HD of 40GB.

What table type you using? 

Jeff


pgpaVttIiLwf1.pgp
Description: PGP signature


Re: MYSQL is getting slow

2004-12-09 Thread gerald_clark

Patrick Marquetecken wrote:
Hi,
I have 3 snort sensors logging to a central mySQL database after two weeks the 
size of the database is about 3.3GB and the machine is getting slow, as i'm not 
used to be working with mySQL is my question how far can i go before the 
machine stop responding ?
HP Pentium4 - 2.2mhz - 512 mb, 99% used and no swap, HD of 40GB.
 

I f  that is 99% disk used, you are already dead.
That is why it is slow.
You have no room to do anything.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MYSQL is getting slow

2004-12-09 Thread Ing. Bismarck J. Rojas M.
It can be a service that this running and you this saturating the yield of the 
CPU.  top in a terminal like root uses the command to be able to see that 
service this consuming.  

greetings

-- 
Ing.. Bismarck J. Rojas M.

El Jueves, 9 de Diciembre de 2004 09:49, Patrick Marquetecken escribió:
 Hi,

 I have 3 snort sensors logging to a central mySQL database after two weeks
 the size of the database is about 3.3GB and the machine is getting slow, as
 i'm not used to be working with mySQL is my question how far can i go
 before the machine stop responding ?

 HP Pentium4 - 2.2mhz - 512 mb, 99% used and no swap, HD of 40GB.

 TIA
 Patrick



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



Re: MYSQL is getting slow

2004-12-09 Thread Darryl Waterhouse
On Thu, 2004-12-09 at 10:08 -0600, gerald_clark wrote:

 
 Patrick Marquetecken wrote:
 
 Hi,
 
 I have 3 snort sensors logging to a central mySQL database after two weeks 
 the size of the database is about 3.3GB and the machine is getting slow, as 
 i'm not used to be working with mySQL is my question how far can i go before 
 the machine stop responding ?
 
 HP Pentium4 - 2.2mhz - 512 mb, 99% used and no swap, HD of 40GB.
 
   
 
 I f  that is 99% disk used, you are already dead.
 That is why it is slow.
 You have no room to do anything.
 


To be fair Gerald, I think he means he's out of memory (correct me if
I'm wrong here Pat), but you simply *must* allow the machine work space
to work things out.
Adding some swap will actually help.

How active is the server?

Darryl Waterhouse
---
Software Development Manager
Orbis Monitoring Services

t: +44 151 357 7800
m: +44 7876 390212
e: [EMAIL PROTECTED]

Suite 3,
Sycamore House,
Lloyd Drive,
Ellesmere Port,
Cheshire,
CH65 9HQ


Re: Excel 2 mysql

2004-12-09 Thread Patrick Sherrill
David,
Ian's response looks fine, I would just add 'OPTIONALLY' to the 'ENCLOSED ' 
parameter:

mysql -e LOAD DATA INFILE '/home/dlubowa/clients.csv' INTO TABLE bush 
FIELDS TERMINATED BY ','  OPTIONALLY ENCLOSED BY '' .

This may not work if your entire record is wrapped in quotes as indicated in 
your email.  In this case you are going to need to cure your import file by 
removing the first and last quote that wraps your record.

I hope this helps.
Pat...
[EMAIL PROTECTED]
CocoNet Corporation
SW Florida's First ISP
there are just two issues that I would look at if his solution
- Original Message - 
From: Ian Sales [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Patrick Sherrill [EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 9:53 AM
Subject: Re: Excel 2 mysql


David Ziggy Lubowa wrote:
On Thursday 09 December 2004 14:33, David Ziggy Lubowa wrote:
On Wednesday 08 December 2004 05:07, Patrick Sherrill wrote:
David,
Please provide the complete LOAD DATA INFILE command you used.
mysql -e LOAD DATA INFILE '/home/dlubowa/clients.csv' INTO TABLE bush 
 -p test

this is test output that is in my test table, this is how my info is
mysql select * from bush;
++--+-+-+-++
| clients| location | service 
| PhoneNo | contact | emails |
++--+-+-+-++
|| NULL | NULL 
| NULL| NULL| NULL   |
| CRS, Nsambya, HSDN 350 , 041-267733 / 077-7 | NULL | NULL 
| NULL| NULL| NULL   |
++--+-+-+-++

sorry for the distorted info, but basically the   CRS, Nsambya, HSDN 
350 , 041-267733 / 077-7  are all under clients field,  Yet the info is 
supposed to be distributed to all the columns of the table.  What could i 
be doing wrong here.

- add FIELDS TERMINATED BY ','  ENCLOSED BY '' to your LOAD DATA INFILE
- ian
--
+---+
| Ian Sales  Database Administrator |
|   |
| eBuyer  http://www.ebuyer.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]


Query Browser Crashing on FC3

2004-12-09 Thread Scott Baker
I searched the archives but couldn't fine much on the QueryBrowser. I 
think it's still pretty new. Is anyone else experience frequent crashes 
using this software?

After about 6 queries or so (mild use) it crashes randomly.
./mysql-query-browser: line 9: 19346 Segmentation fault 
$MYPATH/mysql-query-browser-bin

I can also make it crash EVERY time by simply going to tools - preferences.
*** glibc detected *** double free or corruption: 0x08a3c498 ***
./mysql-query-browser: line 9: 19332 Aborted 
$MYPATH/mysql-query-browser-bin

Has anyone else had problems like this? Anything I can do? I've tried 
connecting to two different MySQL servers (4.0.x and 4.1.x) and both do 
the same thing.

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


RE: where is my my.cnf files??

2004-12-09 Thread Eve Atley

What you need to do is rename one of the .cnf files - such as my-small.cnf -
to my.cnf and copy it into your /etc/ directory (on Linux, Windows directory
in Windows).

- Eve

-Original Message-
From: Hiu Yen Onn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 09, 2004 3:28 PM
To: [EMAIL PROTECTED]
Subject: where is my my.cnf files??


hi,

i compiled mysql-4.1.7 from source. actually, i want to configure a 
mysql cluster. from the documentation, i need to add some flag into a 
file called my.cnf. i searched through the files. it consisted of 
my-small.cnf, my-medium.cnf, my-huge.cnf. but, i cant see the file 
my.cnf file. where does it located pls enlighten me..thanks



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



Problem importing data

2004-12-09 Thread Leonardo Javier Belén
Hi all,
I am experiencing a fairly bizarre problem: in MySQL 4.1.7 (Windoze
version), when importing data from a file with semicolon-separated data, I
get random default values for the datetime fields. This turns the data
obviosly unusable.

The same import on the same machine but with the 4.0.12 version of the
server is totally bug free.

Does anyone have experience on this sort of problems?

Leonardo J. Belén.


mysql - query - sql


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



RE: Problem importing data

2004-12-09 Thread phpninja
At the end of your csv file, are you including ,\n ?

If you are using mysql on windows and LOAD DATA IN FILE you need to
include unix line breaks at the end of each line, else the data will
be loaded wacky...so if each line looks like this:

,value1,value2,value3,value4

change it to this: (on each line, search replace maybe?)

,value1,value2,value3,value4,\n

phpninja

-Original Message-
From: Leonardo Javier Belén [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 09, 2004 10:02 AM
To: [EMAIL PROTECTED]
Subject: Problem importing data

Hi all,
I am experiencing a fairly bizarre problem: in MySQL 4.1.7 (Windoze
version), when importing data from a file with semicolon-separated data, I
get random default values for the datetime fields. This turns the data
obviosly unusable.

The same import on the same machine but with the 4.0.12 version of the
server is totally bug free.

Does anyone have experience on this sort of problems?

Leonardo J. Belén.


mysql - query - sql


--

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



query syntax in new mysql query browser

2004-12-09 Thread Eben
I have a sql script that issues a bunch of truncate statements to purge 
a database in development.  The script looks like:

truncate table table_1;
truncate table tabel_2;
truncate table table_3;
and so on...
I can load this script as a single query in the old mysql_front (version 
2.2) GUI and it runs fine.  However the same query loaded into MySQL 
Query Browser fails after the first line.  Is there a way to structure 
the syntax differently so I can run the multiple truncates in one query 
via Qeury Browser?

Any advice is appreciated,
Eben
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


More Illegal mix of collations trouble.

2004-12-09 Thread razor-admin
Last week we upgraded from mysql 4.0 to 4.1.7.  Since then some queries  
on newly created tables (ie created since the upgrade) are failing with  
the error:

 #1267 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT)
  and (utf8_general_ci,COERCIBLE) for operation '='
I have been doing a lot of reading.  (Until this problem I had never  
heard of a character set collation.)  It looks like some database  
connections are specifying UTF-8 and over-ridding the default global  
setting of latin1.  See the mysql command line tool log below to see  
that the variables don't match the global variables.  Where do I look  
to see what is causing this?  The /etc/my.cnf already contains this  
line in the [mysqld] section:

  default-character-set=latin1
The error message occurs both when I use the mysql command line tool  
from the local host (mysql  Ver 14.7 Distrib 4.1.7, for pc-linux  
(i686)) and also from PHP on a different server (phpinfo() reports  
Client API version 3.23.56).

When I add the following line to /etc/my.cnf on the same machine as the  
server runs on and connect with the command line tool I don't have the  
same problem but this does not fix the connections from the PHP client.  
 (Added to the [mysql] section.)

  default-character-set=latin1
I don't understand how or why the default connection data encoding  
would be different from the default table encoding.  Maybe someone can  
explain this to me as well.

By using SET CHARACTER SET latin1; in the command line tool the  
problem goes away but it's silly to have to tell all my clients they  
have to explicitly set the character set every time they connect.  What  
settings should be adjusted to prevent the errors from occuring?

Thanks,
/Chad

mysql SELECT SUM( Credits )
- FROM Acct_Payments
- WHERE Void = 'No';
ERROR 1267 (HY000): Illegal mix of collations  
(latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for  
operation '='

mysql show variables like 'char%';
+-- 
++
| Variable_name| Value   
|
+-- 
++
| character_set_client | utf8
|
| character_set_connection | utf8
|
| character_set_database   | latin1  
|
| character_set_results| utf8
|
| character_set_server | latin1  
|
| character_set_system | utf8
|
| character_sets_dir   |  
/usr/local/mysql-max-4.1.7-pc-linux-i686/share/mysql/charsets/ |
+-- 
++
7 rows in set (0.00 sec)

mysql show variables like 'colla%';
+--+---+
| Variable_name| Value |
+--+---+
| collation_connection | utf8_general_ci   |
| collation_database   | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+--+---+
3 rows in set (0.00 sec)
mysql show global variables like 'char%';
+-- 
++
| Variable_name| Value   
|
+-- 
++
| character_set_client | latin1  
|
| character_set_connection | latin1  
|
| character_set_database   | latin1  
|
| character_set_results| latin1  
|
| character_set_server | latin1  
|
| character_set_system | utf8
|
| character_sets_dir   |  
/usr/local/mysql-max-4.1.7-pc-linux-i686/share/mysql/charsets/ |
+-- 
++
7 rows in set (0.00 sec)

mysql show global variables like 'colla%';
+--+---+
| Variable_name| Value |
+--+---+
| collation_connection | latin1_swedish_ci |
| collation_database   | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+--+---+
3 rows in set (0.00 sec)
mysql show create table Acct_Payments \G

Re: MYSQL is getting slow

2004-12-09 Thread Patrick Marquetecken
On Thu, 09 Dec 2004 16:17:17 +
Darryl Waterhouse [EMAIL PROTECTED] wrote:

 On Thu, 2004-12-09 at 10:08 -0600, gerald_clark wrote:
 
  
  Patrick Marquetecken wrote:
  
  Hi,
  
  I have 3 snort sensors logging to a central mySQL database after two weeks 
  the size of the database is about 3.3GB and the machine is getting slow, 
  as i'm not used to be working with mySQL is my question how far can i go 
  before the machine stop responding ?
  
  HP Pentium4 - 2.2mhz - 512 mb, 99% used and no swap, HD of 40GB.
  

  
  I f  that is 99% disk used, you are already dead.
  That is why it is slow.
  You have no room to do anything.
  
 
 
 To be fair Gerald, I think he means he's out of memory (correct me if
 I'm wrong here Pat), but you simply *must* allow the machine work space
 to work things out.
 Adding some swap will actually help.
 
 How active is the server?
 
Indeed its the memory, the computer has only mysql and apache on it installed, 
not even a graphical interface.
There is a lot of data from the snort sensors that is getting inserted, and 
from a console machine there is a lot of queyring to the db.

and for ansewring Jeff Smelser i have installed mysql 4.x on linux and then dit 
from the commandline create database and then run the create table commands 
from snort.

Patrick

 Darryl Waterhouse
 ---
 Software Development Manager
 Orbis Monitoring Services
 
 t: +44 151 357 7800
 m: +44 7876 390212
 e: [EMAIL PROTECTED]
 
 Suite 3,
 Sycamore House,
 Lloyd Drive,
 Ellesmere Port,
 Cheshire,
 CH65 9HQ
 


-- 
Uhura, signal our surrender
 -- Kirk

Captain!!??
 -- Uhura

We surrender!!
 -- Kirk (Star Trek VI) 

Fingerprint = 2792 057F C445 9486 F932 3AEA D3A3 1B0C 1059 273B
ICQ# 316932703 
Registered Linux User #44550
http://counter.li.org



pgpnyBHzWdvri.pgp
Description: PGP signature


Re: MYSQL is getting slow

2004-12-09 Thread Jeff Smelser
On Thursday 09 December 2004 01:06 pm, Patrick Marquetecken wrote:

 and for ansewring Jeff Smelser i have installed mysql 4.x on linux and then
 dit from the commandline create database and then run the create table
 commands from snort.

No idea.. you can do a show create table db.table to find out the engine 
type..

I ask because those should be myisam.. If they are. I cant see how memory is 
getting so high. If they are innodb.. I would highly recommend looking into 
converting them into myisam.. myisam was created for this type of work, would 
be a easier on the mem.

Just some avenues to look at.

Jeff


pgpXfDTgl3IZw.pgp
Description: PGP signature


Passing single quote within a query

2004-12-09 Thread Nestor Florez
Hello world,

I am passing a a string Joe's car as part of the SQL query to be inserted
to a String field.  

$field=Joe's car;
$query=insert into mytable values('$field');

Do you generally change the quote to a double quote before inserting
or what is the recomended way, because otherwise the quote will
terminate the query statement.

Thanks,

:-)

Néstor Alberto Flórez Torres



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



Re: Passing single quote within a query

2004-12-09 Thread Steve Davies
backslash escape the quote:
$field=Joe\'s car;
or if you're using PHP you can turn this on automatically
HTH
Steve

Nestor Florez wrote:
Hello world,
I am passing a a string Joe's car as part of the SQL query to be inserted
to a String field.  

$field=Joe's car;
$query=insert into mytable values('$field');
Do you generally change the quote to a double quote before inserting
or what is the recomended way, because otherwise the quote will
terminate the query statement.
Thanks,
:-)
Néstor Alberto Flórez Torres

 


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


RE: MYSQL is getting slow

2004-12-09 Thread Dathan Pattishall
This is a very broad question, I sometimes do this myself. But to answer
the question to the best of my ability I have to ask a few.


Are you using RAID? If so what RAID level?

What are you're my.cnf settings?

What type of Indexes are you using?

What does vmstat and iostat say?

What Filesystem are you using?

What are some typical queires for a given schema?


Typically for most orginizations mysql dedicated on the box below is
wicked fast, even when not optimized because of system cache etc. But if
your running out of diskspace then that's a problem in itself.

-Original Message-
From: Patrick Marquetecken [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 09, 2004 7:49 AM
To: [EMAIL PROTECTED]
Subject: MYSQL is getting slow

Hi,

I have 3 snort sensors logging to a central mySQL database after two
weeks the size of the database is about 3.3GB and the machine is getting
slow, as i'm not used to be working with mySQL is my question how far
can i go before the machine stop responding ?

HP Pentium4 - 2.2mhz - 512 mb, 99% used and no swap, HD of 40GB.

TIA
Patrick 


--
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: Passing single quote within a query

2004-12-09 Thread Robert J Taylor
Nestor,
You would do better to use prepared statements.
When a parameter is substituted into the prepared statement it is 
automatically quoted -- and you are protected from SQL Injection 
attacks. The reason your script is failing is that the single quote in 
$field is being interpreted as the SQL statement's closing single quote 
in MySQL. Thus, data in $field is being treated as potential SQL code. 
Very dangerous.

In your example, if someone is able to insert ');update user set 
password=PASSWORD('cracked into $field you're in trouble. That's a 
simple but poor example of what can be done. People intent on breaking 
your system don't need to know what your schema is to do you harm.

Prepared statements and parameter substitution is a function of your 
language's DB library, so you need to find out how your language does this.

HTH,
Robert J Taylor.
There's an article at MySQL.com on Prepared Statements for more reading:
http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html
Nestor Florez wrote:
Hello world,
I am passing a a string Joe's car as part of the SQL query to be inserted
to a String field.  

$field=Joe's car;
$query=insert into mytable values('$field');
Do you generally change the quote to a double quote before inserting
or what is the recomended way, because otherwise the quote will
terminate the query statement.
Thanks,
:-)
Néstor Alberto Flórez Torres

 

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


spaces in table/column name

2004-12-09 Thread sharif islam
How mysql deals with spaces in table / column name? I am also using
mysqlcc. If I try the following in the doesn't work. Creating table
name with spaces from mysqlcc didn't give any error. But the following
does:

INSERT INTO 'tbl name with spaces' (col1, 'col name with spaces') VALUES(15,16);

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



Re: spaces in table/column name

2004-12-09 Thread SGreen
Behind the scenes mysqlcc wraps the both the table name with spaces and 
the column name with spaces with back-ticks (`) not single quotes(').

http://dev.mysql.com/doc/mysql/en/Legal_names.html

Try this statement instead:

INSERT INTO `tbl name with spaces` (col1, `col name with spaces`) 
VALUES(15,16);

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

sharif islam [EMAIL PROTECTED] wrote on 12/09/2004 04:07:42 PM:

 How mysql deals with spaces in table / column name? I am also using
 mysqlcc. If I try the following in the doesn't work. Creating table
 name with spaces from mysqlcc didn't give any error. But the following
 does:
 
 INSERT INTO 'tbl name with spaces' (col1, 'col name with spaces') 
 VALUES(15,16);
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


Re: spaces in table/column name

2004-12-09 Thread gerald_clark

sharif islam wrote:
How mysql deals with spaces in table / column name? I am also using
mysqlcc. If I try the following in the doesn't work. Creating table
name with spaces from mysqlcc didn't give any error. But the following
does:
INSERT INTO 'tbl name with spaces' (col1, 'col name with spaces') VALUES(15,16);
 

This is really bad form and should be discouraged.
If you absolutely must do this, use back-ticks, not quotes, and be 
prepared for
a never ending series of headaches later.

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


RE: Load data question in cross database replication

2004-12-09 Thread Sanjeev Sagar
Thanks !

-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 08, 2004 3:18 AM
To: [EMAIL PROTECTED]
Subject: Re: Load data question in cross database replication

Hello.

It seems to be a bug:
  http://bugs.mysql.com/bug.php?id=6353


Sanjeev Sagar [EMAIL PROTECTED] wrote:
 Hello Gleb,
 
 My question was related to LOAD DATA INFILE, not LOAD DATA FROM
MASTER.=20
 
 LOAD DATA INFILE work those slaves which are not using
 --replicate-rewrite-db. It do not work for those which are using this.
 
 Thanks for you reply.
 
 -Original Message-
 From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 03, 2004 4:14 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Load data question in cross database replication
 
 Hello.
 
 --replicate-rewrite-db is not taken into account while executing LOAD
 DATA
 FROM MASTER. See:
  http://dev.mysql.com/doc/mysql/en/LOAD_DATA_FROM_MASTER.html
 
 
 
 Sanjeev Sagar [EMAIL PROTECTED] wrote:
 
 
 --=20
 For technical support contracts, goto
 https://order.mysql.com/?ref=3Densita
 This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
 /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com
 
 
 
 
 --=20
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 


-- 
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.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: Truncating trailing blanks of a constant

2004-12-09 Thread Roger Baklund
Thomas Spahni wrote:
Hi everyone,
recently I encountered the following problem:
SELECT COUNT(id) FROM sometable WHERE somevarchar LIKE 'thistext ';
returned 0 (of course!) because trailing blanks can't exist in a column of
type VARCHAR.
But: Shouldn't the constant be truncated automatically in this context
before the comparison is made? I can certainly do it in my application but
I think that it would be a consistent behaviour if MySQL would do it. Any
opinions from the list?
What about:
  ... WHERE LEFT(somevarchar,9) LIKE 'thistext ';
The automatic truncation should not happen in this case...?
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: selection

2004-12-09 Thread Roger Baklund
N. Kavithashree wrote:
when i retrieve records using follwg query :
select * from table where country='United States' and code='US';
Is the value if the country field United States? Or is it United 
States of America or similar?

But if i give :s
select * from table where country like 'United S%' and code='US'; it works
This makes sense if the value is not United States. The expression 
country='United States' will only match rows where the country column 
exactly matches the string 'United States'. If you want to match a part 
of a column, you can use the LIKE operator and a % character, like in 
your last example. Just remove and code='US'.

If the value of the column actually is United States, try this to 
prove it:

SELECT concat('',country,'') country,length(country)
  FROM table WHERE code='US';
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: copy2diffdatabase

2004-12-09 Thread Roger Baklund
N. Kavithashree wrote:
hello,
i hv a database ONE with some 10 tables;
i want to have a backup so how can i copy these tales to another database
in the same server and also to any other server?
The mysqldump utility can be used for this kind of things:
URL: http://dev.mysql.com/doc/mysql/en/mysqldump.html 
There are other options, but mysqldump covers most demands.
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Deleted: 0 Skipped: 0 Warnings: a lot

2004-12-09 Thread kalin mintchev
hi all...

where can i see what these warnings are. i get them when i do load data
infile.
i was looking for some kind of log under /var/logs/ or mysql/var/log but
there isn't a log file for mysql at any of those locations. and the
mysql/var/ doesn't exist at all.
i created it and redid the load but still no log file..

is there a way to read the binary log files...

thanks...



--


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



RE: Deleted: 0 Skipped: 0 Warnings: a lot

2004-12-09 Thread J.R. Bullington
Command is SHOW WARNINGS;

You can run this from either the command line or from the MySQL CC SQL viewer.

J.R. 

-Original Message-
From: kalin mintchev [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 09, 2004 6:53 PM
To: [EMAIL PROTECTED]
Subject: Deleted: 0 Skipped: 0 Warnings: a lot

hi all...

where can i see what these warnings are. i get them when i do load data infile.
i was looking for some kind of log under /var/logs/ or mysql/var/log but there 
isn't a log file for
mysql at any of those locations. and the mysql/var/ doesn't exist at all.
i created it and redid the load but still no log file..

is there a way to read the binary log files...

thanks...



--


--
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: Deleted: 0 Skipped: 0 Warnings: a lot

2004-12-09 Thread kalin mintchev
 Command is SHOW WARNINGS;

 You can run this from either the command line or from the MySQL CC SQL
viewer.

thanks..  but from the command line i get:
Check the manual that corresponds to your MySQL server version for the
right syntax to use near 'warnings' at line 1

is mysql-standard-4.0.13 to old for show warnings!?


(J.R., sorry about the double post...)




 J.R.

 -Original Message-
 From: kalin mintchev [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 09, 2004 6:53 PM
 To: [EMAIL PROTECTED]
 Subject: Deleted: 0 Skipped: 0 Warnings: a lot

 hi all...

 where can i see what these warnings are. i get them when i do load data
infile.
 i was looking for some kind of log under /var/logs/ or mysql/var/log but
there isn't a log file for
 mysql at any of those locations. and the mysql/var/ doesn't exist at
all.
 i created it and redid the load but still no log file..

 is there a way to read the binary log files...

 thanks...



 --


 --
 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: Deleted: 0 Skipped: 0 Warnings: a lot

2004-12-09 Thread J.R. Bullington
I have never had a problem running that command, however you do have to run it 
right after you run
your query (or LOAD DATA). That may be why you can't use it.

Also, try looking under HOSTNAME.ERR instead of a log file. That might help 
out.

J.R. 

-Original Message-
From: kalin mintchev [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 09, 2004 7:29 PM
To: J.R. Bullington
Subject: RE: Deleted: 0 Skipped: 0 Warnings: a lot


 Command is SHOW WARNINGS;

 You can run this from either the command line or from the MySQL CC SQL 
 viewer.

thanks..  but from the command line i get:
Check the manual that corresponds to your MySQL server version for the right 
syntax to use near
'warnings' at line 1

is mysql-standard-4.0.13 to old for show warnings!?




 J.R.

 -Original Message-
 From: kalin mintchev [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 09, 2004 6:53 PM
 To: [EMAIL PROTECTED]
 Subject: Deleted: 0 Skipped: 0 Warnings: a lot

 hi all...

 where can i see what these warnings are. i get them when i do load 
 data infile.
 i was looking for some kind of log under /var/logs/ or mysql/var/log 
 but there isn't a log file for mysql at any of those locations. and 
 the mysql/var/ doesn't exist at all.
 i created it and redid the load but still no log file..

 is there a way to read the binary log files...

 thanks...



 --


 --
 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: Deleted: 0 Skipped: 0 Warnings: a lot

2004-12-09 Thread kalin mintchev

 I have never had a problem running that command, however you do have to
 run it right after you run
 your query (or LOAD DATA). That may be why you can't use it.

that's what i did. here, this is straight from the cl of the mysql client:

Query OK, 415 rows affected (0.01 sec)
Records: 415  Deleted: 0  Skipped: 0  Warnings: 125

mysql show warnings;
ERROR 1064: 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
'warnings' at line 1



 Also, try looking under HOSTNAME.ERR instead of a log file. That might
 help out.

there is no such file on this machine...


thanks


 J.R.

 -Original Message-
 From: kalin mintchev [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 09, 2004 7:29 PM
 To: J.R. Bullington
 Subject: RE: Deleted: 0 Skipped: 0 Warnings: a lot


 Command is SHOW WARNINGS;

 You can run this from either the command line or from the MySQL CC SQL
 viewer.

 thanks..  but from the command line i get:
 Check the manual that corresponds to your MySQL server version for the
 right syntax to use near
 'warnings' at line 1

 is mysql-standard-4.0.13 to old for show warnings!?




 J.R.

 -Original Message-
 From: kalin mintchev [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 09, 2004 6:53 PM
 To: [EMAIL PROTECTED]
 Subject: Deleted: 0 Skipped: 0 Warnings: a lot

 hi all...

 where can i see what these warnings are. i get them when i do load
 data infile.
 i was looking for some kind of log under /var/logs/ or mysql/var/log
 but there isn't a log file for mysql at any of those locations. and
 the mysql/var/ doesn't exist at all.
 i created it and redid the load but still no log file..

 is there a way to read the binary log files...

 thanks...



 --


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




--


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



RE: Deleted: 0 Skipped: 0 Warnings: a lot

2004-12-09 Thread kalin mintchev
ok...  i just saw this in the manual:

This command is implemented in MySQL 4.1.0

that's why it doesn't work... mine is 4.0.13.
so what do people that have earlier versions then 4.1 do to see the
warnings?!



 I have never had a problem running that command, however you do have to
 run it right after you run
 your query (or LOAD DATA). That may be why you can't use it.

 Also, try looking under HOSTNAME.ERR instead of a log file. That might
 help out.

 J.R.

 -Original Message-
 From: kalin mintchev [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 09, 2004 7:29 PM
 To: J.R. Bullington
 Subject: RE: Deleted: 0 Skipped: 0 Warnings: a lot


 Command is SHOW WARNINGS;

 You can run this from either the command line or from the MySQL CC SQL
 viewer.

 thanks..  but from the command line i get:
 Check the manual that corresponds to your MySQL server version for the
 right syntax to use near
 'warnings' at line 1

 is mysql-standard-4.0.13 to old for show warnings!?




 J.R.

 -Original Message-
 From: kalin mintchev [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 09, 2004 6:53 PM
 To: [EMAIL PROTECTED]
 Subject: Deleted: 0 Skipped: 0 Warnings: a lot

 hi all...

 where can i see what these warnings are. i get them when i do load
 data infile.
 i was looking for some kind of log under /var/logs/ or mysql/var/log
 but there isn't a log file for mysql at any of those locations. and
 the mysql/var/ doesn't exist at all.
 i created it and redid the load but still no log file..

 is there a way to read the binary log files...

 thanks...



 --


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



Please put this question in MySQL

2004-12-09 Thread lakshmi.narasimharao

Hi ALL,



CONTEXT USE Example:


#include sqlca.h
#include ociextp.h
main()
{
sql_context ctx1;
char *usr1 = scott/tiger;




EXEC SQL CONTEXT ALLOCATE :ctx1; //Create Context
EXEC SQL CONTEXT USE :ctx1; // Use Context
EXEC SQL CONNECT :usr1;
EXEC SQL CONTEXT USE DEFAULT;
EXEC SQL INSERT INTO emp (empno, ename) VALUES (1234, 'WALKER');
}



The above code connects to Oracle database using the context.
Can we do similar stuff in MySQL 4.0.21 version? Did MySQL support the
usage of Context while
connecting to the database?



Please help. I need to connect to MySQL database using C program with
context.



Thanks,

Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

Re: Deleted: 0 Skipped: 0 Warnings: a lot

2004-12-09 Thread Dan Nelson
In the last episode (Dec 09), kalin mintchev said:
  From: kalin mintchev [mailto:[EMAIL PROTECTED]
  Command is SHOW WARNINGS;
 
  You can run this from either the command line or from the MySQL CC SQL
  viewer.
 
  thanks..  but from the command line i get:
  Check the manual that corresponds to your MySQL server version for the
  right syntax to use near
  'warnings' at line 1
 
  is mysql-standard-4.0.13 to old for show warnings!?

http://dev.mysql.com/doc/mysql/en/SHOW_WARNINGS.html

   SHOW WARNINGS shows the error, warning, and note messages that
   resulted from the last statement that generated messages, or nothing
   if the last statement that used a table generated no messages. This
   statement is implemented as of MySQL 4.1.0.


-- 
Dan Nelson
[EMAIL PROTECTED]

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



Regarding Connection Context

2004-12-09 Thread lakshmi.narasimharao



Hi ALL,

CONTEXT USE Example:

#include sqlca.h
#include ociextp.h
main()
{
sql_context ctx1;
char *usr1 = scott/tiger;

EXEC SQL CONTEXT ALLOCATE :ctx1; //Create Context
EXEC SQL CONTEXT USE :ctx1; // Use Context
EXEC SQL CONNECT :usr1;
EXEC SQL CONTEXT USE DEFAULT;
EXEC SQL INSERT INTO emp (empno, ename) VALUES (1234, 'WALKER');
}

The above code connects to Oracle database using the context.

Can we do similar stuff in MySQL 4.0.21 version? Did MySQL support the
usage of Context while
connecting to the database?

Please help. I need to connect to MySQL database using C program with
context.

Thanks,
Narasimha





Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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