Re: XML in MySQL

2003-06-23 Thread Jon Haugsand
* [EMAIL PROTECTED]
 geez mysql is an open source product you cannot expect so much too soon over
 a very expensive commercial product which has been out for years , for xml i
 usually generate it on the fly when i am extracting the data using the field
 names as the xml tag nodes.

Converting a relational dbms into an XML frontend is like trying to
change a Chevrolet into a Beetle.  (The problem is of course that too
many managers orders too much xml these days.)

-- 
 Jon Haugsand, [EMAIL PROTECTED]
 http://www.norges-bank.no


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



Re: mysql access error 1044 - update

2003-06-23 Thread Ivan Cukic
If you want to set the root password you can do the next thing
1. kill the mysqld
2. start mysqld with --skip-grant-tables option
3. set the new password with
   mysqladmin -u root password 'RogerTheRabbit'
   command
4. and finally - mysqladmin -h hostname flush-privileges

instead of 3 and 4 you can do this

3. Run mySQL client - mysql -u root
4. USE mysql;
   UPDATE user SET password=PASSWORD(RogerTheRabbit) WHERE user =
   root;
   FLUSH PRIVILEGES;

   Ivan

--
http://alas.matf.bg.ac.yu/~mr02014/
--
One World, one Web, one Program 
-- Microsoft promotional ad 

Ein Volk, ein Reich, ein Fuhrer 
-- Adolf Hitler 



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



MySQL Problems

2003-06-23 Thread Shawn Zernik
I am having problems with mySQL in windows.  I have a query that when ran
causes the server to die.  I have selected to debug the program and it tells
me of an unhandled exception wiring to a file.  The specifics I can provide
on more detail if it's actually a bug.

I have the following query generated by a PHP script that causes problems:
SELECT statistics.*
FROM profiles, answers, statistics
WHERE 1=1 AND profiles.sport = 1
  AND answers.profile IN(
SELECT profiles.id
FROM profiles, answers AS a0, answers AS a1
WHERE 1=1 AND profiles.sport = 1 AND a0.profile = profiles.id
  AND a0.statistic = 4 AND a0.data + 0 = 2
  AND a1.profile = profiles.id
  AND a1.statistic = 8
  AND a1.data REGEXP 'left'
  ) AND answers.statistic = statistics.id
  GROUP BY statistics.id;

I have ran the select statment in the IN and it returns one row with id =
6.  I have replaced the select in the IN with the number 6 and it works
fine.

To see if it was a problem with the subselect I have simplified the query
to:
SELECT statistics.*
FROM profiles, answers, statistics
WHERE 1=1 AND profiles.sport = 1
  AND answers.profile IN(
SELECT profiles.id
FROM profiles
  ) AND answers.statistic = statistics.id
  GROUP BY statistics.id;

and it returns the propoer data.  I can work around the issues by creating a
monster SQL statment of somewhat equivalance like:

SELECT statistics.*
FROM profiles, answers, statistics, answers AS a0, answers AS a1
WHERE 1=1 AND profiles.sport = 1
  AND profiles.sport = 1 AND a0.profile = profiles.id
  AND a0.statistic = 4 AND a0.data + 0 = 2
  AND a1.profile = profiles.id
  AND a1.statistic = 8
  AND a1.data REGEXP 'left'
  AND answers.statistic = statistics.id
GROUP BY statistics.id;

but find the first IS(SELECT) a little easier to follow.  Please let me know
if I have a SQL syntax flaw in the original SQL query, or if I have stumbled
upon a true bug.  I feel the SQL statment above is valid (even noting
redundencies) through executing the two select sepratly and combining the
results as mySQL should.

Please feel free to respond to me directly (through my email) relating to
this issue.

Thanks,
Shawn Zernik
Internetwork Consutling
www.internetworkconsulting.net

--- Sample Output ---
mysql use hsss;
Database changed
mysql SELECT statistics.*
- FROM profiles, answers, statistics
- WHERE 1=1 AND profiles.sport = 1
-AND answers.profile IN(
-  SELECT profiles.id
-  FROM profiles, answers AS a0, answers AS a1
-  WHERE 1=1 AND profiles.sport = 1 AND a0.profile =
profiles.id
-AND a0.statistic = 4 AND a0.data + 0 = 2
-AND a1.profile = profiles.id
-AND a1.statistic = 8
-AND a1.data REGEXP 'left'
-) AND answers.statistic = statistics.id
-GROUP BY statistics.id;
ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id:1
Current database: hsss

ERROR 2013: Lost connection to MySQL server during query
mysql use hsss;
Database changed
mysql SELECT statistics.*
- FROM profiles, answers, statistics, answers AS a0, answers AS a1
- WHERE 1=1 AND profiles.sport = 1
-AND profiles.sport = 1 AND a0.profile = profiles.id
-AND a0.statistic = 4 AND a0.data + 0 = 2
-AND a1.profile = profiles.id
-AND a1.statistic = 8
-AND a1.data REGEXP 'left'
-AND answers.statistic = statistics.id
- GROUP BY statistics.id;
ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id:1
Current database: hsss

++---+-++
| id | sport | caption | units  |
++---+-++
|  3 | 1 | Sticks  | number |
|  4 | 1 | Blades  | number |
|  5 | 2 | Balls   | number |
|  7 | 2 | Shoe Size   | number |
|  8 | 1 | Position| text   |
|  9 | 1 | Avalibility ||
| 10 | 2 | Position| text   |
| 11 | 2 | Avalible||
++---+-++
8 rows in set (0.22 sec)

mysql SELECT statistics.*
- FROM profiles, answers, statistics
- WHERE 1=1 AND profiles.sport = 1
-AND answers.profile IN(
-  SELECT profiles.id
-  FROM profiles
-) AND answers.statistic = statistics.id
-GROUP BY statistics.id;
++---+-++
| id | sport | caption | units  |
++---+-++
|  3 | 1 | Sticks  | number |
|  4 | 1 | Blades  | number |
|  5 | 2 | Balls   | number |
|  7 | 2 | Shoe Size   | number |
|  8 | 1 | Position| text   |
|  9 | 1 | Avalibility |  

RE: Query excution time

2003-06-23 Thread Prem Soman
thank u lovatt!
cant i create an application that runs like a
Oracle trigger using 'C' so that i can get the queries
and the time they took to execute dynamically rather
than using a synthetic model.


--- Peter Lovatt [EMAIL PROTECTED] wrote:  Hi
 
 if you are using php
 
 http://uk.php.net/manual/en/function.microtime.php
 
 ?php
 function getmicrotime(){ 
 list($usec, $sec) = explode( ,microtime()); 
 return ((float)$usec + (float)$sec); 
 } 
 $time_start = getmicrotime();
 
 //query here
 
 $time_end = getmicrotime();
 $time = $time_end - $time_start;
 echo Did nothing in $time seconds;
 ?
 
 
 
 
 -Original Message-
 From: Prem Soman [mailto:[EMAIL PROTECTED]
 Sent: 21 June 2003 08:03
 To: mysql groups
 Subject: Query excution time
 
 
 hi !
 
 what is the best way to find query excution time in
 MySql
 
 plz help me!
 


 Want to chat instantly with your online friends? 
 Get the FREE Yahoo!
 Messenger http://uk.messenger.yahoo.com/
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
  


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

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



2-way replication..how many slaves?

2003-06-23 Thread M Lists
I'm researching a specific network design and have some questions that may
involve 2-way replication.

I have one master mysql server doing 1 way replication to a large number of
remotely located slaves.  Each slave
serves a number of proprietary software clients running inside a private
network.  These proprietary software clients do not have
Internet access but of course the local slave does.  These proprietary
software clients enter data into 2 tables on the local slave.
We now have the need to get these remote slaves to send the data in these 2
tables back to the master and merge it in 2 central tables.

The amount of data that needs to be sent back is not terribly large and only
needs to happen maybe once or twice a day.  What is the most
logical and efficient way to accomplish this?  Is 2-way replication a
candidate here with the master server also acting as a slave to each of the
remote slaves?  I was under the initial impression that any slave can only
have one master and if so it would seem that 2 way replication would only
work
with 2 servers.   What method would work if I had 1 master with 100 slaves
and each of these slaves needed to merge 2 tables back into the single
master?


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



./configure doesn't create a Makefile

2003-06-23 Thread Michal Simovic

Hi, I tried to install MySQL source distribution, to be concrete 
mysql-standard-4.0.13-pc-linux-i686.
after running ./configure, it gives no error message, but when running make it says 
make: *** No targets specified and no makefile found.  Stop.
In manual i read it is important to have new versions of GNU gcc and make, my gcc is 
version 3.2 and make is
version 3.79.1, both (according to manual) enough new.
Could somebody help?
thanks


-- 
--
miso

0904 943 322 | http://misoswebat.sovic.sk

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



Re: CREATE TABLE with date as part of table name

2003-06-23 Thread Egor Egorov
Me [EMAIL PROTECTED] wrote:
 
 I would like to know how to create a table within MySQL at the command
 prompt where the table name will be something like:
 
 
 MyTableName_TodaysDate
 
 
 Is this possible while at the command prompt? I am trying to create a batch
 file that will create a table in MySQL based on todays date. The system I am
 working on at the moment is Win2k.

You can do it with MySQL only.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [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]



Re: specified function mysql

2003-06-23 Thread Egor Egorov
MaFai [EMAIL PROTECTED] wrote:
 
 I'm just wondering is there a function instead of update to overwrite data
 that has expired??
 Or can mysql automatically deletes records or rows that has expires just
 like cookies delete themselves after expiring.

Nope. Write a script that deletes rows and add a task to crontab.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [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]



Re: MySQL Problems

2003-06-23 Thread Victoria Reznichenko
Shawn Zernik [EMAIL PROTECTED] wrote:
 I am having problems with mySQL in windows.  I have a query that when ran
 causes the server to die.  I have selected to debug the program and it tells
 me of an unhandled exception wiring to a file.  The specifics I can provide
 on more detail if it's actually a bug.
 
[skip

Send me please the table's structures and some data for testing.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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]



Re: Driver 3.51 Not Found 2

2003-06-23 Thread Egor Egorov
Ellen Cain [EMAIL PROTECTED] wrote:
 
 I downloaded MyODBC-3.51.06.zip , unzipped it, and there isn't a setup.exe file - 
 only 'setup.c'
 Should MyODBC-3.51.06.exe be downloaded?

Did you download MyODBC from MySQL site?
Please, download MyODBC-3.51.06.exe from one of the mirrors:
http://www.mysql.com/downloads/api-myodbc-3.51.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [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]



Re: Privilege question

2003-06-23 Thread Victoria Reznichenko
Nils Valentin [EMAIL PROTECTED] wrote:
 
 I saw in the online manual
 
 http://www.mysql.com/doc/en/SET_OPTION.html
 http://www.mysql.com/doc/en/Privileges.html
 
 
 A SUPER PRIVILEGE mentioned. How does it differ from the  GRANT privilege ?

GRANT option allows you to give your privileges to other users.
SUPER privilege allows to execute some commands related to database administration, 
like KILL, LOAD DATA FROM MASTER etc.

 I would appreciate if anybody could point me to some more detailed infomation 
 of each privilege .
 
 I have seen some description already f.e with
 mysql SHOW PRIVILEGES;

You can find description of prvileges at:
http://www.mysql.com/doc/en/Privileges_provided.html 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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]



Re: Big problem with autoincrementing

2003-06-23 Thread Victoria Reznichenko
Fandango del Morro [EMAIL PROTECTED] wrote:
 
 Hello,
 I'm new in this list and I also a newbie with MySql. I have a big problem 
 with autoincrementing with an initial value. For example:
 
 use Database Business;
 create Table Clients(Client_ID int not null primary key auto_increment=10, 
 Full_Name varchar(30));
 
 Each time I assign an initial value to auto_increment I get an error and 
 worse, the MySql server only tell me there is an error, it doesn't tell me 
 what kind of error is.
 
 I tried at leat 30 times before writing this message. I really unable to 
 solve this problem. auto_increment=n is an accepted syntax and it is 
 documented in all sql books.
 
 Can you explain me why I have this problem?

It's not a correct syntax. If you want to specify initial value of auto_increment 
column, you can do it like:

CREATE TABLE Clients(

) AUTO_INCREMENT=10;


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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]



Re: I don'get binlogs to log properly

2003-06-23 Thread Martin Waite
On Thu, 2003-06-19 at 14:13, [EMAIL PROTECTED]
wrote:

 binlog-do-db=   test mysql

Hi,

There should only be one database per line:

binlog-do-db=   test
binlog-do-db=   mysql

regards,
Martin


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



Re: why me??!

2003-06-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-21 12:35:04 -0700:
 I'm trying to load a couple tons of data into a shopping cart system
 and for some reason it keeps kicking back with an error.  I'm too dumb
 to figure out why.  Can anyone tell me what's wrong with this code and
 why it doesn't work?

I can tell you what's wrong with your post: an error is a poor
replacement for the actual message.

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.see http://www.eyrie.org./~eagle/faqs/questions.html

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



Re: I don'get binlogs to log properly

2003-06-23 Thread cedric.boudin
Martin Waite writes:
  On Thu, 2003-06-19 at 14:13, [EMAIL PROTECTED]
  wrote:
  
   binlog-do-db=   test mysql
  
  Hi,
  
  There should only be one database per line:
  
  binlog-do-db=   test
  binlog-do-db=   mysql
How stupid of me not to have thought about this one

thks


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



Re: Problems compiling the C++ libs for Solaris 2.7 Workshop 5.0

2003-06-23 Thread Arvind Patel
Dear all,

Can someone please help me???

I'm getting errors compiling MySQL++ libs on Solaris 2.7 using Sun Workshop 5.0 
compiler.

I've built the C client libs/api successfully using the following configure command ( 
 then done make, make install )

configure CC=/opt/SUNWspro/bin/cc CFLAGS=-Xa -fast -native -xstrconst -mt 
CXX=/opt/SUNWspro/bin/CC CXXFLAGS=-mt --prefix=/home/apatel/mysqlapi 
--enable-assembler --without-server

The following environment variables were set for the compiler options.

CC=/opt/SUNWspro/bin/cc
CFLAGS=-Xa -fast -native -xstrconst -mt
CXX=/opt/SUNWspro/bin/CC
CXXFLAGS=-mt

I've tried building the MySQL++ libs/api using the following command

configure --prefix=/home/apatel/mysql++ --with-mysql=/home/apatel/mysqlapi 
--with-mysql-lib=/home/apatel/mysqlapi/lib 
--with-mysql-include=/home/apatel/mysqlapi/include --enable-exception

But I get the following compile errors after doing make

/opt/SUNWspro/bin/CC -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../sqlplusint 
-I/home/apatel/mysqlapi/include/mysql -mt -Wp,-MD,.deps/coldata.pp -c  -KPIC -DPIC 
coldata.cc -o coldata.o
CC: Warning: Option -Wp,-MD,.deps/coldata.pp passed to ld, if ld is invoked, ignored 
otherwise
const_string1.hh, line 50: Error: The function out_of_range must have a prototype.
const_string1.hh, line 70: Error: inline is not allowed here.
const_string1.hh, line 70: Error: , expected instead of .
const_string1.hh, line 72: Error: A declaration was expected instead of }.
exceptions.hh, line 14: Error: exception is not defined.
exceptions.hh, line 16: Error: ) expected instead of .
exceptions.hh, line 16: Error: error is not a member of MysqlBadQuery.
exceptions.hh, line 16: Warning: The constant member string is not initialized.
exceptions.hh, line 22: Error: exception is not defined.
exceptions.hh, line 23: Error: , expected instead of _what.
exceptions.hh, line 24: Error: Use ; to terminate declarations.
exceptions.hh, line 26: Error: Multiple declaration for string.
exceptions.hh, line 26: Error: , expected instead of data.
exceptions.hh, line 27: Error: Use ; to terminate declarations.
exceptions.hh, line 33: Error: ) expected instead of .
exceptions.hh, line 30: Error: _what is not a member of MysqlBadConversion.
exceptions.hh, line 31: Error: data is not a member of MysqlBadConversion.
exceptions.hh, line 31: Warning: The constant member string is not initialized.
exceptions.hh, line 34: Error: _what is not a member of MysqlBadConversion.
exceptions.hh, line 34: Error: data is not a member of MysqlBadConversion.
exceptions.hh, line 34: Warning: The constant member string is not initialized.
exceptions.hh, line 37: Error: _what is not a member of MysqlBadConversion.
exceptions.hh, line 37: Error: data is not a member of MysqlBadConversion.
exceptions.hh, line 37: Warning: The constant member string is not initialized.
exceptions.hh, line 44: Error: exception is not defined.
exceptions.hh, line 45: Error: , expected instead of _what.
exceptions.hh, line 46: Error: Use ; to terminate declarations.
exceptions.hh, line 47: Error: ) expected instead of .
exceptions.hh, line 47: Error: _what is not a member of BadNullConversion.
Compilation aborted, too many Error messages.
make[2]: *** [coldata.lo] Error 1
make[2]: Leaving directory `/home/apatel/mysql++-1.7.9/sqlplusint'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/apatel/mysql++-1.7.9'
make: *** [all-recursive-am] Error 2

If anybody can help it would be greatly appreciated.

Thanks in advance.

Arvind Patel


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



Help required on testing MySQL with Open SSL

2003-06-23 Thread Prasad Budim Ram
Hi,

 I'm looking for information on testing  MySQL server with Open SSL
using any client(JDBC/ODBC). Please let me know how to test using a
MySQL client for SSL. I was able to compile mysql with using open SSL

Thanks
Ram

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



Bug with 4.1.0-alpha Solaris

2003-06-23 Thread Peter Burden
Hello,
   After some moderately heavy usage, MySQL crashed on me.
   The problem seems to relate to the size of the innodb log file,
   alhtough I'm not currently using innodb files.  [Still trying to
   debug client before exploring innodb vs myisam ]
   I've gathered up all the evidence in a tarball and attached it.
   This includes - (1) The .err file
   (2) The my.cnf file
   (3) Some directory listings that might be 
relevant

I hope I've sent all this to the correct place - if not apologies.


bug.tar.gz
Description: GNU Zip compressed data
-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: What's wrong with this query?

2003-06-23 Thread Chris Boget
  Why isn't the key being used in the c (certificate) table?
  SELECT DISTINCT a.uid, a.company, a.firstname, a.lastname 
  FROM master_info a, logins lsl, logins lc, certificate c WHERE 
  a.uid = lsl.uid AND lc.parent = lsl.uid AND lc.uid = c.uid AND 
  c.void  1 AND c.status IN 
  ('CP', 'MC', 'AIC', 'RP', 'VQ', 'NQ', 'LQ', 'RQ', 'NG', 'EP', 'AA',
  'AD' ) AND lsl.active = 1 AND lsl.void = 0 ORDER BY company, uid
 How do you think the key should be used?  You have a key on status, 
 but you're asking for a wide range of status values.  Presumably 
 MySQL thinks (probably correctly) that using the index to find a 
 range of status values from 'AA' to 'VQ' is no faster than doing a 
 full table scan.
 I could be missing something, but if so it would help if you could 
 explain how you expect the key to be used.

Well, I would expect it to use the key on the status column.  But
barring that (as you suggest, MySQL might think that using the
key on status would be no faster), I would at least expect it to be
using the key for the 'uid' field and possible the (uid,void,status)
key as well.  Even just using the key on the uid field could very
well speed the query up as it would be pulling the records matching
the 'status' column from a diminished field of possible records.

Or do I have it all wrong?

Chris
mysql,query,blah


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



Re: Textfile to a 2 column mysql database

2003-06-23 Thread gerald_clark
Write a quick perl program.

O.S. Bos wrote:

Hi there,

I have a textfile that I want to get inserted into a database. The
textfile consists of Questions and Answers. 1st line is a question. 2nd
line of the textfile is the answer. And so on... 

What is the best way to import these lines into the database with 2
columns. 1 column for the questions and one for the answers?
Thx!
Unox
 



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


New mtop/mkill version available

2003-06-23 Thread Marc Prewitt
mtop (MySQL top) monitors a MySQL server showing the queries which are
taking the most amount of time to complete. Features include 'zooming' in
on a process to show the complete query, 'explaining' the query optimizer
information for a query and 'killing' queries. In addition, server
performance statistics, configuration information, and tuning tips are
provided. 

mkill (MySQL kill) monitors a MySQL server for long running queries and
kills them after a specified time interval. Queries can be selected based
on regexes on the user, host, command, database, state and query. 

New in this version:

mtop has new options to control how many seconds elapse before a slow
query is highlighted. 

Available from: http://mtop.sourceforge.net

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



RE: Textfile to a 2 column mysql database

2003-06-23 Thread Christopher Knight
OR, if you are good at vi,

you can insert a ' at the begining and end of every line (if you dont have
any 's in the file)
then put a , at the end of every odd line
then join every other line

the put a   insert into blah (question, answer) values (at the
begin of every line
and then a ); at the end of every line

Then you hopefully have a file full of insert statements and you can just
feed it into a mysql client.
If I missed a step or added one by accident or even got one wrong, go ahead
and fix it and pretend
I told you correctly. ;-)

The problem with my solution, is that if you have any wierd characters, they
arent escaped.

or you could just write a perl program

chris

-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 8:21 AM
To: O.S. Bos
Cc: [EMAIL PROTECTED]
Subject: Re: Textfile to a 2 column mysql database


Write a quick perl program.

O.S. Bos wrote:

Hi there,

I have a textfile that I want to get inserted into a database. The
textfile consists of Questions and Answers. 1st line is a question. 2nd
line of the textfile is the answer. And so on...

What is the best way to import these lines into the database with 2
columns. 1 column for the questions and one for the answers?

Thx!
Unox







--
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: Textfile to a 2 column mysql database

2003-06-23 Thread gerald_clark
Unless, of course, you have quotes in your data.
With perl you can use the quote() function to ensure the whole line gets in.
Christopher Knight wrote:

OR, if you are good at vi,

you can insert a ' at the begining and end of every line (if you dont have
any 's in the file)
then put a , at the end of every odd line
then join every other line
the put a   insert into blah (question, answer) values (at the
begin of every line
and then a ); at the end of every line
Then you hopefully have a file full of insert statements and you can just
feed it into a mysql client.
If I missed a step or added one by accident or even got one wrong, go ahead
and fix it and pretend
I told you correctly. ;-)
The problem with my solution, is that if you have any wierd characters, they
arent escaped.
or you could just write a perl program

chris

-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 8:21 AM
To: O.S. Bos
Cc: [EMAIL PROTECTED]
Subject: Re: Textfile to a 2 column mysql database
Write a quick perl program.

O.S. Bos wrote:

 

Hi there,

I have a textfile that I want to get inserted into a database. The
textfile consists of Questions and Answers. 1st line is a question. 2nd
line of the textfile is the answer. And so on...
What is the best way to import these lines into the database with 2
columns. 1 column for the questions and one for the answers?
Thx!
Unox


   



--
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: Driver 3.51 Not Found 2

2003-06-23 Thread Mike Hillyer
For automated setup under windows, the MyODBC-3.51.06.exe file should be
downloaded.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Ellen Cain [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, June 21, 2003 4:37 PM
 To: [EMAIL PROTECTED]
 Subject: Driver 3.51 Not Found 2
 
 
 I downloaded MyODBC-3.51.06.zip , unzipped it, and there 
 isn't a setup.exe file - only 'setup.c'
 Should MyODBC-3.51.06.exe be downloaded?
 
 

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



Re: Textfile to a 2 column mysql database

2003-06-23 Thread Fagyal, Csongor
gerald_clark wrote:

Unless, of course, you have quotes in your data.
With perl you can use the quote() function to ensure the whole line 
gets in.
Or placeholders.

- Cs.

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


RE: Driver 3.51 Not Found

2003-06-23 Thread Mike Hillyer
That would be because you have not installed it. MyODBC does not install
by default, and you may not need it. If you are going to be accessing
your new database through ODBC, then go to
http://www.mysql.com/downloads/api-myodbc-3.51.html where you can
download the latest driver. If you will not be using ODBC, then you need
not worry about that message.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Ellen Cain [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, June 21, 2003 10:05 AM
 To: [EMAIL PROTECTED]
 Subject: Driver 3.51 Not Found
 
 
 Hello,
 I'm new to mySQL.
 In Windows, after clicking winmysqladmin.exe in Explorer, I 
 get the message - Driver 3.51 Not Found.
 
 Any help would be greatly appreciated.
 Ellen
 

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



RE: MySQL - MS SQL

2003-06-23 Thread Tab Alleman
Sheni R. Meledath wrote:

 Can any body provide me some details regarding migrating MySQL
 databases to MS SQL databases. 

I recently got to do this.  I built DTS packages on the MS-SQL database
to import my data from MySQL.  I found it worked better to create the
tables manually and then import the data, because when I let the DTS
wizard create the tables, it made some poor choices for datatypes.


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



varchar restriction

2003-06-23 Thread Andrew
Hi MySQL gurus

If I chnage a varchar in one table will it effect another related column in
another table?

Andrew


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



Re: XML in MySQL

2003-06-23 Thread Stephen Fromm

- Original Message - 
From: Jon Haugsand [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 23, 2003 2:57 AM
Subject: Re: XML in MySQL


 * [EMAIL PROTECTED]
  geez mysql is an open source product you cannot expect so much too soon
over
  a very expensive commercial product which has been out for years , for
xml i
  usually generate it on the fly when i am extracting the data using the
field
  names as the xml tag nodes.

 Converting a relational dbms into an XML frontend is like trying to
 change a Chevrolet into a Beetle.  (The problem is of course that too
 many managers orders too much xml these days.)

Hear, hear!

A good place to look if you're interested in the views of relational DB
purists (and what they think of XML, etc) is
http://www.dbdebunk.com/

-S


 -- 
  Jon Haugsand, [EMAIL PROTECTED]
  http://www.norges-bank.no


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



reset id of tables

2003-06-23 Thread Petre Agenbag
Hi List

Probably a stupid question, but I want to know if there is a quick way
to reset all the id's on my tables to 0?
I ran a whole bunch of tests on the app; writing and deleting to the
tables, and would like to reset all tables to start at 0 when I make
the app live.

Thanks



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



RE: varchar restriction

2003-06-23 Thread Mike Hillyer
It will not. If such a change is desirable, you will have to make the
change in the related table as well.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Andrew [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 7:57 AM
 To: MySQL-Lista
 Subject: varchar restriction
 
 
 Hi MySQL gurus
 
 If I chnage a varchar in one table will it effect another 
 related column in
 another table?
 
 Andrew
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

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



Re: reset id of tables - SOLVED

2003-06-23 Thread Petre Agenbag
Nevermind, found it:

truncate table;

On Mon, 2003-06-23 at 15:59, Petre Agenbag wrote:
 Hi List
 
 Probably a stupid question, but I want to know if there is a quick way
 to reset all the id's on my tables to 0?
 I ran a whole bunch of tests on the app; writing and deleting to the
 tables, and would like to reset all tables to start at 0 when I make
 the app live.
 
 Thanks
 
 


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



RE: Textfile to a 2 column mysql database

2003-06-23 Thread csebe
To pinpoint the solution here it is an one liner ;-)

perl -n -e 'chomp; print INSERT INTO YourTable (question,answer) VALUES
(\$tmp\,\$_\);\n if ($|--); $tmp=$_' test.txt  test.sql

It's a hybrid perl solution which requires feeding in MySQL afterwards and
it disregards special characters.

Lian


 -Original Message-
 From: gerald_clark [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 23, 2003 4:42 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Textfile to a 2 column mysql database


 Unless, of course, you have quotes in your data.
 With perl you can use the quote() function to ensure the whole
 line gets in.

 Christopher Knight wrote:

 OR, if you are good at vi,
 
 you can insert a ' at the begining and end of every line (if you
 dont have
 any 's in the file)
 then put a , at the end of every odd line
 then join every other line
 
 the put a   insert into blah (question, answer) values
 (at the
 begin of every line
 and then a ); at the end of every line
 
 Then you hopefully have a file full of insert statements and you can just
 feed it into a mysql client.
 If I missed a step or added one by accident or even got one
 wrong, go ahead
 and fix it and pretend
 I told you correctly. ;-)
 
 The problem with my solution, is that if you have any wierd
 characters, they
 arent escaped.
 
 or you could just write a perl program
 
 chris
 
 -Original Message-
 From: gerald_clark [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 23, 2003 8:21 AM
 To: O.S. Bos
 Cc: [EMAIL PROTECTED]
 Subject: Re: Textfile to a 2 column mysql database
 
 
 Write a quick perl program.
 
 O.S. Bos wrote:
 
 
 
 Hi there,
 
 I have a textfile that I want to get inserted into a database. The
 textfile consists of Questions and Answers. 1st line is a question. 2nd
 line of the textfile is the answer. And so on...
 
 What is the best way to import these lines into the database with 2
 columns. 1 column for the questions and one for the answers?
 
 Thx!
 Unox
 
 
 
 
 
 
 
 
 
 --
 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: RAID hardware suggestions/experience

2003-06-23 Thread Bernd Jagla
Thanks to everybody for the nice discussion.

Just to let you know about  my (not necessary final) decisions:
We will upgrade our SCSI -II controller to an Ultra SCSI 160 controller
(always a good idea).
Next we are looking into buying a RAID-5 system from RAIDking.
While we do this we hope for the best

Thanks again for you kind help.

Bernd



 
 =
 
 Please note that this e-mail and any files transmitted with it may be 
 privileged, confidential, and protected from disclosure under 
 applicable law. If the reader of this message is not the intended 
 recipient, or an employee or agent responsible for delivering this 
 message to the intended recipient, you are hereby notified that any 
 reading, dissemination, distribution, copying, or other use of this 
 communication or any of its attachments is strictly prohibited.  If 
 you have received this communication in error, please notify the 
 sender immediately by replying to this message and deleting this 
 message, any attachments, and all copies and backups from your 
 computer.



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



Excel(2002) and mysql4

2003-06-23 Thread Bernd Jagla
My costomers are using Excel, so I am looking into connecting Excel with MySql.
Does anyone know how to do this? 
Do you have a small example?

Thank you very much for your help

Bernd

 
 =
 
 Please note that this e-mail and any files transmitted with it may be 
 privileged, confidential, and protected from disclosure under 
 applicable law. If the reader of this message is not the intended 
 recipient, or an employee or agent responsible for delivering this 
 message to the intended recipient, you are hereby notified that any 
 reading, dissemination, distribution, copying, or other use of this 
 communication or any of its attachments is strictly prohibited.  If 
 you have received this communication in error, please notify the 
 sender immediately by replying to this message and deleting this 
 message, any attachments, and all copies and backups from your 
 computer.



RE: Excel(2002) and mysql4

2003-06-23 Thread Victor Pendleton
You can use MS Query and MyODBC to allow your customers to access the MySQL
database.   

-Original Message-
From: Bernd Jagla [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 9:12 AM
To: mysql
Subject: Excel(2002) and mysql4


My costomers are using Excel, so I am looking into connecting Excel with
MySql.
Does anyone know how to do this? 
Do you have a small example?

Thank you very much for your help

Bernd

 
 =
 
 Please note that this e-mail and any files transmitted with it may be 
 privileged, confidential, and protected from disclosure under 
 applicable law. If the reader of this message is not the intended 
 recipient, or an employee or agent responsible for delivering this 
 message to the intended recipient, you are hereby notified that any 
 reading, dissemination, distribution, copying, or other use of this 
 communication or any of its attachments is strictly prohibited.  If 
 you have received this communication in error, please notify the 
 sender immediately by replying to this message and deleting this 
 message, any attachments, and all copies and backups from your 
 computer.


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



SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
I have a SQL query that needs to reference three different tables. I'm 
creating an online buddy list of members who are online. I have all of this 
functioning but am trying to also reference another table where the user is 
being blocked, in which case I do not what the user's name to be shown in 
the user's buddy list. I'm using the code below:

//SET $colname TO USER'S ID SESSION
$colname = $HTTP_SESSION_VARS['svUserID'];

//SELECT THE TABLES FROM DATABASE
SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID
FROM useronline, penpals_fav, penpals_privmsgs_block

// HERE I CHECK IF THE USER'S NAME IS IN THE FAVORITIES USER TABLE
// AND THE ONLINE USER TABLE ALL OF WHICH WORKS FINE
WHERE penpals_fav.fav_user_name = useronline.uname AND penpals_fav.user_id = 
$colname AND penpals_privmsgs_block.user_id = $colname 

It gets tricky here when I try to select from another table because this 
table will not always have the user's name in it, only if the user is 
blocked by another user will there be a record, in which case we do not want 
the user's name to be displayed. I was thinking this, but then realized that 
this would only create a list of those who are being blocked which not what 
I'm trying to do.

AND penpals_privmsgs_block.blocked_id != colname




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



Re: mysql ended error

2003-06-23 Thread Pushpinder Singh Garcha
Thanks Nils,
(B
(B  I had been having an terrible experience starting up MySQL. I used to  
(Bget this error Can't connect to local MySQL server through socket  
(B'/tmp/mysql.sock' (2)
(B
(BI have tried the following:
(B
(B1. Manually start the server using sudo ./bin/mysqld_safe 
(B
(Bthe result was :
(B
(B[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases  
(Bfrom /usr/local/mysql/data
(B030623 10:12:40 mysqld ended
(B[1] Done sudo ./bin/mysqld_safe
(B[psg:/usr/local/mysql] psgarcha%
(B
(B 
(B-
(B
(B2. Next I tried to reinitialize the MySQL using the intructions given  
(Bon www.entropy.ch , but even that did not help.
(B
(BMy error log file has this in it :
(B
(B030623 10:10:48 mysqld started
(B030623 10:10:50 InnoDB: Started
(B030623 10:10:50 Fatal error: Can't open privilege tables: Can't open  
(Bfile: 'user.MYI'. (errno: 145)
(B030623 10:10:50 Aborting
(B
(B030623 10:10:50 InnoDB: Starting shutdown...
(B030623 10:10:52 InnoDB: Shutdown completed 030623 10:10:52  
(B/usr/local/mysql-standard-4.0.13-apple-darwin6.4-powerpc/bin/mysqld:  
(BShutdown Complete
(B
(B030623 10:10:52 mysqld ended
(B 
(B-
(B
(B3. At last I tried to REINSTALL MySQL from the scratch. I used the  
(B"update" instructions. But there is still NO CHANGE. I get the same  
(Berror.
(B03[psg:/usr/local/mysql] psgarcha% 030623 10:12:40 mysqld ended
(B
(B 
(B-
(B
(B
(BPlease help me.. I am going crazy !!
(B
(B
(BThank you again.
(B--Pushpinder
(B
(B
(BOn Friday, June 20, 2003, at 08:55 PM, Nils Valentin wrote:
(B
(B Somehow the Index of the mysql.user table is crashed.
(B
(B mysql is a database within the MYSQL RDBMS that stores the user  
(B accounts,
(B passwords, user rights (privileges).
(B
(B And somehow you managed to mess up the most important table.
(B
(B There are 6 tables within the privilege system (mysql database)
(B
(B user
(B host
(B db
(B tables_priv
(B columns_priv
(B func
(B
(B The table user contains the username, hostname and the password etc...
(B
(B If any of these tables ( but especially the user table) are messed up  
(B than
(B MySQL doesnt startup and even if it would you could not login as the  
(B user
(B table is unreadable at present.
(B
(B The quick way is to reinstall MySQL. You could try to copy the whole  
(B folder
(B were the privilege database "mysql" is stored from another machine (if  
(B you
(B have one).
(B
(B Best regards
(B
(B Nils Valentin
(B Tokyo/Japan
(B
(B
(B 2003$BG/(B 6$B7n(B 21$BF|(B $BEZMKF|(B 04:25$B!"(BPushpinder Singh Garcha $B$5$s$O=q$-$^$7$?(B:
(B hello all,
(B
(B i hve been getting the 'mysql ended' error for over a wek now.when i
(B look into the log file this is what I get
(B
(B This is from the error logs
(B
(B 030619 17:09:04 mysqld ended
(B
(B 030620 13:14:06 mysqld started
(B 030620 13:14:09 InnoDB: Started
(B 030620 13:14:09 Fatal error: Can't open privilege tables: Can't open
(B file: 'user.MYI'. (errno: 145)
(B 030620 13:14:09 Aborting
(B
(B 030620 13:14:09 InnoDB: Starting shutdown...
(B 030620 13:14:11 InnoDB: Shutdown completed
(B 030620 13:14:11
(B /usr/local/mysql-standard-4.0.12-apple-darwin6.4-powerpc/bin/mysqld:
(B Shutdown Complete
(B
(B 030620 13:14:11 mysqld ended
(B
(B
(B Please offer some insight into what migh tbe going on. I have tried to
(B re-initialize the DB , but Nothing chnaged!
(B
(B Thanks
(B -Pushpinder
(B
(B -- 
(B ---
(B Valentin Nils
(B Internet Technology
(B
(B  E-Mail: [EMAIL PROTECTED]
(B  URL: http://www.knowd.co.jp
(B  Personal URL: http://www.knowd.co.jp/staff/nils
(B

RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread Mike Hillyer
What you need is a LEFT JOIN. When you use a LEFT JOIN, you get all rows
from your main table, with either the data from the
penpals_privmsgs_block table if there is corresponding data, or NULL if
there is no related row. Take a look here:
http://www.mysql.com/doc/en/JOIN.html for more information.

Here's a quick rewrite, you fill in the blanks:

SELECT distinct useronline.uname, penpals_fav.fav_user_id,
penpals_fav.ID
FROM useronline LEFT JOIN penpals_privmsgs_block ON useronline.something
= penpals_privmsgs_block.somethingelse, penpals_fav
WHERE penpals_fav.fav_user_name = useronline.uname AND
penpals_fav.user_id = $colname 
AND penpals.privmsgs_block.something IS NULL

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: vernon [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 8:42 AM
 To: [EMAIL PROTECTED]
 Subject: SQL query - 3 tables - 3rd one conatins records to 
 not display
 
 
 I have a SQL query that needs to reference three different 
 tables. I'm 
 creating an online buddy list of members who are online. I 
 have all of this 
 functioning but am trying to also reference another table 
 where the user is 
 being blocked, in which case I do not what the user's name to 
 be shown in 
 the user's buddy list. I'm using the code below:
 
 //SET $colname TO USER'S ID SESSION
 $colname = $HTTP_SESSION_VARS['svUserID'];
 
 //SELECT THE TABLES FROM DATABASE
 SELECT distinct useronline.uname, penpals_fav.fav_user_id, 
 penpals_fav.ID
 FROM useronline, penpals_fav, penpals_privmsgs_block
 
 // HERE I CHECK IF THE USER'S NAME IS IN THE FAVORITIES USER TABLE
 // AND THE ONLINE USER TABLE ALL OF WHICH WORKS FINE
 WHERE penpals_fav.fav_user_name = useronline.uname AND 
 penpals_fav.user_id = 
 $colname AND penpals_privmsgs_block.user_id = $colname 
 
 It gets tricky here when I try to select from another table 
 because this 
 table will not always have the user's name in it, only if the user is 
 blocked by another user will there be a record, in which case 
 we do not want 
 the user's name to be displayed. I was thinking this, but 
 then realized that 
 this would only create a list of those who are being blocked 
 which not what 
 I'm trying to do.
 
 AND penpals_privmsgs_block.blocked_id != colname
 
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

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



RE: mysql ended error

2003-06-23 Thread Victor Pendleton
Your grant tables are either corrupted or damaged. Error 145 indicates this.
(B
(B-Original Message-
(BFrom: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
(BSent: Monday, June 23, 2003 9:43 AM
(BTo: Nils Valentin
(BCc: [EMAIL PROTECTED]
(BSubject: Re: mysql ended error
(B
(B
(BThanks Nils,
(B
(B  I had been having an terrible experience starting up MySQL. I used to  
(Bget this error Can't connect to local MySQL server through socket  
(B'/tmp/mysql.sock' (2)
(B
(BI have tried the following:
(B
(B1. Manually start the server using sudo ./bin/mysqld_safe 
(B
(Bthe result was :
(B
(B[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases  
(Bfrom /usr/local/mysql/data
(B030623 10:12:40 mysqld ended
(B[1] Done sudo ./bin/mysqld_safe
(B[psg:/usr/local/mysql] psgarcha%
(B
(B 
(B-
(B
(B2. Next I tried to reinitialize the MySQL using the intructions given  
(Bon www.entropy.ch , but even that did not help.
(B
(BMy error log file has this in it :
(B
(B030623 10:10:48 mysqld started
(B030623 10:10:50 InnoDB: Started
(B030623 10:10:50 Fatal error: Can't open privilege tables: Can't open  
(Bfile: 'user.MYI'. (errno: 145)
(B030623 10:10:50 Aborting
(B
(B030623 10:10:50 InnoDB: Starting shutdown...
(B030623 10:10:52 InnoDB: Shutdown completed 030623 10:10:52  
(B/usr/local/mysql-standard-4.0.13-apple-darwin6.4-powerpc/bin/mysqld:  
(BShutdown Complete
(B
(B030623 10:10:52 mysqld ended
(B 
(B-
(B
(B3. At last I tried to REINSTALL MySQL from the scratch. I used the  
(B"update" instructions. But there is still NO CHANGE. I get the same  
(Berror.
(B03[psg:/usr/local/mysql] psgarcha% 030623 10:12:40 mysqld ended
(B
(B 
(B-
(B
(B
(BPlease help me.. I am going crazy !!
(B
(B
(BThank you again.
(B--Pushpinder
(B
(B
(BOn Friday, June 20, 2003, at 08:55 PM, Nils Valentin wrote:
(B
(B Somehow the Index of the mysql.user table is crashed.
(B
(B mysql is a database within the MYSQL RDBMS that stores the user  
(B accounts,
(B passwords, user rights (privileges).
(B
(B And somehow you managed to mess up the most important table.
(B
(B There are 6 tables within the privilege system (mysql database)
(B
(B user
(B host
(B db
(B tables_priv
(B columns_priv
(B func
(B
(B The table user contains the username, hostname and the password etc...
(B
(B If any of these tables ( but especially the user table) are messed up  
(B than
(B MySQL doesnt startup and even if it would you could not login as the  
(B user
(B table is unreadable at present.
(B
(B The quick way is to reinstall MySQL. You could try to copy the whole  
(B folder
(B were the privilege database "mysql" is stored from another machine (if  
(B you
(B have one).
(B
(B Best regards
(B
(B Nils Valentin
(B Tokyo/Japan
(B
(B
(B 2003$BG/(J 6$B7n(J 21$BF|(J $BEZMKF|(J 04:25$B!"(JPushpinder Singh Garcha 
(B $B$5$s$O=q$-$^$7$?(J:
(B hello all,
(B
(B i hve been getting the 'mysql ended' error for over a wek now.when i
(B look into the log file this is what I get
(B
(B This is from the error logs
(B
(B 030619 17:09:04 mysqld ended
(B
(B 030620 13:14:06 mysqld started
(B 030620 13:14:09 InnoDB: Started
(B 030620 13:14:09 Fatal error: Can't open privilege tables: Can't open
(B file: 'user.MYI'. (errno: 145)
(B 030620 13:14:09 Aborting
(B
(B 030620 13:14:09 InnoDB: Starting shutdown...
(B 030620 13:14:11 InnoDB: Shutdown completed
(B 030620 13:14:11
(B /usr/local/mysql-standard-4.0.12-apple-darwin6.4-powerpc/bin/mysqld:
(B Shutdown Complete
(B
(B 030620 13:14:11 mysqld ended
(B
(B
(B Please offer some insight into what migh tbe going on. I have tried to
(B re-initialize the DB , but Nothing chnaged!
(B
(B Thanks
(B -Pushpinder
(B
(B -- 
(B ---
(B Valentin Nils
(B Internet Technology
(B
(B  E-Mail: [EMAIL PROTECTED]
(B  URL: http://www.knowd.co.jp
(B  Personal URL: http://www.knowd.co.jp/staff/nils
(B
(B
(B-- 
(BMySQL General Mailing List
(BFor list archives: http://lists.mysql.com/mysql
(BTo unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysql ended error

2003-06-23 Thread Pushpinder Singh Garcha
Thanks Victor,
(B
(BWhat can I do now ?... I do not care about the data because this is  
(Bjust on the testing server and the development server is unaffected.  
(BHowever I need to have the MySQL Server up and running.
(B
(BThanks in advance
(B--Pushpinder
(B
(B
(B
(Bkindly suggest what shoud be my next course of action.
(BOn Monday, June 23, 2003, at 10:47 AM, Victor Pendleton wrote:
(B
(B Your grant tables are either corrupted or damaged. Error 145 indicates  
(B this.
(B
(B -Original Message-
(B From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
(B Sent: Monday, June 23, 2003 9:43 AM
(B To: Nils Valentin
(B Cc: [EMAIL PROTECTED]
(B Subject: Re: mysql ended error
(B
(B
(B Thanks Nils,
(B
(B   I had been having an terrible experience starting up MySQL. I used to
(B get this error Can't connect to local MySQL server through socket
(B '/tmp/mysql.sock' (2)
(B
(B I have tried the following:
(B
(B 1. Manually start the server using sudo ./bin/mysqld_safe 
(B
(B the result was :
(B
(B [psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases
(B from /usr/local/mysql/data
(B 030623 10:12:40 mysqld ended
(B [1] Done sudo ./bin/mysqld_safe
(B [psg:/usr/local/mysql] psgarcha%
(B
(B --- 
(B -
(B -
(B
(B 2. Next I tried to reinitialize the MySQL using the intructions given
(B on www.entropy.ch , but even that did not help.
(B
(B My error log file has this in it :
(B
(B 030623 10:10:48 mysqld started
(B 030623 10:10:50 InnoDB: Started
(B 030623 10:10:50 Fatal error: Can't open privilege tables: Can't open
(B file: 'user.MYI'. (errno: 145)
(B 030623 10:10:50 Aborting
(B
(B 030623 10:10:50 InnoDB: Starting shutdown...
(B 030623 10:10:52 InnoDB: Shutdown completed 030623 10:10:52
(B /usr/local/mysql-standard-4.0.13-apple-darwin6.4-powerpc/bin/mysqld:
(B Shutdown Complete
(B
(B 030623 10:10:52 mysqld ended
(B --- 
(B -
(B -
(B
(B 3. At last I tried to REINSTALL MySQL from the scratch. I used the
(B "update" instructions. But there is still NO CHANGE. I get the same
(B error.
(B 03[psg:/usr/local/mysql] psgarcha% 030623 10:12:40 mysqld ended
(B
(B --- 
(B -
(B -
(B
(B
(B Please help me.. I am going crazy !!
(B
(B
(B Thank you again.
(B --Pushpinder
(B
(B
(B On Friday, June 20, 2003, at 08:55 PM, Nils Valentin wrote:
(B
(B Somehow the Index of the mysql.user table is crashed.
(B
(B mysql is a database within the MYSQL RDBMS that stores the user
(B accounts,
(B passwords, user rights (privileges).
(B
(B And somehow you managed to mess up the most important table.
(B
(B There are 6 tables within the privilege system (mysql database)
(B
(B user
(B host
(B db
(B tables_priv
(B columns_priv
(B func
(B
(B The table user contains the username, hostname and the password etc...
(B
(B If any of these tables ( but especially the user table) are messed up
(B than
(B MySQL doesnt startup and even if it would you could not login as the
(B user
(B table is unreadable at present.
(B
(B The quick way is to reinstall MySQL. You could try to copy the whole
(B folder
(B were the privilege database "mysql" is stored from another machine (if
(B you
(B have one).
(B
(B Best regards
(B
(B Nils Valentin
(B Tokyo/Japan
(B
(B
(B 2003$BG/(B 6$B7n(B 21$BF|(B $BEZMKF|(B 04:25$B!"(BPushpinder Singh Garcha $B$5$s$O=q$-$^$7$?(B:
(B hello all,
(B
(B i hve been getting the 'mysql ended' error for over a wek now.when i
(B look into the log file this is what I get
(B
(B This is from the error logs
(B
(B 030619 17:09:04 mysqld ended
(B
(B 030620 13:14:06 mysqld started
(B 030620 13:14:09 InnoDB: Started
(B 030620 13:14:09 Fatal error: Can't open privilege tables: Can't open
(B file: 'user.MYI'. (errno: 145)
(B 030620 13:14:09 Aborting
(B
(B 030620 13:14:09 InnoDB: Starting shutdown...
(B 030620 13:14:11 InnoDB: Shutdown completed
(B 030620 13:14:11
(B /usr/local/mysql-standard-4.0.12-apple-darwin6.4-powerpc/bin/mysqld:
(B Shutdown Complete
(B
(B 030620 13:14:11 mysqld ended
(B
(B
(B Please offer some insight into what migh tbe going on. I have tried  
(B to
(B re-initialize the DB , but Nothing chnaged!
(B
(B Thanks
(B -Pushpinder
(B
(B -- 
(B ---
(B Valentin Nils
(B Internet Technology
(B
(B  E-Mail: [EMAIL PROTECTED]
(B  URL: http://www.knowd.co.jp
(B  Personal URL: http://www.knowd.co.jp/staff/nils
(B
(B

RE: varchar restriction

2003-06-23 Thread Mike Hillyer
If I have table A with a varchar and table B with a varchar, any
modification I make to A will have NO EFFECT WHATSOEVER on table B, and
vice-versa. If I want to change the varchar in table A and in table B, I
will have to make the change to each one separately and explicitly.

Does that make it more clear?

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Efficient E [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 8:50 AM
 To: Mike Hillyer; [EMAIL PROTECTED]; MySQL-Lista
 Subject: RE: varchar restriction
 
 
 not sure I understand your relpy Mike
 
 do you mean it will effect the other table so I will have to 
 chnage it.
 
 Andrew
 
 -Original Message-
 From: Mike Hillyer [mailto:[EMAIL PROTECTED]
 Sent: 23 June 2003 15:04
 To: [EMAIL PROTECTED]; MySQL-Lista
 Subject: RE: varchar restriction
 
 
 It will not. If such a change is desirable, you will have to make the
 change in the related table as well.
 
 Regards,
 Mike Hillyer
 www.vbmysql.com
 
 
  -Original Message-
  From: Andrew [mailto:[EMAIL PROTECTED] 
  Sent: Monday, June 23, 2003 7:57 AM
  To: MySQL-Lista
  Subject: varchar restriction
  
  
  Hi MySQL gurus
  
  If I chnage a varchar in one table will it effect another 
  related column in
  another table?
  
  Andrew
  
  
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/mysql? [EMAIL PROTECTED]
  
  
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 
 
 ---
 Incoming mail is 
 certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 
 

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



RE: mysql ended error

2003-06-23 Thread Victor Pendleton
If this is on a development machine I would suggest completely removing what
(Byou have installed so far, downloading the latest version for your OS, you
(Bshould probably stick with the rpm and or binary, and reinstall MySQL.
(B
(B-Original Message-
(BFrom: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
(BSent: Monday, June 23, 2003 9:49 AM
(BTo: Victor Pendleton
(BCc: Nils Valentin; [EMAIL PROTECTED]
(BSubject: Re: mysql ended error
(B
(B
(B
(BThanks Victor, 
(B
(B
(BWhat can I do now ?... I do not care about the data because this is just on
(Bthe testing server and the development server is unaffected. However I need
(Bto have the MySQL Server up and running. 
(B
(B
(BThanks in advance 
(B
(B--Pushpinder 
(B
(B
(B
(B
(Bkindly suggest what shoud be my next course of action. 
(B
(BOn Monday, June 23, 2003, at 10:47 AM, Victor Pendleton wrote: 
(B
(B
(BYour grant tables are either corrupted or damaged. Error 145 indicates this.
(B
(B
(B
(B-Original Message- 
(B
(BFrom: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED] 
(B
(BSent: Monday, June 23, 2003 9:43 AM 
(B
(BTo: Nils Valentin 
(B
(BCc: [EMAIL PROTECTED] 
(B
(BSubject: Re: mysql ended error 
(B
(B
(B
(BThanks Nils, 
(B
(B
(BI had been having an terrible experience starting up MySQL. I used to 
(B
(Bget this error Can't connect to local MySQL server through socket 
(B
(B'/tmp/mysql.sock' (2) 
(B
(B
(BI have tried the following: 
(B
(B
(B1. Manually start the server using sudo ./bin/mysqld_safe  
(B
(B
(Bthe result was : 
(B
(B
(B[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases 
(B
(Bfrom /usr/local/mysql/data 
(B
(B030623 10:12:40 mysqld ended 
(B
(B[1] Done sudo ./bin/mysqld_safe 
(B
(B[psg:/usr/local/mysql] psgarcha% 
(B
(B
(B 
(B
(B- 
(B
(B
(B2. Next I tried to reinitialize the MySQL using the intructions given 
(B
(Bon www.entropy.ch , but even that did not help. 
(B
(B
(BMy error log file has this in it : 
(B
(B
(B030623 10:10:48 mysqld started 
(B
(B030623 10:10:50 InnoDB: Started 
(B
(B030623 10:10:50 Fatal error: Can't open privilege tables: Can't open 
(B
(Bfile: 'user.MYI'. (errno: 145) 
(B
(B030623 10:10:50 Aborting 
(B
(B
(B030623 10:10:50 InnoDB: Starting shutdown... 
(B
(B030623 10:10:52 InnoDB: Shutdown completed 030623 10:10:52 
(B
(B/usr/local/mysql-standard-4.0.13-apple-darwin6.4-powerpc/bin/mysqld: 
(B
(BShutdown Complete 
(B
(B
(B030623 10:10:52 mysqld ended 
(B
(B 
(B
(B- 
(B
(B
(B3. At last I tried to REINSTALL MySQL from the scratch. I used the 
(B
(B"update" instructions. But there is still NO CHANGE. I get the same 
(B
(Berror. 
(B
(B03[psg:/usr/local/mysql] psgarcha% 030623 10:12:40 mysqld ended 
(B
(B
(B 
(B
(B- 
(B
(B
(B
(BPlease help me.. I am going crazy !! 
(B
(B
(B
(BThank you again. 
(B
(B--Pushpinder 
(B
(B
(B
(BOn Friday, June 20, 2003, at 08:55 PM, Nils Valentin wrote: 
(B
(B
(BSomehow the Index of the mysql.user table is crashed. 
(B
(B
(Bmysql is a database within the MYSQL RDBMS that stores the user 
(B
(Baccounts, 
(B
(Bpasswords, user rights (privileges). 
(B
(B
(BAnd somehow you managed to mess up the most important table. 
(B
(B
(BThere are 6 tables within the privilege system (mysql database) 
(B
(B
(Buser 
(B
(Bhost 
(B
(Bdb 
(B
(Btables_priv 
(B
(Bcolumns_priv 
(B
(Bfunc 
(B
(B
(BThe table user contains the username, hostname and the password etc... 
(B
(B
(BIf any of these tables ( but especially the user table) are messed up 
(B
(Bthan 
(B
(BMySQL doesnt startup and even if it would you could not login as the 
(B
(Buser 
(B
(Btable is unreadable at present. 
(B
(B
(BThe quick way is to reinstall MySQL. You could try to copy the whole 
(B
(Bfolder 
(B
(Bwere the privilege database "mysql" is stored from another machine (if 
(B
(Byou 
(B
(Bhave one). 
(B
(B
(BBest regards 
(B
(B
(BNils Valentin 
(B
(BTokyo/Japan 
(B
(B
(B
(B2003$BG/(J 6$B7n(J 21$BF|(J $BEZMKF|(J 04:25$B!"(JPushpinder Singh Garcha 
$B$5$s$O=q$-$^$7$?(J: 
(B
(Bhello all, 
(B
(B
(Bi hve been getting the 'mysql ended' error for over a wek now.when i 
(B
(Blook into the log file this is what I get 
(B
(B
(BThis is from the error logs 
(B
(B
(B030619 17:09:04 mysqld ended 
(B
(B
(B030620 13:14:06 mysqld started 
(B
(B030620 13:14:09 InnoDB: Started 
(B
(B030620 13:14:09 Fatal error: Can't open privilege tables: Can't open 
(B
(Bfile: 'user.MYI'. (errno: 145) 
(B
(B030620 13:14:09 Aborting 
(B
(B
(B030620 13:14:09 InnoDB: Starting shutdown... 
(B
(B030620 13:14:11 InnoDB: Shutdown completed 
(B

Replacing text on query..

2003-06-23 Thread Nick Stuart
Hello all. I was wandering if it was possible to do a general
replacement of text on a query. What I want to do is for any fields that
equal 'false' to be replaced with 0 and any fields that equal 'true' be
replaced with 1.

Now I know you can do if statements, but I have a whole bunch of fields
and don't really want to go down the route on all of the fields. But if
I have to I will.

Thanks for the advice!
-Nick


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



Re: XML in MySQL

2003-06-23 Thread Michael T. Babcock
Jeremy Zawodny wrote:

SOAP is one thing.  But what about storing XML documents in the DB
(with validation on the way in) and querying them using XPath?  Oracle
does that.  MySQL does not.
 

And off-topic from the original question but to repeat myself from 
before, using XML and MySQL together isn't that difficult in most 
situations you may encounter.  A little wrapping to be sure, but 
validating parsers are easy to get your hands on and designing an 
expat-based parser that knows your schema (XML  DB) for translation 
isn't a big chore for most data types I've come across.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock


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


RE: mysql ended error

2003-06-23 Thread Victor Pendleton
Your grant tables in their current state are unusable. You need to either
(Bimport or download a `fresh` copy of the mysql database directory
(B
(B-Original Message-
(BFrom: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
(BSent: Monday, June 23, 2003 9:59 AM
(BTo: Victor Pendleton
(BSubject: Re: mysql ended error
(B
(B
(B
(BI have tried to re-initialize MySQL on Mac OS X Jaguar using : 
(B
(B
(B1. sudo rm -rf /usr/local/mysql/data/* 
(B
(B2. sudo hostname 127.0.0.1 
(B
(B3. cd /usr/local/mysql 
(B
(B4. sudo ./scripts/mysql_install_db 
(B
(B5. sudo chown -R mysql data/ 
(B
(B
(B
(BBUT that did not help. 
(B
(B
(B
(B
(BI then installed MySQL all over again, from MySQL.com using the instructions
(Bgiven on Marc Liyange's Site www.entropy.ch , still nothing worked. I get
(Bthe same error 
(B
(B
(B030623 10:12:40 mysqld ended 
(B
(B
(BPlease help... is there anyway to Un-Install MySQL from Mac OS X Jaguar ? 
(B
(B
(BPlease help.! 
(B
(B
(B--Pushpinder 
(B
(B
(B
(B
(B
(B
(BOn Monday, June 23, 2003, at 10:53 AM, Victor Pendleton wrote: 
(B
(B
(BIf this is on a development machine I would suggest completely removing what
(Byou have installed so far, downloading the latest version for your OS, you
(Bshould probably stick with the rpm and or binary, and reinstall MySQL. 
(B
(B
(B-Original Message- 
(B
(BFrom: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED] 
(B
(BSent: Monday, June 23, 2003 9:49 AM 
(B
(BTo: Victor Pendleton 
(B
(BCc: Nils Valentin; [EMAIL PROTECTED] 
(B
(BSubject: Re: mysql ended error 
(B
(B
(BThanks Victor, 
(B
(B
(B
(BWhat can I do now ?... I do not care about the data because this is just on
(Bthe testing server and the development server is unaffected. However I need
(Bto have the MySQL Server up and running. 
(B
(B
(B
(BThanks in advance 
(B
(B
(B--Pushpinder 
(B
(B
(B
(B
(B
(Bkindly suggest what shoud be my next course of action. 
(B
(B
(BOn Monday, June 23, 2003, at 10:47 AM, Victor Pendleton wrote: 
(B
(B
(B
(BYour grant tables are either corrupted or damaged. Error 145 indicates this.
(B
(B
(B
(B
(B-Original Message- 
(B
(B
(BFrom: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED] 
(B
(B
(BSent: Monday, June 23, 2003 9:43 AM 
(B
(B
(BTo: Nils Valentin 
(B
(B
(BCc: [EMAIL PROTECTED] 
(B
(B
(BSubject: Re: mysql ended error 
(B
(B
(B
(B
(BThanks Nils, 
(B
(B
(B
(BI had been having an terrible experience starting up MySQL. I used to 
(B
(B
(Bget this error Can't connect to local MySQL server through socket 
(B
(B
(B'/tmp/mysql.sock' (2) 
(B
(B
(B
(BI have tried the following: 
(B
(B
(B
(B1. Manually start the server using sudo ./bin/mysqld_safe  
(B
(B
(B
(Bthe result was : 
(B
(B
(B
(B[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases 
(B
(B
(Bfrom /usr/local/mysql/data 
(B
(B
(B030623 10:12:40 mysqld ended 
(B
(B
(B[1] Done sudo ./bin/mysqld_safe 
(B
(B
(B[psg:/usr/local/mysql] psgarcha% 
(B
(B
(B
(B 
(B
(B
(B- 
(B
(B
(B
(B2. Next I tried to reinitialize the MySQL using the intructions given 
(B
(B
(Bon www.entropy.ch , but even that did not help. 
(B
(B
(B
(BMy error log file has this in it : 
(B
(B
(B
(B030623 10:10:48 mysqld started 
(B
(B
(B030623 10:10:50 InnoDB: Started 
(B
(B
(B030623 10:10:50 Fatal error: Can't open privilege tables: Can't open 
(B
(B
(Bfile: 'user.MYI'. (errno: 145) 
(B
(B
(B030623 10:10:50 Aborting 
(B
(B
(B
(B030623 10:10:50 InnoDB: Starting shutdown... 
(B
(B
(B030623 10:10:52 InnoDB: Shutdown completed 030623 10:10:52 
(B
(B
(B/usr/local/mysql-standard-4.0.13-apple-darwin6.4-powerpc/bin/mysqld: 
(B
(B
(BShutdown Complete 
(B
(B
(B
(B030623 10:10:52 mysqld ended 
(B
(B
(B 
(B
(B
(B- 
(B
(B
(B
(B3. At last I tried to REINSTALL MySQL from the scratch. I used the 
(B
(B
(B"update" instructions. But there is still NO CHANGE. I get the same 
(B
(B
(Berror. 
(B
(B
(B03[psg:/usr/local/mysql] psgarcha% 030623 10:12:40 mysqld ended 
(B
(B
(B
(B 
(B
(B
(B- 
(B
(B
(B
(B
(BPlease help me.. I am going crazy !! 
(B
(B
(B
(B
(BThank you again. 
(B
(B
(B--Pushpinder 
(B
(B
(B
(B
(BOn Friday, June 20, 2003, at 08:55 PM, Nils Valentin wrote: 
(B
(B
(B
(BSomehow the Index of the mysql.user table is crashed. 
(B
(B
(B
(Bmysql is a database within the MYSQL RDBMS that stores the user 
(B
(B
(Baccounts, 
(B
(B
(Bpasswords, user rights (privileges). 
(B
(B
(B
(BAnd somehow you managed to mess up the most important table. 
(B
(B
(B
(BThere are 6 tables within the privilege system (mysql database) 
(B
(B

RE: Replacing text on query..

2003-06-23 Thread Mike Hillyer
Take a look at the REPLACE() function:
http://www.mysql.com/doc/en/String_functions.html#IDX1202

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Nick Stuart [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 8:58 AM
 To: MySQL List
 Subject: Replacing text on query..
 
 
 Hello all. I was wandering if it was possible to do a general
 replacement of text on a query. What I want to do is for any 
 fields that
 equal 'false' to be replaced with 0 and any fields that equal 
 'true' be
 replaced with 1.
 
 Now I know you can do if statements, but I have a whole bunch 
 of fields
 and don't really want to go down the route on all of the 
 fields. But if
 I have to I will.
 
 Thanks for the advice!
 -Nick
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

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



Re: mysql ended error

2003-06-23 Thread gerald_clark
Did you run myisamchk on user.MYI as I suggested last week?
(B
(BPushpinder Singh Garcha wrote:
(B
(B Thanks Nils,
(B
(B I had been having an terrible experience starting up MySQL. I used to
(B get this error Can't connect to local MySQL server through socket
(B '/tmp/mysql.sock' (2)
(B
(B I have tried the following:
(B
(B 1. Manually start the server using sudo ./bin/mysqld_safe 
(B
(B the result was :
(B
(B [psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases
(B from /usr/local/mysql/data
(B 030623 10:12:40 mysqld ended
(B [1] Done sudo ./bin/mysqld_safe
(B [psg:/usr/local/mysql] psgarcha%
(B
(B 
(B -
(B
(B 2. Next I tried to reinitialize the MySQL using the intructions given
(B on www.entropy.ch , but even that did not help.
(B
(B My error log file has this in it :
(B
(B 030623 10:10:48 mysqld started
(B 030623 10:10:50 InnoDB: Started
(B 030623 10:10:50 Fatal error: Can't open privilege tables: Can't open
(B file: 'user.MYI'. (errno: 145)
(B 030623 10:10:50 Aborting
(B
(B 030623 10:10:50 InnoDB: Starting shutdown...
(B 030623 10:10:52 InnoDB: Shutdown completed 030623 10:10:52
(B /usr/local/mysql-standard-4.0.13-apple-darwin6.4-powerpc/bin/mysqld:
(B Shutdown Complete
(B
(B 030623 10:10:52 mysqld ended
(B 
(B -
(B
(B 3. At last I tried to REINSTALL MySQL from the scratch. I used the
(B "update" instructions. But there is still NO CHANGE. I get the same
(B error.
(B 03[psg:/usr/local/mysql] psgarcha% 030623 10:12:40 mysqld ended
(B
(B 
(B -
(B
(B
(B Please help me.. I am going crazy !!
(B
(B
(B Thank you again.
(B --Pushpinder
(B
(B
(B On Friday, June 20, 2003, at 08:55 PM, Nils Valentin wrote:
(B
(B Somehow the Index of the mysql.user table is crashed.
(B
(B mysql is a database within the MYSQL RDBMS that stores the user
(B accounts,
(B passwords, user rights (privileges).
(B
(B And somehow you managed to mess up the most important table.
(B
(B There are 6 tables within the privilege system (mysql database)
(B
(B user
(B host
(B db
(B tables_priv
(B columns_priv
(B func
(B
(B The table user contains the username, hostname and the password etc...
(B
(B If any of these tables ( but especially the user table) are messed up
(B than
(B MySQL doesnt startup and even if it would you could not login as the
(B user
(B table is unreadable at present.
(B
(B The quick way is to reinstall MySQL. You could try to copy the whole
(B folder
(B were the privilege database "mysql" is stored from another machine
(B (if you
(B have one).
(B
(B Best regards
(B
(B Nils Valentin
(B Tokyo/Japan
(B
(B
(B 2003$BG/(B 6$B7n(B 21$BF|(B $BEZMKF|(B 04:25$B!"(BPushpinder Singh Garcha 
(B $B$5$s$O=q$-$^$7$?(B:
(B
(B hello all,
(B
(B i hve been getting the 'mysql ended' error for over a wek now.when i
(B look into the log file this is what I get
(B
(B This is from the error logs
(B
(B 030619 17:09:04 mysqld ended
(B
(B 030620 13:14:06 mysqld started
(B 030620 13:14:09 InnoDB: Started
(B 030620 13:14:09 Fatal error: Can't open privilege tables: Can't open
(B file: 'user.MYI'. (errno: 145)
(B 030620 13:14:09 Aborting
(B
(B 030620 13:14:09 InnoDB: Starting shutdown...
(B 030620 13:14:11 InnoDB: Shutdown completed
(B 030620 13:14:11
(B /usr/local/mysql-standard-4.0.12-apple-darwin6.4-powerpc/bin/mysqld:
(B Shutdown Complete
(B
(B 030620 13:14:11 mysqld ended
(B
(B
(B Please offer some insight into what migh tbe going on. I have tried to
(B re-initialize the DB , but Nothing chnaged!
(B
(B Thanks
(B -Pushpinder
(B
(B
(B -- 
(B ---
(B Valentin Nils
(B Internet Technology
(B
(B E-Mail: [EMAIL PROTECTED]
(B URL: http://www.knowd.co.jp
(B Personal URL: http://www.knowd.co.jp/staff/nils
(B
(B
(B
(B
(B
(B-- 
(BMySQL General Mailing List
(BFor list archives: http://lists.mysql.com/mysql
(BTo unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

update to 4.0 mySQL question

2003-06-23 Thread Susan Ator
I have updated mySQL to the 4.0.13-standard and had no problems UNTIL I
attempted to run mysql_fix_privileges. This is the error I get:

ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)

/tmp is:
drwxrwxrwt6 root root 4096 Jun 23 11:21 tmp

and mysql.sock is ACTUALLY located in /var/lib/mysql.

Where do I need to look to change the location from /tmp to /var/lib/mysql
for this particular file?

susan

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



RE: varchar restriction

2003-06-23 Thread Andrew
ok ok I get it what you are saying if I change a tables attributes from varchar
on one table it wont chnage another tables varchars attributes AND WHY THE FUCK
WOULD I EXPECT IT TO!,

what I am asking is it necessary to make chnages to the other table.

-Original Message-
From: Mike Hillyer [mailto:[EMAIL PROTECTED]
Sent: 23 June 2003 15:50
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; MySQL-Lista
Subject: RE: varchar restriction


If I have table A with a varchar and table B with a varchar, any
modification I make to A will have NO EFFECT WHATSOEVER on table B, and
vice-versa. If I want to change the varchar in table A and in table B, I
will have to make the change to each one separately and explicitly.

Does that make it more clear?

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Efficient E [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 23, 2003 8:50 AM
 To: Mike Hillyer; [EMAIL PROTECTED]; MySQL-Lista
 Subject: RE: varchar restriction


 not sure I understand your relpy Mike

 do you mean it will effect the other table so I will have to
 chnage it.

 Andrew

 -Original Message-
 From: Mike Hillyer [mailto:[EMAIL PROTECTED]
 Sent: 23 June 2003 15:04
 To: [EMAIL PROTECTED]; MySQL-Lista
 Subject: RE: varchar restriction
 
 
 It will not. If such a change is desirable, you will have to make the
 change in the related table as well.
 
 Regards,
 Mike Hillyer
 www.vbmysql.com
 
 
  -Original Message-
  From: Andrew [mailto:[EMAIL PROTECTED]
  Sent: Monday, June 23, 2003 7:57 AM
  To: MySQL-Lista
  Subject: varchar restriction
 
 
  Hi MySQL gurus
 
  If I chnage a varchar in one table will it effect another
  related column in
  another table?
 
  Andrew
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 

 
 ---
 Incoming mail is
 certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 


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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003



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



RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
OK so now I have something like this:

SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID, 
penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id

FROM useronline, penpals_privmsgs_block left join penpals_fav on 
penpals_privmsgs_block.user_id

WHERE penpals_fav.fav_user_name = useronline.uname AND penpals_fav.user_id = 
$colname AND penpals_privmsgs_block.blocked_id IS NULL


only this brings back nothing as when I remove the AND 
penpals_privmsgs_block.blocked_id IS NULL statement it results all the 
people online, but the penpals_privmsgs_block.blocked_id always equals 1 
(the value I'm looking for on the blocked user only)for every record and 
none are null, which is in fact not the case.

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



RE: varchar restriction

2003-06-23 Thread Mike Hillyer
Perhaps you better watch your language and better explain your question
because if I did not answer your question than I do not know what you
are asking.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: Andrew [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 9:24 AM
 To: Mike Hillyer; [EMAIL PROTECTED]; MySQL-Lista
 Subject: RE: varchar restriction
 
 
 ok ok I get it what you are saying if I change a tables 
 attributes from varchar
 on one table it wont chnage another tables varchars 
 attributes AND WHY THE FUCK
 WOULD I EXPECT IT TO!,
 
 what I am asking is it necessary to make chnages to the other table.
 
 -Original Message-
 From: Mike Hillyer [mailto:[EMAIL PROTECTED]
 Sent: 23 June 2003 15:50
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; MySQL-Lista
 Subject: RE: varchar restriction
 
 
 If I have table A with a varchar and table B with a varchar, any
 modification I make to A will have NO EFFECT WHATSOEVER on 
 table B, and
 vice-versa. If I want to change the varchar in table A and 
 in table B, I
 will have to make the change to each one separately and explicitly.
 
 Does that make it more clear?
 
 Regards,
 Mike Hillyer
 www.vbmysql.com
 
 
  -Original Message-
  From: Efficient E [mailto:[EMAIL PROTECTED]
  Sent: Monday, June 23, 2003 8:50 AM
  To: Mike Hillyer; [EMAIL PROTECTED]; MySQL-Lista
  Subject: RE: varchar restriction
 
 
  not sure I understand your relpy Mike
 
  do you mean it will effect the other table so I will have to
  chnage it.
 
  Andrew
 
  -Original Message-
  From: Mike Hillyer [mailto:[EMAIL PROTECTED]
  Sent: 23 June 2003 15:04
  To: [EMAIL PROTECTED]; MySQL-Lista
  Subject: RE: varchar restriction
  
  
  It will not. If such a change is desirable, you will have 
 to make the
  change in the related table as well.
  
  Regards,
  Mike Hillyer
  www.vbmysql.com
  
  
   -Original Message-
   From: Andrew [mailto:[EMAIL PROTECTED]
   Sent: Monday, June 23, 2003 7:57 AM
   To: MySQL-Lista
   Subject: varchar restriction
  
  
   Hi MySQL gurus
  
   If I chnage a varchar in one table will it effect another
   related column in
   another table?
  
   Andrew
  
  
   --
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:
   http://lists.mysql.com/mysql? [EMAIL PROTECTED]
  
  
  
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/mysql? [EMAIL PROTECTED]
  
 
  
  ---
  Incoming mail is
  certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
  
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 
 
 ---
 Incoming mail is 
 certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 
 
 

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



RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread Mike Hillyer
Well, the following line does not join the
penpals_privmsgs_block.user_id to anything:

penpals_privmsgs_block left join penpals_fav on
penpals_privmsgs_block.user_id

Anyhow, by LEFT JOINing the block table to the penpals_fav table you are
saying you want one row for every row in the block table, with entries
in the fav table when they can be linked, and NULL otherwise. I think
you want the order of the tables reversed: 

penpals_fav LEFT JOIN penpals_privmsgs_block ON penpals_fav.user_id =
pempals_privmsgs_block.user_id

That way you get one row for each row in penpals_fav, with either the
block information form the block table, or NULL. The try putting the 

AND penpals_privmsgs_block.blocked_id IS NULL

line back in?


Regards,
Mike Hillyer
www.vbmysql.com



 -Original Message-
 From: vernon [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 9:26 AM
 To: [EMAIL PROTECTED]
 Subject: RE: SQL query - 3 tables - 3rd one conatins records 
 to not display
 
 
 OK so now I have something like this:
 
 SELECT distinct useronline.uname, penpals_fav.fav_user_id, 
 penpals_fav.ID, 
 penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id
 
 FROM useronline, penpals_privmsgs_block left join penpals_fav on 
 penpals_privmsgs_block.user_id
 
 WHERE penpals_fav.fav_user_name = useronline.uname AND 
 penpals_fav.user_id = 
 $colname AND penpals_privmsgs_block.blocked_id IS NULL
 
 
 only this brings back nothing as when I remove the AND 
 penpals_privmsgs_block.blocked_id IS NULL statement it 
 results all the 
 people online, but the penpals_privmsgs_block.blocked_id 
 always equals 1 
 (the value I'm looking for on the blocked user only)for every 
 record and 
 none are null, which is in fact not the case.
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

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



RE: Replacing text on query..

2003-06-23 Thread Nick Stuart
Thanks for pointing that one out. Unfortunately relplace(table.*, ...)
does not work (syntax error) so I'll stil have to go through each field
individually. This will be two statements per-field which kinda stinks,
but oh well.

Thanks again!
-Nick


On Mon, 2003-06-23 at 11:10, Mike Hillyer wrote:
 Take a look at the REPLACE() function:
 http://www.mysql.com/doc/en/String_functions.html#IDX1202
 
 Regards,
 Mike Hillyer
 www.vbmysql.com
 
 
  -Original Message-
  From: Nick Stuart [mailto:[EMAIL PROTECTED] 
  Sent: Monday, June 23, 2003 8:58 AM
  To: MySQL List
  Subject: Replacing text on query..
  
  
  Hello all. I was wandering if it was possible to do a general
  replacement of text on a query. What I want to do is for any 
  fields that
  equal 'false' to be replaced with 0 and any fields that equal 
  'true' be
  replaced with 1.
  
  Now I know you can do if statements, but I have a whole bunch 
  of fields
  and don't really want to go down the route on all of the 
  fields. But if
  I have to I will.
  
  Thanks for the advice!
  -Nick
  
  
  -- 
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
  http://lists.mysql.com/mysql? [EMAIL PROTECTED]
  
  


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



RE: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
OK so now I have:

SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID, 
penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id

FROM useronline, penpals_fav LEFT JOIN penpals_privmsgs_block ON 
penpals_fav.user_id = penpals_privmsgs_block.user_id 

WHERE penpals_fav.fav_user_name = useronline.uname AND penpals_fav.user_id = 
colname

which comes back with a 1 in every record again and of course when I add 
the AND penpals_privmsgs_block.blocked_id IS NULL it comes up empty as 
every row has a 1 in it.

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



Re: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread gerald_clark
And what happens if you leave off the 'distinct'  ?

vernon wrote:

OK so now I have:

SELECT distinct useronline.uname, penpals_fav.fav_user_id, penpals_fav.ID, 
penpals_privmsgs_block.user_id, penpals_privmsgs_block.blocked_id

FROM useronline, penpals_fav LEFT JOIN penpals_privmsgs_block ON 
penpals_fav.user_id = penpals_privmsgs_block.user_id 

WHERE penpals_fav.fav_user_name = useronline.uname AND penpals_fav.user_id = 
colname

which comes back with a 1 in every record again and of course when I add 
the AND penpals_privmsgs_block.blocked_id IS NULL it comes up empty as 
every row has a 1 in it.

 



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


Re: varchar restriction

2003-06-23 Thread Egor Egorov
Andrew [EMAIL PROTECTED] wrote:
 
 If I chnage a varchar in one table will it effect another related column in
 another table?

Nope.
Take a look at FOREIGN KEY with ON UPDATE CASCADE:
http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [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]



Re: mysql ended error

2003-06-23 Thread Victoria Reznichenko
Pushpinder Singh Garcha [EMAIL PROTECTED] wrote:
 
 What can I do now ?... I do not care about the data because this is  
 just on the testing server and the development server is unaffected.  
 However I need to have the MySQL Server up and running.
 

Repair tables using myisamchk:
http://www.mysql.com/doc/en/Repair.html
http://www.mysql.com/doc/en/myisamchk_repair_options.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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]



Upgraded 3.23 to 4.0: No problems at all.

2003-06-23 Thread Pete Harlan
You guys are great!  Thanks! :)

We compile from source, under Debian, and the transition from 3.23.xx
to 4.0.13 was perfectly seamless.  I've never had an upgrade go more
smoothly.

There are so many messages about bumps on the road when people upgrade
from a vendor's packaged version to another packaged version, but
clearly the problems aren't at the database end of things.  Good work.

Thanks again,

--
Pete Harlan
harlan @artselect.com

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



Re: SQL query - 3 tables - 3rd one conatins records to not display

2003-06-23 Thread vernon
The distinct is needed for usersonline as it holds multiple instanses of the 
user's name, which I only want once. 

To answer your question the user name comes up many times and the 1 still 
exist in ever record of the returned results, which of course is not true.

-- Original Message ---
From: gerald_clark [EMAIL PROTECTED]
To: vernon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Mon, 23 Jun 2003 11:13:53 -0500
Subject: Re: SQL query - 3 tables - 3rd one conatins records to not display

 And what happens if you leave off the 'distinct'  ?


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



Re: varchar restriction

2003-06-23 Thread David Precious

Andrew,

 ok ok I get it what you are saying if I change a tables attributes from
 varchar on one table it wont chnage another tables varchars attributes AND
 WHY THE F**K WOULD I EXPECT IT TO!,

 what I am asking is it necessary to make chnages to the other table.

The answer to your question is:

If you want the change to table A to also happen to table B, then YES, you'll 
need to make the changes to *both* tables - changing the field in table A 
will have *no* effect on table B.

BTW please do mind your language - this is a public forum and there's no need 
for expletives like that, surely you can be a little more eloquent?

Regards

David P




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



Infos about the embedded server dll

2003-06-23 Thread Wavyx
Hello,

I'm looking for informations about the Embedded Server DLL. There's not 
a lot of in the manuel (libmysqld section). Where can I Find the 
available functions? Are they the same as in the C API?
I'm planning to use the dll from C#. Does anyone already try to 
interop with the mysql server engine dll (Pinvoke and DllImport)?

Thanks for help

Wavyx



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


Re: mysql ended error

2003-06-23 Thread Pushpinder Singh Garcha
Is there an mysql directory in /usr/local/mysql/data?
[psg:/usr/local/mysql] psgarcha% sudo ls data
127.0.0.1.errib_logfile1
  psg.local..err
ShwetaParekh-Computer.local..err ibdata1
  psg.local..err.save
ShwetaParekh-Computer.local..pid masterstream   
  test
ib_arch_log_00   mydb
ib_logfile0  mysql

Does mysql own /usr/local/mysql/data?
Yes
[psg:/usr/local/mysql] psgarcha% ls -la
total 11288
drwxr-xr-x  22 root   wheel  748 Jun 23 11:50 .
drwxr-xr-x   6 root   wheel  204 Jun 23 11:50 ..
-rw-r--r--   1 root   wheel19106 May 14 16:50 COPYING
-rw-r--r--   1 root   wheel28003 May 14 16:50 COPYING.LIB
-rw-r--r--   1 root   wheel   181571 May 14 16:24 ChangeLog
-rw-r--r--   1 root   wheel 6802 May 14 16:50 INSTALL-BINARY
-rw-r--r--   1 root   wheel 1937 May 14 16:24 README
drwxr-xr-x  46 root   wheel 1564 Jun 23 09:22 bin
-rwxr-xr-x   1 root   wheel  773 May 14 17:01 configure
drwxr-x---  15 mysql  wheel  510 Jun 23 13:29 data
drwxr-xr-x  51 root   wheel 1734 Jun 23 09:22 include
drwxr-xr-x   8 root   wheel  272 Jun 23 09:22 lib
drwxr-xr-x   3 root   wheel  102 Jun 23 09:22 man
-rw-r--r--   1 root   wheel  2893112 May 14 16:48 manual.html
-rw-r--r--   1 root   wheel  2514300 May 14 16:48 manual.txt
-rw-r--r--   1 root   wheel   115727 May 14 16:48 manual_toc.html
drwxr-xr-x   9 root   wheel  306 Jun 23 09:22 mysql-test
drwxr-xr-x   3 root   wheel  102 Jun 23 09:22 scripts
drwxr-xr-x   3 root   wheel  102 Jun 23 09:22 share
drwxr-xr-x  31 root   wheel 1054 Jun 23 09:22 sql-bench
drwxr-xr-x  12 root   wheel  408 Jun 23 09:22 support-files
drwxr-xr-x  21 root   wheel  714 Jun 23 09:22 tests
Does mysql have r/w privileges on /usr/local/mysql/data?
Yes
[psg:local/mysql/bin] psgarcha% cd /usr/local/mysql/
[psg:/usr/local/mysql] psgarcha%
[psg:/usr/local/mysql] psgarcha% ./scripts/mysql_install_db --force
mkdir: ./data/mysql: Permission denied
chmod: ./data/mysql: Permission denied
mkdir: ./data/test: Permission denied
chmod: ./data/test: Permission denied
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
./bin/mysqld: Can't change dir to '/usr/local/mysql/./data/' (Errcode: 
13)
030623 13:27:37  Aborting

030623 13:27:37  ./bin/mysqld: Shutdown Complete

Installation of grant tables failed!

Examine the logs in ./data for more information.
You can also try to start the mysqld daemon with:
./bin/mysqld --skip-grant 
You can use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:
shell ./bin/mysql -u root mysql
mysql show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running 
mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script!

[psg:/usr/local/mysql] psgarcha% chown -R mysql.mysql data
chown: data: Permission denied
chown: data: Operation not permitted
[psg:/usr/local/mysql] psgarcha% chmod -r 577 data
chmod: 577: No such file or directory
chmod: data: Operation not permitted
[2]Exit 1sudo ./bin/mysqldsafe
[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases 
from /usr/local/mysql/data
030623 13:29:40  mysqld ended

[3]Done  sudo ./bin/mysqld_safe



Thanks again
--Pushpinder


On Monday, June 23, 2003, at 01:22 PM, Santino wrote:

./bin/safemysql 

Can't find file: './mysql/host.frm' (errno: 13)

2003-06-23 Thread Pushpinder Singh Garcha
Hello All,

 I am installing MySQL on my Mac OS Jaguar system. I was having some  
trouble with the starting up my MySQL Server. I kpt getting mysqld  
ended error and my logs showed that file user.MYI was corrupted. So  
I decided to uninstall MySQl and re-install it.

I installed MySQL (mysql-standard-4.0.13-apple-darwin6.4-powerpc) ...  
but now I get this error in the log file and I am unable to still start  
the MySQL Server.

 
-
030623 15:59:05  mysqld started
030623 15:59:05  InnoDB: Started
030623 15:59:05  Fatal error: Can't open privilege tables: Can't find  
file: './mysql/host.frm' (errno: 13)
030623 15:59:05  Aborting

030623 15:59:05  InnoDB: Starting shutdown...
030623 15:59:07  InnoDB: Shutdown completed
030623 15:59:07  /usr/local/mysql/bin/mysqld: Shutdown Complete
 
-

Thanks in advance for any help on this matter.

--Pushpinder



Re: Infos about the embedded server dll

2003-06-23 Thread Derick Smith
The function are in chapter 8.4.5 of the manual.
I tried using the embedded library in C, then calling it from VB through a 
DLL without any luck. The libmysql.dll seems to work better.
Eric

From: Wavyx [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Infos about the embedded server dll
Date: Mon, 23 Jun 2003 18:49:02 +0200
Hello,

I'm looking for informations about the Embedded Server DLL. There's not a 
lot of in the manuel (libmysqld section). Where can I Find the available 
functions? Are they the same as in the C API?
I'm planning to use the dll from C#. Does anyone already try to interop 
with the mysql server engine dll (Pinvoke and DllImport)?

Thanks for help

Wavyx



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

_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


UPDATE and ORDER BY

2003-06-23 Thread martin . curmi
Hi,

Any ideas why I get an error when i use ORDER BY in an UPDATE statement? 
Also is there anywhere i can lookup the error codes?

UPDATE `Subscriptions` SET picks=picks+1 WHERE (username = 'webmaster' AND 
picksdatabasename = 'BetaTestService') ORDER BY subscriptionid ASC 

ADODB.Connection.1 error '80004005' 

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'ORDER BY price 
ASC' at line 1

Thanks in advance.
Martin

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



Re: UPDATE and ORDER BY

2003-06-23 Thread Paul DuBois
At 23:09 +0100 6/23/03, [EMAIL PROTECTED] wrote:
Hi,

Any ideas why I get an error when i use ORDER BY in an UPDATE statement?
Also is there anywhere i can lookup the error codes?
UPDATE `Subscriptions` SET picks=picks+1 WHERE (username = 'webmaster' AND
picksdatabasename = 'BetaTestService') ORDER BY subscriptionid ASC
ADODB.Connection.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'ORDER BY price
ASC' at line 1
Are you using MySQL 3.23? ORDER BY for UPDATE was introduced in 4.0.0.

Thanks in advance.
Martin


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

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


RE: UPDATE and ORDER BY

2003-06-23 Thread wayne
Have you tried it without it? I cannot seen a reason for using it...
With out it all records in subscriptions will be updated with pick+1
where username='webmaster' and dbname. 

Wayne

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 23 June 2003 23:09
To: [EMAIL PROTECTED]
Subject: UPDATE and ORDER BY


Hi,

Any ideas why I get an error when i use ORDER BY in an UPDATE statement?

Also is there anywhere i can lookup the error codes?

UPDATE `Subscriptions` SET picks=picks+1 WHERE (username = 'webmaster'
AND 
picksdatabasename = 'BetaTestService') ORDER BY subscriptionid ASC 

ADODB.Connection.1 error '80004005' 

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'ORDER BY price 
ASC' at line 1

Thanks in advance.
Martin

-- 
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: UPDATE and ORDER BY

2003-06-23 Thread martin . curmi
Hi, I left out the LIMIT 1 in the example I copied... I only want the 
first occurance updated.






wayne [EMAIL PROTECTED]
23/06/2003 23:22

 
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:RE: UPDATE and ORDER BY


Have you tried it without it? I cannot seen a reason for using it...
With out it all records in subscriptions will be updated with pick+1
where username='webmaster' and dbname. 

Wayne

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 23 June 2003 23:09
To: [EMAIL PROTECTED]
Subject: UPDATE and ORDER BY


Hi,

Any ideas why I get an error when i use ORDER BY in an UPDATE statement?

Also is there anywhere i can lookup the error codes?

UPDATE `Subscriptions` SET picks=picks+1 WHERE (username = 'webmaster'
AND 
picksdatabasename = 'BetaTestService') ORDER BY subscriptionid ASC 

ADODB.Connection.1 error '80004005' 

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'ORDER BY price 
ASC' at line 1

Thanks in advance.
Martin

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



multiple mysql instances and virtualhosts

2003-06-23 Thread electroteque
this has prob been bought up many of times but how would it be possible to
setup different mysql source instances for each individual virtualhost on a
machine ?


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



RE: UPDATE and ORDER BY

2003-06-23 Thread Mike Hillyer
Then you do need it, but like Paul said, you need MySQL 4.x, or you need
to run two queries, one to retrieve the row you want to update, and one
to do the update.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 4:21 PM
 To: wayne
 Cc: [EMAIL PROTECTED]
 Subject: RE: UPDATE and ORDER BY
 
 
 Hi, I left out the LIMIT 1 in the example I copied... I only want the 
 first occurance updated.
 
 
 
 
 
 
 wayne [EMAIL PROTECTED]
 23/06/2003 23:22
 
  
 To: [EMAIL PROTECTED]
 cc: [EMAIL PROTECTED]
 Subject:RE: UPDATE and ORDER BY
 
 
 Have you tried it without it? I cannot seen a reason for using it...
 With out it all records in subscriptions will be updated with pick+1
 where username='webmaster' and dbname. 
 
 Wayne
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: 23 June 2003 23:09
 To: [EMAIL PROTECTED]
 Subject: UPDATE and ORDER BY
 
 
 Hi,
 
 Any ideas why I get an error when i use ORDER BY in an UPDATE 
 statement?
 
 Also is there anywhere i can lookup the error codes?
 
 UPDATE `Subscriptions` SET picks=picks+1 WHERE (username = 'webmaster'
 AND 
 picksdatabasename = 'BetaTestService') ORDER BY subscriptionid ASC 
 
 ADODB.Connection.1 error '80004005' 
 
 SQLState: 42000
 Native Error Code: 1064
 [TCX][MyODBC]You have an error in your SQL syntax near 'ORDER 
 BY price 
 ASC' at line 1
 
 Thanks in advance.
 Martin
 
 -- 
 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/mysql? [EMAIL PROTECTED]
 
 

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



RE: multiple mysql instances and virtualhosts

2003-06-23 Thread Mike Hillyer
It is definitely possible, see
http://www.mysql.com/doc/en/Multiple_servers.html

Of course, you could save yourself some trouble and just setup a
separate database on the same instance.

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: electroteque [mailto:[EMAIL PROTECTED] 
 Sent: Monday, June 23, 2003 4:22 PM
 To: Mysql
 Subject: multiple mysql instances and virtualhosts
 
 
 this has prob been bought up many of times but how would it 
 be possible to
 setup different mysql source instances for each individual 
 virtualhost on a
 machine ?
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

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



Re: multiple mysql instances and virtualhosts

2003-06-23 Thread Paul DuBois
At 8:22 +1000 6/24/03, electroteque wrote:
this has prob been bought up many of times but how would it be possible to
setup different mysql source instances for each individual virtualhost on a
machine ?
What do you mean by virtual host here?



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


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

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


Re: 2-way replication..how many slaves?

2003-06-23 Thread Jeremy Zawodny
On Mon, Jun 23, 2003 at 03:19:05AM -0400, M Lists wrote:

 I'm researching a specific network design and have some questions that may
 involve 2-way replication.

Ok...

 I have one master mysql server doing 1 way replication to a large
 number of remotely located slaves.  Each slave serves a number of
 proprietary software clients running inside a private network.
 These proprietary software clients do not have Internet access but
 of course the local slave does.  These proprietary software clients
 enter data into 2 tables on the local slave.  We now have the need
 to get these remote slaves to send the data in these 2 tables back
 to the master and merge it in 2 central tables.

A MySQL slave can only have one master, so this isn't readily doable
with MySQL today.

 The amount of data that needs to be sent back is not terribly large
 and only needs to happen maybe once or twice a day.  What is the
 most logical and efficient way to accomplish this?

I'd consider writing some code that can initate the process of copying
data from server to server.  It'll have to be specific to your
application.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 20 days, processed 646,612,686 queries (362/sec. avg)

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



Stumped on error messages

2003-06-23 Thread Dave Schuppert
I'm new to mysql but not databases or programming. I followed Julie 
Meloni's PHP fast easy to learn the basics. However, now that I am going 
back through the material and trying to make changes,  problems are rising 
that I can't solve.

I am changing a database and changing the user and password of an existing 
database. when I enter the line.

mysql insert into user (host, user, password) values ('localhost', 
'newuser', password ('newpswrd'));

the error 1062: Duplicate entry 'localhost-cbadvert' for key 1
mysql
How do I debug this line to find the error.

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


Re: scaling

2003-06-23 Thread Jeremy Zawodny
On Sat, Jun 28, 2003 at 10:53:48PM -0400, chad pratt wrote:
 
 What are the gotchas with respect to scaling?

Come to OSCON and find out!

  http://conferences.oreillynet.com/cs/os2003/view/e_sess/4502

Sorry.  They ask that speakers promote their talks on a relevant
mailling list if they get a chance.  :-)

 Free form responses and off the top of head thoguhts are most
 welcome!

And shameless plugs?

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 20 days, processed 646,721,644 queries (362/sec. avg)

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



Stumped on error messages -OOPS

2003-06-23 Thread Dave Schuppert
I'm new to mysql but not databases or programming. I followed Julie 
Meloni's PHP fast easy to learn the basics. However, now that I am going 
back through the material and trying to make changes,  problems are rising 
that I can't solve.

I am changing a database and changing the user and password of an existing 
database. when I enter the line.

mysql insert into user (host, user, password) values ('localhost', 
'newuser', password ('newpswrd'));

the error 1062: Duplicate entry 'localhost-newuser' for key 1
mysql
How do I debug this line to find the error. 

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


Archiving tables ranges

2003-06-23 Thread Hubbard, Dan
Passing mysql commands through mysqldump or BACKUP TABLE ?

We would like to perform backups on selective data within selective tables
and then purge the matching data in those tables. Is it possible to pass
mysql commands through either util above ? Which is better ?

Example: sql statement...

select * from tablename1 WHERE ((date_time  '2003-00-00 00:00:00') and
(date_time  '2003-06-31 00:00:00')); 

TIA !









Re: multiple mysql instances and virtualhosts

2003-06-23 Thread daniel
oh dear apologies , i meant virtualhosts in an apache server environment,
as in different sites on the same machine

 At 8:22 +1000 6/24/03, electroteque wrote:
this has prob been bought up many of times but how would it be possible
to setup different mysql source instances for each individual
virtualhost on a machine ?

 What do you mean by virtual host here?



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


 --
 Paul DuBois, Senior Technical Writer
 Madison, Wisconsin, USA
 MySQL AB, www.mysql.com

 Are you MySQL certified?  http://www.mysql.com/certification/




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



RE: Stumped on error messages -OOPS

2003-06-23 Thread Jennifer Goodie
 I am changing a database and changing the user and password of an
 existing
 database. when I enter the line.

 mysql insert into user (host, user, password) values ('localhost',
 'newuser', password ('newpswrd'));

 the error 1062: Duplicate entry 'localhost-newuser' for key 1
 mysql

Since you are changing the password you should be updating not inserting.
The error means you already have an entry for [EMAIL PROTECTED]


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



Simple Question: MySQL and Shell Scripts

2003-06-23 Thread Zach
I am writing a shell script using Born Shell. I am trying to get the result of a SQL 
statement into a variable. 

For example:

/usr/bin/mysql -uroot -prootpass BOB  EOF
SELECT * FROM Bobstable WHERE Name=1
EOF

How do I get the result into a variable?

Thanks in advance!

default value does not set using LOAD DATA INFILE ...

2003-06-23 Thread Ruth Zhai
Hi Everyone,
I am using LOAD DATA INFILE to import some data to MySQL.  I would like to
leave some fields blank and use the default value set in the tables.  I have
spent many hours trying to find the problem, but no luck so far.  According
to the manual, it should work.  I am hoping some one on this list would help
me.  The following is sql query string I used:

LOAD DATA LOCAL INFILE \' file \' REPLACE INTO TABLE table
FIELDS TERMINATED BY \'terminator\' ENCLOSED BY \'\\'

Would someone help me to find what I have done wrong?  Your help is highly
appreciated.

Thanks in advance.

Ruth



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



Re: Archiving tables ranges

2003-06-23 Thread Jeremy Zawodny
On Mon, Jun 23, 2003 at 04:16:51PM -0700, Hubbard, Dan wrote:
 Passing mysql commands through mysqldump or BACKUP TABLE ?
 
 We would like to perform backups on selective data within selective tables
 and then purge the matching data in those tables. Is it possible to pass
 mysql commands through either util above ? Which is better ?
 
 Example: sql statement...
 
 select * from tablename1 WHERE ((date_time  '2003-00-00 00:00:00') and
 (date_time  '2003-06-31 00:00:00')); 

No.

But you can create a new table, copy the data to it, back it up, drop
it, and nuke the old records.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 20 days, processed 647,347,517 queries (361/sec. avg)

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



memory usage

2003-06-23 Thread Miguel Perez
Hi, I have a question about the memory that mysql uses,
Here is the info that top command displays:
7:39pm  up 55 days,  2:51,  1 user,  load average: 0.18, 0.08, 0.02
54 processes: 53 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states:  0.1% user, 10.1% system,  0.0% nice, 89.3% idle
CPU1 states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
CPU2 states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
CPU3 states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
Mem:  3616400K av, 3592084K used,   24316K free,   0K shrd,  193468K 
buff
Swap: 2096440K av,6300K used, 2090140K free 2276512K 
cached

 PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
18538 mysql 15   0  936M 930M  2516 S 0.0 26.3   4:23 mysqld-max
19036 mysql 15   0  936M 930M  2516 S 0.0 26.3   4:51 mysqld-max
19037 mysql 20   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
19038 mysql 16   0  936M 930M  2516 S 0.0 26.3   0:01 mysqld-max
19039 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
19040 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:17 mysqld-max
19181 mysql 17   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
19182 mysql 15   0  936M 930M  2516 S 0.0 26.3   7:59 mysqld-max
19193 mysql 15   0  936M 930M  2516 S 0.0 26.3   1:03 mysqld-max
19196 mysql 15   0  936M 930M  2516 S 0.0 26.3   2:32 mysqld-max
16336 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
28450 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
28451 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
3004 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
7999 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
8161 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
8323 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
8474 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
27353 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
11775 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
30268 mysql 15   0  936M 930M  2516 S 0.0 26.3   0:00 mysqld-max
I don't know if all of these processes consume all my memory.

Here is my.cnf file:

default-table-type=innodb

set-variable = key_buffer=850M
set-variable = table_cache=1500
set-variable = sort_buffer=4M
set-variable = record_buffer=4M
set-variable = myisam_sort_buffer_size=750M
innodb_data_home_dir = /var/lib/mysql
innodb_log_group_home_dir = /var/lib/mysql
innodb_log_arch_dir = /var/lib/mysql
innodb_flush_log_at_trx_commit=1
innodb_log_archive=0
set-variable = innodb_mirrored_log_groups=1
set-variable = innodb_log_files_in_group=3
set-variable = innodb_buffer_pool_size=850M
set-variable = innodb_additional_mem_pool_size=250M
set-variable = innodb_log_file_size=150M
set-variable = innodb_log_buffer_size=8M
set-variable = innodb_file_io_threads=5
set-variable = innodb_lock_wait_timeout=50
Any suggestions?...

Best Regards

_
MSN. Más Útil Cada Día  http://www.msn.es/intmap/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: memory usage

2003-06-23 Thread Jeremy Zawodny
On Mon, Jun 23, 2003 at 07:21:25PM -0500, Miguel Perez wrote:
 
 Hi, I have a question about the memory that mysql uses,
 Here is the info that top command displays:
 
 7:39pm  up 55 days,  2:51,  1 user,  load average: 0.18, 0.08, 0.02
 54 processes: 53 sleeping, 1 running, 0 zombie, 0 stopped
 CPU0 states:  0.1% user, 10.1% system,  0.0% nice, 89.3% idle
 CPU1 states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
 CPU2 states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
 CPU3 states:  0.0% user,  0.0% system,  0.0% nice, 100.0% idle
 Mem:  3616400K av, 3592084K used,   24316K free,   0K shrd,  193468K 
 buff
 Swap: 2096440K av,6300K used, 2090140K free 2276512K 
 cached
 
   PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 18538 mysql 15   0  936M 930M  2516 S 0.0 26.3   4:23 mysqld-max

[snip]

 I don't know if all of these processes consume all my memory.

Clearly not.

Look at the 193468K buff to see that Linux is using some of it to
buffer disk I/O.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 20 days, processed 647,864,137 queries (361/sec. avg)

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



Re: scaling

2003-06-23 Thread chad pratt
thanks for the invite. I am too poor to attend. 

-C

- Original Message - 
From: Jeremy Zawodny [EMAIL PROTECTED]
To: chad pratt [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, June 23, 2003 6:58 PM
Subject: Re: scaling


 On Sat, Jun 28, 2003 at 10:53:48PM -0400, chad pratt wrote:
  
  What are the gotchas with respect to scaling?
 
 Come to OSCON and find out!
 
   http://conferences.oreillynet.com/cs/os2003/view/e_sess/4502
 
 Sorry.  They ask that speakers promote their talks on a relevant
 mailling list if they get a chance.  :-)
 
  Free form responses and off the top of head thoguhts are most
  welcome!
 
 And shameless plugs?
 
 Jeremy
 -- 
 Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
 [EMAIL PROTECTED]  |  http://jeremy.zawodny.com/
 
 MySQL 4.0.13: up 20 days, processed 646,721,644 queries (362/sec. avg)
 



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



Re: scaling

2003-06-23 Thread Jeremy Zawodny
On Mon, Jun 30, 2003 at 11:44:30PM -0400, chad pratt wrote:
 thanks for the invite. I am too poor to attend. 

The slides will all be on-line within a day of the talk, if that's of
any help.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 20 days, processed 647,995,358 queries (361/sec. avg)

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



Re: scaling

2003-06-23 Thread chad pratt
awesome yes I will be an eager consumer. 

-C

- Original Message - 
From: Jeremy Zawodny [EMAIL PROTECTED]
To: chad pratt [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, June 23, 2003 9:01 PM
Subject: Re: scaling


 On Mon, Jun 30, 2003 at 11:44:30PM -0400, chad pratt wrote:
  thanks for the invite. I am too poor to attend. 
 
 The slides will all be on-line within a day of the talk, if that's of
 any help.
 -- 
 Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
 [EMAIL PROTECTED]  |  http://jeremy.zawodny.com/
 
 MySQL 4.0.13: up 20 days, processed 647,995,358 queries (361/sec. avg)
 



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



LONGTEXT size problem?

2003-06-23 Thread Sam Evans
Hello..

I am attempting to insert into my table a huge block of text (talking 
almost a megabyte).  It seems like maybe a quarter of the way through it 
just cuts off with no errors to my import script.

I've changed my max_allowed_packet to 20M as well as my 
net_buffer_length to 8M  in my my.cnf file.

Seems like no matter what I set these two values to, nothing helps.  My 
Column is set to LONGTEXT, but I cannot seem to find anywhere that would 
set the size of the Longtext, and, according to the MySQL documentation 
-- it seems as if the size of this column is dependant upon your max 
allowed packet and buffer size?

Can anyone point me in the right direction?

Thanks,
Sam


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


Quick Question

2003-06-23 Thread Andrew E Filipowski
I am fairly new to MySql, I have a product that is offered from the company
I work for that uses db2, oracle, and SQL Server. Recently I had a customer
ask if we could run on MySQL. I decided to test it out with my mac powerbook
using tomcat and MySQL. The app is loading and some tables are getting
written into the MySQL database. But than an error occurs. The error message
is as follows:

Unable to determine if the SQLServer database is in SQL7 mode

Now I have gotten this message in SQLServer 2000, my question is there a way
to get mysql to run in a mode compatible more with sql server 7? This would
help out development as they are rather busy with new releases. Just curios.
Thanks for the help if any body has any thoughts.

Andrew


Re: mysql ended error

2003-06-23 Thread Nils Valentin
Hi Singh,

I followed the threat carefully, and the more I read the more I believe we are 
looking in the wrong place.

I believe that this is an OS Issue. Uninstall mysql once more. Take whichever 
install method you are most comfortable with (but stick to it :-). check the 
datadir and used linux account VERY carefully before you install anything.

f.e (rpm) /var/lib/mysql 
f.e. (binary) /usr/local/mysql/data

must be owned by the Linux account which mysqld will be using (in most cases 
the name of the account is also mysql)

do this:

chown -R mysql /var/lib/mysql (for rpm)
chown -R mysql /usr/local/mysql/data (for binary)
shell ls -al

drwx--2 mysqlmysqlgrp 4096 Jun  9 08:41 mysql
lrwxrwxrwx1 mysqlmysqlgrp   15 Mar 19 16:51 mysql.sock - 
/tmp/mysql.sock

To be 200% sure you can delete the folder

/var/lib/mysql/mysql
/usr/local/mysql/data/mysql

This will completely remove the folder containing the privilege database 
files.

Next lets see if we have a user account setup for the mysql demon.

do this:

shell cat /etc/group |grep mysql

mysql:x:500:

shell  cat /etc/passwd |grep mysql

mysql:x:60:2:MySQL database admin:/var/lib/mysql:/bin/false

If this account doesnt exist create it !!

Then try to install it again. 

Summary: We checked and setup the useraccount which will be used for mysql.
We also removed the privilege database once more (just in case) to make a 
clean install. 

The privilege database will not be removed even when removing mysql - so 
doesnt matter how often you reinstall it, unless you delete it it wont help 
!!

That should keep your  mysql demon running. There is nothing left anymore - 
except on OS side (user quotes, linux account limitations etc.)

I would be surprised if you dont get this beast into the air ;-)

Let me know the outcome please.

Best regards

Nils Valentin





2003 6 24  02:43Pushpinder Singh Garcha :
 Is there an mysql directory in /usr/local/mysql/data?
 [psg:/usr/local/mysql] psgarcha% sudo ls data
 127.0.0.1.errib_logfile1
psg.local..err
 ShwetaParekh-Computer.local..err ibdata1
psg.local..err.save
 ShwetaParekh-Computer.local..pid masterstream
test
 ib_arch_log_00   mydb
 ib_logfile0  mysql

 Does mysql own /usr/local/mysql/data?
 Yes
 [psg:/usr/local/mysql] psgarcha% ls -la
 total 11288
 drwxr-xr-x  22 root   wheel  748 Jun 23 11:50 .
 drwxr-xr-x   6 root   wheel  204 Jun 23 11:50 ..
 -rw-r--r--   1 root   wheel19106 May 14 16:50 COPYING
 -rw-r--r--   1 root   wheel28003 May 14 16:50 COPYING.LIB
 -rw-r--r--   1 root   wheel   181571 May 14 16:24 ChangeLog
 -rw-r--r--   1 root   wheel 6802 May 14 16:50 INSTALL-BINARY
 -rw-r--r--   1 root   wheel 1937 May 14 16:24 README
 drwxr-xr-x  46 root   wheel 1564 Jun 23 09:22 bin
 -rwxr-xr-x   1 root   wheel  773 May 14 17:01 configure
 drwxr-x---  15 mysql  wheel  510 Jun 23 13:29 data
 drwxr-xr-x  51 root   wheel 1734 Jun 23 09:22 include
 drwxr-xr-x   8 root   wheel  272 Jun 23 09:22 lib
 drwxr-xr-x   3 root   wheel  102 Jun 23 09:22 man
 -rw-r--r--   1 root   wheel  2893112 May 14 16:48 manual.html
 -rw-r--r--   1 root   wheel  2514300 May 14 16:48 manual.txt
 -rw-r--r--   1 root   wheel   115727 May 14 16:48 manual_toc.html
 drwxr-xr-x   9 root   wheel  306 Jun 23 09:22 mysql-test
 drwxr-xr-x   3 root   wheel  102 Jun 23 09:22 scripts
 drwxr-xr-x   3 root   wheel  102 Jun 23 09:22 share
 drwxr-xr-x  31 root   wheel 1054 Jun 23 09:22 sql-bench
 drwxr-xr-x  12 root   wheel  408 Jun 23 09:22 support-files
 drwxr-xr-x  21 root   wheel  714 Jun 23 09:22 tests


 Does mysql have r/w privileges on /usr/local/mysql/data?
 Yes

 [psg:local/mysql/bin] psgarcha% cd /usr/local/mysql/
 [psg:/usr/local/mysql] psgarcha%
 [psg:/usr/local/mysql] psgarcha% ./scripts/mysql_install_db --force
 mkdir: ./data/mysql: Permission denied
 chmod: ./data/mysql: Permission denied
 mkdir: ./data/test: Permission denied
 chmod: ./data/test: Permission denied
 Preparing db table
 Preparing host table
 Preparing user table
 Preparing func table
 Preparing tables_priv table
 Preparing columns_priv table
 Installing all prepared tables
 ./bin/mysqld: Can't change dir to '/usr/local/mysql/./data/' (Errcode:
 13)
 030623 13:27:37  Aborting

 030623 13:27:37  ./bin/mysqld: Shutdown Complete

 Installation of grant tables failed!

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

 shell ./bin/mysql -u root mysql
 mysql show tables

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

 The latest information about MySQL is available on the web at
 http://www.mysql.com
 Please consult the MySQL manual section: 

Getting the unique auto-increment primary key after an insert

2003-06-23 Thread Matt Hyne

Hi Folks, needs a little advice.

I have a table that contains a unique auto-incrementing primary key
called 'id' (eg 1,2,3,4...).   When inserting data, I let mySQL allocate
the value that goes into this field. 

Now I want to insert a new row into this table and get the 'id' value
that mySQL has allocated (so I can then do some more work such as
attaching a filename called 'id'.xxx).

Can someone suggest a good way to do this ?  I thought of maybe doing a
SELECT MAX(id) FROM table first and then using id+1 as the new 'id'
for the next entry but this is frought with danger as someone could come
along and insert a new entry between my SELECT and INSERT.

Because 'id' is the only guaranteed unique column, I cannot think of a
way to do a SELECT after an INSERT to get back the 'id' of the last
thing inserted.

Can anyone help ?

Matt


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



Re: mysql ended error

2003-06-23 Thread Nils Valentin
Hi Sigh,

I just double and tripple read the threat once more.

Installing all prepared tables
./bin/mysqld: Can't change dir to '/usr/local/mysql/./data/' (Errcode: 
13)


This tells me that your user account you are currently logged in with 
(username) does not have rights to write to /usr/local/mysql/data.

Therefore you will not have the folder /usr/local/mysql/data/mysql which would 
contain the privilege database.

Then your server could startup fine ;-)

S, that should be really it. Lng story short end Linux account rights 
problem ;-)

Best regards

Nils Valentin
Tokyo/Japan


2003 6 24  02:43Pushpinder Singh Garcha :
 Installing all prepared tables
 ./bin/mysqld: Can't change dir to '/usr/local/mysql/./data/' (Errcode:
 13)

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


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



Re: my.cnf and passwords

2003-06-23 Thread Nils Valentin
No, no yu are welcome ;-)

Best regards

Nils Valentin
Tokyo/Japan


2003 6 24  02:29:
 Ahh thank you for the clarification.   It is most appreciated!


 Cheers,

 Chris

 -Original Message-
 From: Nils Valentin [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 20, 2003 5:42 PM
 To: Chris Hutchison; MySQL list
 Subject: Re: my.cnf and passwords


 Hi Chris,

 I believe you are looking in the wrong place. The my.cnf is used to set
 startup options for the mysql server or the mysql clients - refering to the
 client tools that come with the RDBMS.

 You want to look into /etc/php.ini

 or  the config.inc.php file from phpmyadmin.

 Best regards

 Nils Valentin
 Tokyo/Japan

 2003 6 21  05:36Chris Hutchison :
  Hello all,
 
  I'm pretty new to MySQL, but have managed to create a database that is
  accessed via PHP which then creates tables from the MySQL data.
 
  Currently, I am using the root user/password combo to grab the info
  (which means the password is plaintext in the PHP).   I wanted to use the
  my.cnf to define the password, but no matter where I put the file
  (/etc/my.cnf, /var/lib/mysql/, /var/lib/mysql/[databasename], /root,
  /home/mysql/.my.cnf) my query won't seem to hit the my.cnf file which has
  the following in it: (note:  it doesn't have a username defined.)
 
  [client]
  password=mypassword
 
  my database is called 'assets' and it's located in:
  /var/lib/mysql/assets
 
  I have a mysql user defined:
  mysql:x:100:101:MySQL server:/var/lib/mysql:/bin/bash
 
  The php stuff is located in a single directory:
  /var/www/html/assets
 
  Yet when I try to access the page (which works when the password is
  passed in the php), I get:
 
  Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) in
  /var/www/html/assets/fetch-new.php on line 6
 
  Warning: MySQL Connection Failed: Access denied for user:
  '[EMAIL PROTECTED]' (Using password: NO) in
  /var/www/html/assets/fetch-new.php on line 6
 
  fetch-new.php's line 6 (and 7) looks like this:
 
  $db = mysql_connect(localhost, root);
  mysql_select_db(assets,$db);
 
 
  I've checked out the mysql.com's documentation, and I've tried putting
  the my.cnf file in every place they reference, but it doesn't seem to
  work via this PHP.   When I connect from the command line (on the Linux
  box), it *does* work, so it seems that the /etc/my.cnf file is being
  checked at that point, but isn't being checked in the php.
 
  Does anyone see/know a fix?   I'm out of ideas.
 
  Thanks in advance,
 
  Chris

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


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



Re: Archiving tables ranges

2003-06-23 Thread Don Read

On 23-Jun-2003 Hubbard, Dan wrote:
 Passing mysql commands through mysqldump or BACKUP TABLE ?
 
 We would like to perform backups on selective data within selective
 tables
 and then purge the matching data in those tables. Is it possible to pass
 mysql commands through either util above ? Which is better ?
 
 Example: sql statement...
 
 select * from tablename1 WHERE ((date_time  '2003-00-00 00:00:00') and
 (date_time  '2003-06-31 00:00:00')); 
 
 TIA !

(June has 31 days ?)

---
#!/bin/sh

INPERIOD=BETWEEN '2003-01-01 00:00:00' AND '2003-06-30 23:59:59'

OPT=-e -q -t


mysqldump $OPT --where=date_time $INPERIOD db tbl  tbl.dmp  \
mysql -e DELETE FROM tbl WHERE date_time $INPERIOD db

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


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



Re: Quick Question

2003-06-23 Thread Daniel Kasak
Andrew E Filipowski wrote:

I am fairly new to MySql, I have a product that is offered from the company
I work for that uses db2, oracle, and SQL Server. Recently I had a customer
ask if we could run on MySQL. I decided to test it out with my mac powerbook
using tomcat and MySQL. The app is loading and some tables are getting
written into the MySQL database. But than an error occurs. The error message
is as follows:
Unable to determine if the SQLServer database is in SQL7 mode

Now I have gotten this message in SQLServer 2000, my question is there a way
to get mysql to run in a mode compatible more with sql server 7? This would
help out development as they are rather busy with new releases. Just curios.
Thanks for the help if any body has any thoughts.
Andrew

 

No.
You need MySQL drivers.
--
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: www.nusconsulting.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Q: LOAD DATA command error

2003-06-23 Thread mysql
I use version 4.0.12-max-debug.

mysql returns the following error code when I use the load data command.

mysql load data local infile foo.txt into table pet;
ERROR 1148: The used command is not allowed with this MySQL version

Do I need to upgrade to a new version?


Re: Archiving tables ranges

2003-06-23 Thread Jeremy Zawodny
On Mon, Jun 23, 2003 at 04:49:00PM -0700, Jeremy Zawodny wrote:
 On Mon, Jun 23, 2003 at 04:16:51PM -0700, Hubbard, Dan wrote:
  Passing mysql commands through mysqldump or BACKUP TABLE ?
  
  We would like to perform backups on selective data within selective tables
  and then purge the matching data in those tables. Is it possible to pass
  mysql commands through either util above ? Which is better ?
  
  Example: sql statement...
  
  select * from tablename1 WHERE ((date_time  '2003-00-00 00:00:00') and
  (date_time  '2003-06-31 00:00:00')); 
 
 No.

Hm.  I somehow missed the mysqldump reference.  As Don points out, you
can do that.

*sigh*

I should have thought to mention it.  Oh well...
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 20 days, processed 650,961,218 queries (360/sec. avg)

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



Re: LOAD DATA command error

2003-06-23 Thread David Wilson
I ran into this too.  I assume it is a limitation on the free version of MySQL, and 
that
you have to pay to use load data in an SQL script.  To import my data files, I use
the mysqlimport function from the command line or batch file.  It seems to support
most of the load data options.

- Original Message - 
From: mysql 
To: mySQL List 
Sent: Tuesday, June 24, 2003 12:02 AM
Subject: Q: LOAD DATA command error


I use version 4.0.12-max-debug.

mysql returns the following error code when I use the load data command.

mysql load data local infile foo.txt into table pet;
ERROR 1148: The used command is not allowed with this MySQL version

Do I need to upgrade to a new version?


Re: LOAD DATA command error

2003-06-23 Thread Ruth Zhai
By default, LOAD DATA INFILE ... is disabled (I am not sure from which
version).  You may need to compile MySQL with “-enable-local-infile. You
may find details on www.mysql.com .

Ruth

- Original Message -
From: mysql [EMAIL PROTECTED]
To: mySQL List [EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 2:02 PM
Subject: Q: LOAD DATA command error


I use version 4.0.12-max-debug.

mysql returns the following error code when I use the load data command.

mysql load data local infile foo.txt into table pet;
ERROR 1148: The used command is not allowed with this MySQL version

Do I need to upgrade to a new version?



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



  1   2   >