Re: mysql have same function mthod as Oracle decode()

2004-03-23 Thread Egor Egorov
Qiang.zhou [EMAIL PROTECTED] wrote:
 Dear All;

   At oracle8i i can write this sql:
   select decode(a.id,null,'NULL',2,God',3,'Norma','Animal') from user

   Then i want know ,how to write this at mysql4.1


Use IF() or CASE to rewrite your query:
http://www.mysql.com/doc/en/Control_flow_functions.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: Downloading Data

2004-03-23 Thread Victoria Reznichenko
Rick Duley [EMAIL PROTECTED] wrote:
 Hi folks
 
 I am running MySQL 4..0.7-gamma on Red Hat Linux 7.2.
 
 I wish to download data from my database.
 
 I have a directory called 'Results' with permissions set to: drwxrwxrwx
 
 I enter the command:
 
  SELECT * INTO OUTFILE '/home/rick/Results/Results.txt' FROM Answer;
 
 and I get:
 
  ERROR 1045: Access denied for user '[EMAIL PROTECTED]' (Using password: YES)
 
 The command without the  INTO OUTFILE '/home/rick/Results/Results.txt' 
 clause works just fine.
 
 Where have I missed the bus?
 
 Thanks
 

User must have FILE privilege to use SELECT INTO OUTFILE and LOAD DATA INFILE commands.


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



Unexpected GROUP BY result

2004-03-23 Thread Andrew Threlfall
I'm getting unexpected results when using GROUP BY. If you specify a 
WHERE match in the query I get the desired result, but if I remove it, 
to show all results, the set returned is inaccurate.

The query counts how many of a certain bcode there are at various prices.

mysql SELECT bcode, price, sum(qty) FROM bookorders WHERE bcode='AYL' 
GROUP BY price ORDER BY bcode,price;
+---+---+--+
| bcode | price | sum(qty) |
+---+---+--+
| AYL   |  2.00 |2 |
| AYL   |  3.00 |5 |
| ayl   |  3.50 |1 |
| ayl   |  5.00 |   15 |
| ayl   |  6.30 |   86 |
| ayl   |  6.99 |   22 |
| ayl   |  7.00 |  140 |
| ayl   | 63.00 |1 |
+---+---+--+
8 rows in set (0.07 sec)

now with WHERE bcode='AYL' removed:

mysql SELECT bcode, price, sum(qty) FROM bookorders GROUP BY price 
ORDER BY bcode,price;
+++--+
| bcode  | price  | sum(qty) |
+++--+
| 1tscd  |  20.00 |   29 |
| ach|  67.50 |2 |
| ACH|  75.00 |  252 |
| ar+des |  10.15 |  220 |
| ar+des |  10.35 |8 |
| ar+des |  10.47 |8 |
| ar+des |  10.70 |2 |
| ayl|   6.30 |   87 |
| ayl|   6.99 |   25 |
| bt |   7.50 |1 |
| bt |  13.50 |   43 |
| BT |  14.25 |1 |
--CUT--
| uys| 125.00 |  264 |
| uys| 178.20 |2 |
+++--+
110 rows in set (0.06 sec)

I'm not getting the results for bcodes at the lower prices, and the two 
results I am getting for ayl in the second case have different sum(qty) 
values.

I can't see what's worng with the query. Am I missing somthing obvious?

This is also the case if I remove ORDER BY in the query.
I'm using 4.0.15 (4.0.18 seems to give same result).
--
Andrew Threlfall
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Does the binary log enabling affect the MySQL performances?

2004-03-23 Thread Enrico . Venturi
Hello colleagues, I'd like to know
IF by enabling the binary logs production I'll affect meaningfully the 
MySQL DB performances, and
HOW MUCH the performances are impacted

Any witnesses on this topic?
Regards
Enrico
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


created user but access denied

2004-03-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, all --

I have just moved my web site from one server to another (whew!) and I am
having a problem with a mysql user definition for a calendar program.

I used mysqldump to dump the calendar database (wc_jpo) and loaded it on
the new server; it appears to be happily there.  I then ran

  grant all privileges on wc_jpo.* to wcjporoot identified by 'pass'
with grant option ;
  flush privileges ;

and similarly for ... wcjporoot@% ... but still cannot get in;
whenever I try with the mysql client I get

  bash-2.05a$ mysql -uwcjporoot -p  wc_jpo 
  Enter password: 
  ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

and, similarly, the web script cannot get in.  Yet when I select the user
record from mysql.user and mysql.db they appear complete.

What glaringly obvious omission have I failed to see?


TIA  HAND

:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAYBTxGb7uCXufRwARAhEGAKC35yFC89RpB1Lt4fgwsnzIB35XWQCgi0hS
Ymu/m2NsXwSdPgRCJx5MVQM=
=ES0o
-END PGP SIGNATURE-

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



Re: php script for new database and user

2004-03-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lefty --

...and then BGLefty said...
% 
% 
% Is there a simple php script out there somewhere (or an example of how to do

It's a little bigger than simple, but have you seen phpMyAdmin?


% it) to create a new database, username and password? I would like to have a
% form in a password protected folder on my web site and be able to fill in
% those three variables to create a new database on my installation of mysql
% on my home computer (be able to do this from my office or another computer).
% It seems like a simple enough thing to do but I have been unable to find any
% examples...

Indeed it should be.  Admittedly, I may be overlooking something since
I've created a user that can't get in, but we can edit this post when I'm
finally shown the problem :-)

So your script should run something like

  if ( not https )
{ redirect to https ; exit ; }

  if ( no or incorrect password )
  {
check $_POST for password input ;
get password ;
exit ;
  }

  if ( $_POST['dbname']  $_POST['dbuser']  $_POST['dbpass'] )
  {
mysql_connect(localhost,dbrootuser,dbrootpass)
  or die(Could not connect\n) ;
mysql_query(create database {$_POST['dbname']})
  or die(Could not create db\n) ;
mysql_query(grant all privileges on {$_POST['dbname']}.* to
  {$_POST['dbuser']} identified by {$_POST['dbname']}
  with grant option)
  or die(Could not create user\n) ;
mysql_query(flush privileges) ;
  }
  else
{ display input page ; exit ; }

(just from the top of my head, and without any real security checking
since you're the only who will use the script and you know better).  This
will ask for db name, db user, db pass and then connect as your root user
to attempt to create the database and then give the user permissions on
it (thereby creating the user record).


% 
% Any help would be appreciated.
% 
% Thanks,
% BGLefty


HTH  HAND

:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAYBk7Gb7uCXufRwARAl1jAJ9sqzZdGnuKH7aeb+ysh3f7ZtoQqACePK+Y
m7o14jrrXR6aS1/hB7a9yq0=
=CgKZ
-END PGP SIGNATURE-

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



created user but access denied

2004-03-23 Thread David T-G
Hi, all --

I have just moved my web site from one server to another (whew!) and I am
having a problem with a mysql user definition for a calendar program.

I used mysqldump to dump the calendar database (wc_jpo) and loaded it on
the new server; it appears to be happily there.  I then ran

  grant all privileges on wc_jpo.* to wcjporoot identified by 'pass'
with grant option ;
  flush privileges ;

and similarly for ... wcjporoot@% ... but still cannot get in;
whenever I try with the mysql client I get

  bash-2.05a$ mysql -uwcjporoot -p  wc_jpo 
  Enter password: 
  ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

and, similarly, the web script cannot get in.  Yet when I select the user
record from mysql.user and mysql.db they appear complete.

What glaringly obvious omission have I failed to see?


TIA  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: sorry for the dupe post (was Re: created user but ...)

2004-03-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi again, all --

...and then David T-G said...
% 
% I have just moved my web site from one server to another (whew!) and I am
% having a problem with a mysql user definition for a calendar program.
...

Sorry for the duplicate post; I only realized after my response to
Lefty's post that everything for me suddenly stopped around 03/17, and
it took restarting my mail program to see the first copy.

Now to figure out where six days of mail went...


HAND

:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAYCGmGb7uCXufRwARAlFfAJ9CUUy6YG5KW5x1gRMyRYnAlyYWEgCfZQte
/sIzHVw521NdNj6JiEILhc4=
=Grrl
-END PGP SIGNATURE-

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



Re: Does the binary log enabling affect the MySQL performances?

2004-03-23 Thread Tim Cutts
On 23 Mar 2004, at 10:38, [EMAIL PROTECTED] wrote:

Hello colleagues, I'd like to know
IF by enabling the binary logs production I'll affect meaningfully the 
MySQL DB performances, and
HOW MUCH the performances are impacted
I just tested a load of a 6GB mysqldump (MyISAM tables), on an unloaded 
HP AlphaServer ES45 with 8 GB of RAM, and storage on an HSV 110 SAN 
device.  MySQL version was 4.0.17

Without binary logging, elapsed time was:

2480 seconds

With binary logging, elapsed time was:

2502 seconds

So it's about 1% slower, if that.  I'm logging to a different device 
from the databases.

As an additional point, if I add a replication slave to the equation, 
the time becomes:

2518 seconds

Which is scarcely any difference at all.

Tim

--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute
Hinxton, Cambridge, CB10 1SA, UK
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: created user but access denied

2004-03-23 Thread Egor Egorov
David T-G [EMAIL PROTECTED] wrote:
 
 I have just moved my web site from one server to another (whew!) and I am
 having a problem with a mysql user definition for a calendar program.
 
 I used mysqldump to dump the calendar database (wc_jpo) and loaded it on
 the new server; it appears to be happily there.  I then ran
 
  grant all privileges on wc_jpo.* to wcjporoot identified by 'pass'
with grant option ;
  flush privileges ;
 
 and similarly for ... wcjporoot@% ... but still cannot get in;
 whenever I try with the mysql client I get
 
  bash-2.05a$ mysql -uwcjporoot -p  wc_jpo 
  Enter password: 
  ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
 
 and, similarly, the web script cannot get in.  Yet when I select the user
 record from mysql.user and mysql.db they appear complete.
 
 What glaringly obvious omission have I failed to see?
 
 

Remove entry for user ''@'localhost from the mysql.user table:

DELETE FROM user WHERE user='' AND host='localhost';
FLUSH PRIVILEGES;



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



Uexpected shutdown

2004-03-23 Thread Robert Friberg

Hi all,


This morning my server wasn't running. For some reason it had shutdown,
which the error log shows, but what's causing it is a riddle to me. I'm
now running  with --log and --log-update to be able to get some info if
it happens again. Any other ideas on how to troubleshoot this or is this
a known issue?

Some info:

I'm running Redhat 9 with the default mysql rpms. The server runs a few
very small low traffic databases accessed with Apache::DBI.

$ mysql -V
mysql  Ver 12.22 Distrib 4.0.16, for pc-linux (i686)

$ cat /var/lib/mysql/husky.err
031203 05:45:45  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
031203  5:45:45  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
031203  5:45:48  InnoDB: Log file ./ib_logfile0 did not exist: new to be
created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
031203  5:45:48  InnoDB: Log file ./ib_logfile1 did not exist: new to be
created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
031203  5:45:50  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.16-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
040114  5:17:37  /usr/sbin/mysqld: Normal shutdown

040114  5:17:37  InnoDB: Starting shutdown...
040114  5:17:39  InnoDB: Shutdown completed
040114  5:17:39  /usr/sbin/mysqld: Shutdown Complete

040114 05:17:40  mysqld ended

040114 05:28:11  mysqld started
040114  5:28:14  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.16-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306

Number of processes running now: 0
040320 11:26:34  mysqld restarted
040320 11:45:26  InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43902
InnoDB: Doing recovery: scanned up to log sequence number 0 43902
040320 11:52:54  InnoDB: Flushing modified pages from the buffer pool...
040320 11:57:56  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.16-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306

Number of processes running now: 0
040320 12:42:07  mysqld restarted
040320 12:52:02  mysqld ended

040323 12:26:09  mysqld started
040323 12:26:11  InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43902
InnoDB: Doing recovery: scanned up to log sequence number 0 43902
040323 12:26:11  InnoDB: Flushing modified pages from the buffer pool...
040323 12:26:11  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.16-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306



 
!  Robert Friberg  0733-839080
!  Developer/Trainer   perl,java,dotnet,linux,xml,uml,sql,c/c++,vb
!  Ensofus AB  http://www.ensofus.se/
!  Miljö Online AB http://www.miljo-online.se/
 


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



Re: created user but access denied

2004-03-23 Thread Rick Emery
OFF TOPIC

Remove space between '-p' and the password in you command line.
That isbash-2.05a$ mysql -uwcjporoot -pwc_jpo

/OFF TOPIC
- Original Message - 
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 6:36 AM
Subject: Re: created user but access denied


David T-G [EMAIL PROTECTED] wrote:
 
 I have just moved my web site from one server to another (whew!) and I am
 having a problem with a mysql user definition for a calendar program.
 
 I used mysqldump to dump the calendar database (wc_jpo) and loaded it on
 the new server; it appears to be happily there.  I then ran
 
  grant all privileges on wc_jpo.* to wcjporoot identified by 'pass'
with grant option ;
  flush privileges ;
 
 and similarly for ... wcjporoot@% ... but still cannot get in;
 whenever I try with the mysql client I get
 
  bash-2.05a$ mysql -uwcjporoot -p  wc_jpo 
  Enter password: 
  ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
 
 and, similarly, the web script cannot get in.  Yet when I select the user
 record from mysql.user and mysql.db they appear complete.
 
 What glaringly obvious omission have I failed to see?
 
 

Remove entry for user ''@'localhost from the mysql.user table:

DELETE FROM user WHERE user='' AND host='localhost';
FLUSH PRIVILEGES;



-- 
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: alter table tt union=(t1,t2,t3);

2004-03-23 Thread Victoria Reznichenko
On Monday 22 March 2004 18:26, Shane Nelson wrote:
 Thanks, the help file cleared up the rest.

 In my case the table tt wasn't a merge table, it was just a table I
 created normally.  Even so the alter table line didn't create an error.

If the table type other than MERGE, UNION part of the ALTER TABLE statement is ignored.
So, your ALTER TABLE statement will recreate table tt and copy data.


 Shane

 Egor Egorov wrote:
  Shane Nelson [EMAIL PROTECTED] wrote:
 Any idea what this would do?
 
 alter table tt union=(t1,t2,t3);
 
  With this statement you specify that MERGE table tt will union tables t1,
  t2, t3 and they will used as one: http://www.mysql.com/doc/en/MERGE.html
 
 The four tables are all the same and all contain data.  I posted the
 details (schema, contents) of the tables here:
 
 http://nopaste.php.cd/10918
 
 I'm running mysql  Ver 11.18 Distrib 3.23.58,


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



Problem duplicating table

2004-03-23 Thread Vinay
Hi i'm trying to write an sql statement which will make a copy of a
table including all its data and indexes. The problem comes with the
fact that the table contain over 20 million lines and i'm looking for a
code or an sql statement that will duplicate this table including its
indexes.

i'm using mysql MySQL 3.23.49


V!nay




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



operators in mysql

2004-03-23 Thread joe collins
Hi, 

can operators be used in MySQL e.g. 

a table Table X with column A, column B column C

All three are floats

can I use 

select (A-B)
from X
where condition


or will I have to so the A-B calculation in my application code instead?

Also can I use

select C from X where condition
 Then 

update X set C = (return values got from above + New Increment)
where condition

Any help would be greatly appreciated

many thanks

Joe



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

Re: Problem duplicating table

2004-03-23 Thread Egor Egorov
Vinay [EMAIL PROTECTED] wrote:
 Hi i'm trying to write an sql statement which will make a copy of a
 table including all its data and indexes. The problem comes with the
 fact that the table contain over 20 million lines and i'm looking for a
 code or an sql statement that will duplicate this table including its
 indexes.
 
 i'm using mysql MySQL 3.23.49
 

If table has many indexes it will be faster to create table without indexes with 
CREATE .. SELECT statement and then add indexes.



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



Can't Start Deamon - Installed MySQL 4.0.15 using YaST (SuSE 9.0 Pro)

2004-03-23 Thread Kevin Carpenter
Ye That Know,

Short:  Does YaST really install MySQL 'all-the-way', or do I now need to run 'make' 
and/or 'make install', or other similar commands?

Long:

Previously last week I had installed MySQL using rpm as detailed in a SAMS book 
http://tinyurl.com/2pq27

It installed fine and worked ok - I connected, made a few tiny test DBs, etc

—--

I was having trouble with PHP and decided to reinstall everything using YaST

I installed the latest versions of:
flex
mysql
apache
php

In that order.
—--

Now when I type 'mysql' I get: ERROR 2002: Can't connect to local MySQL server 
through socket '/var/lib/mysql/mysql.sock

When I type 'mysqld' I get: Fatal Error: Please read Security section of the manual 
to find out how to run mysql as root!

(I'm root)

I did look at the manual but didn't see specific root instructions.  I also logged in 
as a non-root user and retried. It said the command was not found, which is odd 
because it is in /usr/sbin and is executable.

—-

Above I asked if YaST installs MySQL all-the-way because the directory 'mysql' is 
missing from /usr/local.

Perhaps that is simply an install location difference between rpm and YaST.

--- 

What do you guys think?  I'm considering uninstalling MySQL with YaST and reinstalling 
with rpm.

TIA,

   -:Kevin





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



Re: created user but access denied

2004-03-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rick, et al --

...and then Rick Emery said...
% 
% OFF TOPIC
% 
% Remove space between '-p' and the password in you command line.
% That isbash-2.05a$ mysql -uwcjporoot -pwc_jpo

Actually, wc_jpo is the name of the database, and -p without a password
properly asks me for one (so I'm not showing it on the command line to
anyone with ps tools :-)


% 
% /OFF TOPIC


Thanks  HAND

:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAYFA9Gb7uCXufRwARAraIAJsFTBQwvD/hFxEJZrc48grYNYf2OQCggx4h
iQu+56lAK+tN/tkPNp7Gi2s=
=fI6I
-END PGP SIGNATURE-

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



Re: created user but access denied

2004-03-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Egor, et al --

...and then Egor Egorov said...
% 
% David T-G [EMAIL PROTECTED] wrote:
%  
%  I have just moved my web site from one server to another (whew!) and I am
%  having a problem with a mysql user definition for a calendar program.
...
%   grant all privileges on wc_jpo.* to wcjporoot identified by 'pass'
% with grant option ;
%   flush privileges ;
...
%  
%  What glaringly obvious omission have I failed to see?
% 
% Remove entry for user ''@'localhost from the mysql.user table:
% 
%   DELETE FROM user WHERE user='' AND host='localhost';
%   FLUSH PRIVILEGES;

Son of a gun; there is one there (two, actually; one is 'localhost' and
the other is the host name).

And I'm in!

So is that user a common problem, then?  How was it created?  And do I
like the one for the hostname entry?


Thanks  HAND

:-D
- -- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAYFFyGb7uCXufRwARAuAXAKDFcV1e//jhn3Yh/7/9dyQcObjZqgCfYGPg
hxKWLNstuhXBm/44fnrqx2g=
=BNdM
-END PGP SIGNATURE-

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



Re: operators in mysql

2004-03-23 Thread Alec . Cawley







joe collins [EMAIL PROTECTED] wrote on 23/03/2004
14:33:13:


 can operators be used in MySQL e.g.

 a table Table X with column A, column B column C

 All three are floats

 can I use

 select (A-B)
 from X
 where condition


 or will I have to so the A-B calculation in my application code instead?

Yes - MySQL has a rich set of operators. See
http://www.mysql.com/doc/en/Functions.html


 Also can I use

 select C from X where condition
  Then

 update X set C = (return values got from above + New Increment)
 where condition

Not like that. You do it in one command
  UPDATE X SET C=C+increment WHERE condition ;

See http://www.mysql.com/doc/en/UPDATE.html

  Alec


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



Trusted Solaris

2004-03-23 Thread Jack Kearney
Has anyone had experience with running MySQL on Trusted Solaris?

Thanks,
Jack

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



using old frm files

2004-03-23 Thread dan
we had a database blown away (oops) and we still have the old
.frm files, is there any way to get this structure back?

is there a way to view the contents of the .frm files to
see how the tables/indexes were setup?

I can't find anything in the docs, faqs, etc.

Dan.


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



mysql:it's a db not a dbms... how it's possible?!

2004-03-23 Thread Emiliano
how is possible that crashing a client that was quering a mysql db located in a server 
this db(not sure a dbms...) it reports the errors:

Got error 127 from table handler 

and

Database error: Metadata query failed.
MySQL Error: 1016 (Can't open file: 'cartella.MYI'. (errno: 145))
Session halted.

i recovered everything with myisamchk but who assure me that is possible everytime?
i suppose that a dbms take care at first the data integrity, why mysql doesn't take 
it?!
thanks!
Emiliano

p.s.
my system:
windows xp
iis
MySQL 4.0.15-nt

High resolution timestamps

2004-03-23 Thread Leon Brocard
Hello,

Recently I've been needing high-resolution timestamps
(year/month/day/hour/minute/seconds/microseconds) in MySQL (to store
network packets, mmm). Is this a planned feature for MySQL in the
future?

Cheers, Leon
-- 
Leon Brocard.http://www.astray.com/
scribot.http://www.scribot.com/

... Scary bananas!

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



sql question

2004-03-23 Thread Vincent . Badier
Hello all,

I've a table like this :

site_1  pkg_name_1  version
site_1  pkg_name_2  version
site_1  pkg_name_3  version
...
site_1  pkg_name_n  version
site_2  pkg_name_1  version
site_2  pkg_name_2  version
...
site_2  pkg_name_n  version
...
site_n  pkg_name_1  version
...
site_n  pkg_name_n  version


And i would like to make a sql statement to obtain a result like this ;

|pkg| site_1  | site_2  | site_3   ... site_n
|--
|pkg_name_1 | version | version | version  ... version
|pkg_name_2 | version | version | version  ... version
|pkg_name_3 | version | version | version  ... version
|...
|pkg_name_n | version | version | version  ... version


I really don't know how to write this sql request, even if there is one way
to do it...
I still hope someone will have an idea.

Thank's for you help

--
Vincent



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



Re: created user but access denied

2004-03-23 Thread Egor Egorov
David T-G [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Egor, et al --
 
 ...and then Egor Egorov said...
 % 
 % David T-G [EMAIL PROTECTED] wrote:
 %  
 %  I have just moved my web site from one server to another (whew!) and I am
 %  having a problem with a mysql user definition for a calendar program.
 ...
 %   grant all privileges on wc_jpo.* to wcjporoot identified by 'pass'
 % with grant option ;
 %   flush privileges ;
 ...
 %  
 %  What glaringly obvious omission have I failed to see?
 % 
 % Remove entry for user ''@'localhost from the mysql.user table:
 % 
 %   DELETE FROM user WHERE user='' AND host='localhost';
 %   FLUSH PRIVILEGES;
 
 Son of a gun; there is one there (two, actually; one is 'localhost' and
 the other is the host name).
 
 And I'm in!
 
 So is that user a common problem, then?

When server reads table user, it sorts entries by host, then by user. Entry 
''@'localhost' is more specific than 'wcjporoot'@'%'. So it will be find first:
http://www.mysql.com/doc/en/Connection_access.html

 How was it created?  And do I
 like the one for the hostname entry?
 

This user is created by default and has permissions only on the database 'test'.



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



If DataBase Exists

2004-03-23 Thread A Z


MySQL 4.0.14

Possible to query for existence of a DB.  For example
connect to MySQL and run run a command to check if
Database (Test2) existed.

regards






___
Yahoo! Messenger - Communicate instantly...Ping 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

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



Re: Can't Start Deamon - Installed MySQL 4.0.15 using YaST ( SuSE 9.0 Pro)

2004-03-23 Thread Kevin Carpenter
James,

I try to start it at the command line using - mysql, mysqld, mysqld_safe - I've tried 
it as root and non-root.

Yes, I get errors - they were listed in my origional post - I don't have then handy 
now.

-

I tired mysqld_safe, as you suggested, it bombed but the good thing is it wrote to the 
mysqld.log.

Here's what it said:

040323 11:14:34  mysqld started
040323 11:14:37  InnoDB: Started
040323 11:14:37  Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't 
exist
040323 11:14:37  Aborting

040323 11:14:37  InnoDB: Starting shutdown...
040323 11:14:40  InnoDB: Shutdown completed
040323 11:14:40  /usr/sbin/mysqld-max: Shutdown Complete

040323 11:14:40  mysqld ended

---

What do you think?

   -:Kevin




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



Cleaning up binary log files during replication

2004-03-23 Thread Raza Ansari
Hi I am using replication to do online backups for my tables. Now my next
task is to automate cleaning up of binary log files from Master server.
Assuming I have more than one slave running, and may be at the time of
clean up one of the slave is down for backup, how can I be sure that my
clean up procedure is not deleting a binary log file that may be needed by
the slave that is currently down?

In the documentation it says to check the log files currently being used
by all the slaves and then delete logs in master by using PURGE cmd and
specify the earliest among all the ones being used by all slaves. But this
is lot of work if I am running many instances, as i am using mysqld_multi
to run numerous instances.

Also in the documentation it says If you are using replication, you
should not delete old binary log files until you are sure that no slave
will ever need to use them. One way to do this is to do mysqladmin
flush-logs once a day and then remove any logs that are more than 3 days
old

But I don't feel comfortable about 3 day old thing, that seems to be an
estimate but I would prefer a way so that I can go ahead and delete the
logs from Master and it will only delete the ones not being used by the
slave servers including the ones currently down for backups.

If anyone has any tips or suggestions on this matter, please let me know
I would appreciate help...

Thanks



Desktop Support
School of Computer Science
Florida International Univeristy



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



Re: If DataBase Exists

2004-03-23 Thread Victoria Reznichenko
A Z [EMAIL PROTECTED] wrote:
 
 
 MySQL 4.0.14
 
 Possible to query for existence of a DB.  For example
 connect to MySQL and run run a command to check if
 Database (Test2) existed.
 

Use SHOW DATABASES command:
SHOW DATABASES LIKE 'Test2';

http://www.mysql.com/doc/en/Show_database_info.html

But you can see only those databases for which you have some privileges.


-- 
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: Problems connecting to MySql on WebSphere 5.1

2004-03-23 Thread Tom O'Neil
Mark,
Did you ever have any luck looking into this? I have
found that if I explicitly set the user and
password parameters for each database in WebSphere
(rather than using a container managed JAAS
authentication entry), I still get the error listed
below, however the database connections will work. But
it seems that their is a problem with connection
pooling, whereby the connections become stale over
time and cause an exception to be thrown next time
they are accessed. None of this was a problem in 5.0,
so I've also asked IBM if there is something they
might have changed in the 5.1 upgrade.

Tom

--- Mark Matthews [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Tom O'Neil wrote:
 
  I've been running an application on WebSphere 5.0
  (Linux) that uses the MySql Connector/J 3.10 to
  connect to a MySql-max 4.0.15 database (also on
  Linux). All was working fine, until I recently
  installed WebSphere 5.1. Now my datasources
  (configured exactly as before) no longer work -
  WebSphere seems unable to find them. When I start
 the
  server, I get the following error when my
 application
  starts:
 
  [2/19/04 16:04:40:481 EST] 3c6d95c5 DSConfigurati
 W
  DSRA0174W: Warning: GenericDataStoreHelper is
 being
  used.
  [2/19/04 16:04:40:891 EST] 3c6d95c5 ConnectionFac
 I
  J2CA0122I: Resource reference jdbc/staging could
 not
  be located, so default values of the following are
  used: [Resource-ref settings]
 
  res-auth: 1 (APPLICATION)
  res-isolation-level:  0 (TRANSACTION_NONE)
  res-sharing-scope:true (SHAREABLE)
  res-resolution-control:   999 (undefined)
  [Other attributes]
 
  isCMP1_x: false (not CMP1.x)
  isJMS: false (not JMS)
 
  Has anyone else had problems with WAS 5.1 access
 MySql
  datasources?
 
 Tom,
 
 Make sure you're using

'com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource'
 as the
 datasource implementation class that you plug into
 your WebSphere
 config...For some reason, no other classes (Driver
 or plain DataSource)
 seem to work in 5.1sp1 or newer.
 
 FYI, I just tested this yesterday in WS 6.0 preview,
 and it has the same
 issue.
 
   -Mark
 
 - --
 Mr. Mark Matthews
 MySQL AB, Software Development Manager, J2EE and
 Windows Platforms
 Office: +1 708 332 0507
 www.mysql.com
 
 Meet the MySQL Team! April 14-16, 2004
 http://www.mysql.com/uc2004/
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.3 (MingW32)
 Comment: Using GnuPG with Thunderbird -
 http://enigmail.mozdev.org
 

iD8DBQFANV/qtvXNTca6JD8RAnWcAKCD9n3If9DLMSJqOwc4ygbNpt+hsgCgmxQ4
 Hd/VPa5IieQfH+Y/jnZfciM=
 =W/GZ
 -END PGP SIGNATURE-


=


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



Re: Can't Start Deamon - Installed MySQL 4.0.15 using YaST ( SuSE 9.0 Pro)

2004-03-23 Thread Victoria Reznichenko
Kevin Carpenter [EMAIL PROTECTED] wrote:
 
 I try to start it at the command line using - mysql, mysqld, mysqld_safe - =
 I've tried it as root and non-root.
 
 Yes, I get errors - they were listed in my origional post - I don't have =
 then handy now.
 
 -
 
 I tired mysqld_safe, as you suggested, it bombed but the good thing is it =
 wrote to the mysqld.log.
 
 Here's what it said:
 
 040323 11:14:34  mysqld started
 040323 11:14:37  InnoDB: Started
 040323 11:14:37  Fatal error: Can't open privilege tables: Table 'mysql.hos=
 t' doesn't exist
 040323 11:14:37  Aborting
 
 040323 11:14:37  InnoDB: Starting shutdown...
 040323 11:14:40  InnoDB: Shutdown completed
 040323 11:14:40  /usr/sbin/mysqld-max: Shutdown Complete
 
 040323 11:14:40  mysqld ended
 
 ---
 
 What do you think?
 

Look into MySQL data dir and check if privilege tables exist. If no, run 
mysql_install_db script.


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



LOCK TABLES and SHOW TABLE STATUS FROM - deadlock? (3.23.58)

2004-03-23 Thread Ondra Zizka
Hi,

I'm trying to understand LOCKing mechanism, but it is not enough described in the 
manual, so I have to test it myself.

To see what happens when I use tables I haven't locked, I created a PHP script like 
this:

$sql = USE fakturace;  if(!$res = 
mysql_query($sql,$spoj)){  decho(' A '.$sError = sql_error(mysql_error(),$sql)); }
$sql = LOCK TABLES $gt_firmy WRITE;   if(!$res = mysql_query($sql,$spoj)){  decho(' 
A '.$sError = sql_error(mysql_error(),$sql)); }
$sql = SELECT * FROM $gt_firmy AS f;if(!$res = mysql_query($sql,$spoj)){  
decho(' B '.$sError = sql_error(mysql_error(),$sql)); }
$sql = INSERT INTO test SET id = NULL;  if(!$res = mysql_query($sql,$spoj)){  
decho(' C '.$sError = sql_error(mysql_error(),$sql)); }
$sql = 'UNLOCK TABLES';  if(!$res = mysql_query($sql,$spoj)){  
decho(' Z '.$sError = sql_error(mysql_error(),$sql)); }

The result is expected:

 B MySQL error: Table 'f' was not locked with LOCK TABLES
SQL: SELECT * FROM firmy AS f

C MySQL error: Table 'test' was not locked with LOCK TABLES
SQL: INSERT INTO test SET id = NULL

The output doesn't change, until PhpMyAdmin sends

SHOW TABLE STATUS FROM fakturace

This query hangs on the server and no other query to database fakturace can be done. 
Is that ok?

That's not all. When I did SHOW PROCESSLIST, I got this:

++---+---+---+-+--+++
| Id | User  | Host  | db| Command | Time | State  | Info  
  |
++---+---+---+-+--+++
|  1 | fakturace | localhost | fakturace | Sleep   | 716  || NULL  
  |
|  2 | fakturace | localhost | fakturace | Sleep   | 606  || NULL  
  |
|  5 | fakturace | localhost | fakturace | Sleep   | 549  || NULL  
  |
|  7 | fakturace | localhost | fakturace | Sleep   | 472  || NULL  
  |
|  9 | root  | localhost | zona3d| Query   | 410  | Locked | SHOW TABLE STATUS 
FROM `fakturace` |
| 10 | root  | localhost | NULL  | Query   | 47   | Locked | SHOW TABLE STATUS 
FROM fakturace   |
| 11 | fakturace | localhost | fakturace | Query   | 30   | Locked | SELECT * FROM 
firmy AS f   |
| 12 | root  | localhost | NULL  | Query   | 0| NULL   | show processlist  
 |
++---+---+---+-+--+++
8 rows in set (0.00 sec)

So I killed that threads what locked the table:kill 1; kill 2; kill 5; kill 7;

++---+---+---+-+--+++
| Id | User  | Host  | db| Command | Time | State  | Info  
  |
++---+---+---+-+--+++
|  1 | fakturace | localhost | fakturace | Killed  | 1036 || NULL  
  |
|  2 | fakturace | localhost | fakturace | Killed  | 926  || NULL  
  |
|  5 | fakturace | localhost | fakturace | Killed  | 869  || NULL  
  |
|  7 | fakturace | localhost | fakturace | Killed  | 792  || NULL  
  |
|  9 | root  | localhost | zona3d| Query   | 730  | Locked | SHOW TABLE STATUS 
FROM `fakturace` |
| 10 | root  | localhost | NULL  | Query   | 367  | Locked | SHOW TABLE STATUS 
FROM fakturace   |
| 11 | fakturace | localhost | fakturace | Query   | 350  | Locked | SELECT * FROM 
firmy AS f   |
| 12 | root  | localhost | NULL  | Query   | 0| NULL   | show processlist  
 |
++---+---+---+-+--+++

But the queries SHOW TABLE STATUS are still hanging and after a while whole computers 
gets stunned, nothingchanges in processlist and the processor runs at 100% (P4 1.5 
GHz). While writing this mail, thread id # 11 changed to Reopen tables, then Waiting 
for tables, then NULL.

I don't understand it at alll as I am not familiar fwith locking, but i think this 
behavior is bad. Should I report this as a bug? I am using 3.23.58 and I DON'T want to 
install newer, because 3.x is running on servers I use for hosting.

Thanks, Ondra


Join the group

2004-03-23 Thread Naveen Babu
I would  like to join the group.

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

Re: mysql:it's a db not a dbms... how it's possible?!

2004-03-23 Thread Dan Nelson
In the last episode (Mar 23), Emiliano said:
 how is possible that crashing a client that was quering a mysql db
 located in a server this db(not sure a dbms...) it reports the
 errors:
 
 Got error 127 from table handler 
 
 and
 
 Database error: Metadata query failed. MySQL Error: 1016 (Can't open file: 
 'cartella.MYI'. (errno: 145)) Session halted.
 
 i recovered everything with myisamchk but who assure me that is
 possible everytime? i suppose that a dbms take care at first the
 data integrity, why mysql doesn't take it?!

It sounds like the client didn't crash, but the server did.  If mysqld
crashed, then any MyISAM tables that were in use at the time of the
crash would definitely need reparing.  If you want to ensure that
crashes don't affect tables, use InnoDB or BDB tables instead.

http://www.mysql.com/doc/en/Table_types.html

-- 
Dan Nelson
[EMAIL PROTECTED]

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



How to turn-off the replication?

2004-03-23 Thread Sam Yathira








Hi,

Everybody talks about setting up replication, but any
documentation on turning off replication?

Regards,

Sam










This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  No confidentiality or privilege is 
waived or lost by any mistransmission. If you receive this message in error, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. Burlington Capital Markets and each of its subsidiaries each reserve the 
right to monitor all e-mail communications through its networks.  Any views expressed 
in this message are those of the individual sender, except where the message states 
otherwise and the sender is authorised to state them to be the views of any such 
entity.

Unless otherwise stated, any pricing information given in this message is indicative 
only, is subject to change and does not constitute an offer to deal at any price 
quoted.

Any reference to the terms of executed transactions should be treated as preliminary 
only and subject to our formal written confirmation.


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

Re: How to turn-off the replication?

2004-03-23 Thread Victor Pendleton
Are you wanting to turn off replication from the master or the slave?

On Tue, 23 Mar 2004, Sam Yathira wrote:
 

Content-Type: multipart/alternative; name=unnamed
Content-Transfer-Encoding: 7bit
Content-Description: 



Content-Type: text/plain; name=InterScan_Disclaimer.txt
Content-Transfer-Encoding: 7bit
Content-Description: 



Content-Type: text/plain; name=unnamed
Content-Transfer-Encoding: 7bit
Content-Description: 


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



RE: How to turn-off the replication?

2004-03-23 Thread Sam Yathira
That was quick!
I am trying to turn it off from master.
--Sam


-Original Message-
From: Victor Pendleton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 23, 2004 12:34 PM
To: Sam Yathira; [EMAIL PROTECTED]
Subject: Re: How to turn-off the replication?

Are you wanting to turn off replication from the master or the slave?

On Tue, 23 Mar 2004, Sam Yathira wrote:
 

Content-Type: multipart/alternative; name=unnamed
Content-Transfer-Encoding: 7bit
Content-Description: 



Content-Type: text/plain; name=InterScan_Disclaimer.txt
Content-Transfer-Encoding: 7bit
Content-Description: 



Content-Type: text/plain; name=unnamed
Content-Transfer-Encoding: 7bit
Content-Description: 

This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  No confidentiality or privilege is 
waived or lost by any mistransmission. If you receive this message in error, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. Burlington Capital Markets and each of its subsidiaries each reserve the 
right to monitor all e-mail communications through its networks.  Any views expressed 
in this message are those of the individual sender, except where the message states 
otherwise and the sender is authorised to state them to be the views of any such 
entity.

Unless otherwise stated, any pricing information given in this message is indicative 
only, is subject to change and does not constitute an offer to deal at any price 
quoted.

Any reference to the terms of executed transactions should be treated as preliminary 
only and subject to our formal written confirmation.


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

Re: mysql:it's a db not a dbms... how it's possible?!

2004-03-23 Thread Emiliano

 It sounds like the client didn't crash, but the server did.  If mysqld
 crashed, then any MyISAM tables that were in use at the time of the
 crash would definitely need reparing.  If you want to ensure that
 crashes don't affect tables, use InnoDB or BDB tables instead.

the machine that crashed was a client during simple quering(select,update or
delete)... this is the problem...
can anybody assure me that it happens only in windows distribution or in
that release(MySQL 4.0.15-nt
)?
if it's a common problem mysql isn't a dbms... :)
Emiliano



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



Sorting with an alpha numeric field.

2004-03-23 Thread Jacque Scott
I need to create a query that will sort by a alpha numeric field.  I
need the ID field returned and one problem that I will face is that when
it sorts in alpha numeric the ID field will be out of sequence.  I will
use this ID field in another part of the program so I need to make sure
I get all of the ID.
 
Thanks,
 
Jacque


Re: mysql:it's a db not a dbms... how it's possible?!

2004-03-23 Thread Paul DuBois
At 18:37 +0100 3/23/04, Emiliano wrote:
  It sounds like the client didn't crash, but the server did.  If mysqld
 crashed, then any MyISAM tables that were in use at the time of the
 crash would definitely need reparing.  If you want to ensure that
 crashes don't affect tables, use InnoDB or BDB tables instead.
the machine that crashed was a client during simple quering(select,update or
delete)... this is the problem...
can anybody assure me that it happens only in windows distribution or in
that release(MySQL 4.0.15-nt
)?
if it's a common problem mysql isn't a dbms... :)
Emiliano


The current release for MySQL 4.0 is 4.0.18.  You might try upgrading to
see if the problem persists.  If it's a repeatable thing, then please report
it on our bugs page and provide the information needed to reproduce the
problem so that it can be fixed.  Thanks.
http://bugs.mysql.com/

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Mysql4.0 installation problems.

2004-03-23 Thread Naveen Babu

Hello,

I have been running mysql3.23 on FreeBSD server for a long time.Lately i decided to 
upgrade mysql3.23 to mysql4 using ports. So i first did make uninstall in 
usr/ports/databases/mysql323-client and mysql323-server. Than, from 
/usr/ports/databases/mysql40-server i gave make install command. mysql-client 
installed properly but mysql-server did not. I got the followling error:

shared library mysqlclient.12 is not found.

Goolging for this error did not help me much.Having had no success in installation, I 
uninstalled mysql-client again and from /usr/ports/databases/mysql40-server i gave 
make reinstall. This has worsten the situation. The installation process was going 
on going on and going on.. and i had to give ctrl-C to stop it. I guess it went on to 
some kind of loop. 

Now I am totally lost. Any help is greatly appreciated.

Thanks,

Naveen.


Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

Selecting a Column

2004-03-23 Thread Yoed Anis
Hi,

I have a table that looks like this:
CREATE TABLE inventory (
inventoryid int(11) NOT NULL,
sunday int(3),
monday int(3),
tuesday int(3),
wednesday int(3),
thursday int(3),
friday int(3),
saturday int(3),
PRIMARY KEY (inventoryid)
);

And I'm trying to run a command like 

SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1';

That doesn't return Tuesday, but the value in the column Tuesday, an
int of value 10.

I need something like
SELECT COLUMN(DAYNAME('2004-03-23')) FROM inventoryRoom WHERE
inventoryid='1';

But I don't know what command I'm looking for and all my searchs have
come up fruitless.
Plz CC this to my address if you reply.

Thanks,
Yoed 


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



Re: Sorting with an alpha numeric field.

2004-03-23 Thread Dan Nelson
In the last episode (Mar 23), Jacque Scott said:
 I need to create a query that will sort by a alpha numeric field.  I
 need the ID field returned and one problem that I will face is that when
 it sorts in alpha numeric the ID field will be out of sequence.  I will
 use this ID field in another part of the program so I need to make sure
 I get all of the ID.

If you mean that you have a number in a CHAR or other text field, just
do math on it to force mysql to convert it to a numeric type:

ORDER BY myfield+0

-- 
Dan Nelson
[EMAIL PROTECTED]

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



Re: Sorting with an alpha numeric field.

2004-03-23 Thread Jacque Scott
I have something like A001C, B689, B1001 etc...
 


 Dan Nelson [EMAIL PROTECTED] 3/23/2004 10:07:43 AM 
In the last episode (Mar 23), Jacque Scott said:
 I need to create a query that will sort by a alpha numeric field. I
 need the ID field returned and one problem that I will face is that
when
 it sorts in alpha numeric the ID field will be out of sequence. I
will
 use this ID field in another part of the program so I need to make
sure
 I get all of the ID.

If you mean that you have a number in a CHAR or other text field, just
do math on it to force mysql to convert it to a numeric type:

ORDER BY myfield+0

-- 
Dan Nelson
[EMAIL PROTECTED] 



RE: How to turn-off the replication?

2004-03-23 Thread Victor Pendleton
Remove log-updates option from the my.cnf file.
And remove the master info from the slaves.

On Tue, 23 Mar 2004, Sam Yathira wrote:
 
 That was quick!
 I am trying to turn it off from master.
 --Sam
 
 
 -Original Message-
 From: Victor Pendleton [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 23, 2004 12:34 PM
 To: Sam Yathira; [EMAIL PROTECTED]
 Subject: Re: How to turn-off the replication?
 
 Are you wanting to turn off replication from the master or the slave?
 
 On Tue, 23 Mar 2004, Sam Yathira wrote:
  
 
 Content-Type: multipart/alternative; name=unnamed
 Content-Transfer-Encoding: 7bit
 Content-Description: 
 
 
 
 Content-Type: text/plain; name=InterScan_Disclaimer.txt
 Content-Transfer-Encoding: 7bit
 Content-Description: 
 
 
 
 Content-Type: text/plain; name=unnamed
 Content-Transfer-Encoding: 7bit
 Content-Description: 
 
 
 


Content-Type: text/plain; name=InterScan_Disclaimer.txt
Content-Transfer-Encoding: 7bit
Content-Description: 


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



Re: Sorting with an alpha numeric field.

2004-03-23 Thread Garth Webb
On Tue, 2004-03-23 at 09:54, Jacque Scott wrote:
 I need to create a query that will sort by a alpha numeric field.  I
 need the ID field returned and one problem that I will face is that when
 it sorts in alpha numeric the ID field will be out of sequence.  I will
 use this ID field in another part of the program so I need to make sure
 I get all of the ID.

First, you cannot have your results sorted by two columns at the same
time.  Choose the ID field or the alphanumeric field.  Secondly, sorting
by an alpha numeric field will still give you all rows in the table; 
you will not lose data when you sort.

So what exactly is your question?  A question ans some examples of
things you have tried already would help.

-- 

 |- Garth Webb   -|
 |- [EMAIL PROTECTED] -|


signature.asc
Description: This is a digitally signed message part


--replicate* question

2004-03-23 Thread Chua Choon Keng
Dear all, 

I am new to mysql replication. I know how to use
the --replicate* options but I would like to know
whether the options act as filter on the master or
on the slave...

From the documentation, it says:
The --replicate-* rules are evaluated as follows
to determine whether a statement will be executed
by the slave or ignored

This gives me the impression that all update
queries are sent to slave, but if they are not
matched by the rules, they are ignored. In my case,
I am replicating a database with infrequent
updates, but they are many other databases on the
master with frequent updates etc. If my guess is
correct, then I am wasting a lot of bandwidth as my
master  slave are world apart...

Appreciate your kind reply. 

Thanks in advanced.

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: Sorting with an alpha numeric field.

2004-03-23 Thread Dan Nelson
In the last episode (Mar 23), Jacque Scott said:
 I have something like A001C, B689, B1001 etc...

Aah.  This question pops up about once a year, usually under the
subject of Natural Sorting.  There's no builtin function for doing
this, but one solution would be to write a UDF that finds runs of
numeric characters, and zero-pads them out to, say, 5 digits.  Then
using ORDER BY padnumbers(myfield), your three sample values will look
like

A1C
B00689
B01001

, and mysql will sort them right.

-- 
Dan Nelson
[EMAIL PROTECTED]

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



Trouble Starting DB - First Time Installer

2004-03-23 Thread John Brown
Hi,
I am a total linux and mysql newb, I am preparing this info as best as 
possible.  Below is the output from the mysqlbug utility.
I followed the directions for installing mysql  based on this page 
http://www.mysql.com/doc/en/Installing_binary.html

From: root
To: [EMAIL PROTECTED]
Subject: [50 character or so descriptive subject here (for reference)]
Description:
	trying to start DB,

[EMAIL PROTECTED] mysql]# bin/mysqld_safe --user=mysql 
[1] 8402
[EMAIL PROTECTED] mysql]# Starting mysqld daemon with databases from 
/var/lib/mysql
040323 11:00:07  mysqld ended

[1]+  Donebin/mysqld_safe --user=mysql
[EMAIL PROTECTED] mysql]#
I only get the last two lines after pressing Enter, otherwise the cursor 
simply blinks until I do.

I run this to test if the DB is up or not

[EMAIL PROTECTED] mysql]# bin/mysqladmin version
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' 
(2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
[EMAIL PROTECTED] mysql]#




How-To-Repeat:
	I can repeat it consistantly.  From what I can tell, I have never gotten 
the DB to start
Fix:
	I checked to see if the /tmp/mysql.sock file exists, and it does not.  I 
have been looking through the documentation on how to create the file, but 
have failed to find anything (which doesnt mean it isnt there somewhere)  I 
may have other problems, but I figure getting this file where it is supposed 
to be will be a good start.  I have gone through the installation process 
two times now with the same results.

thank you


Submitter-Id:   submitter ID
Originator: root
Organization:
organization of PR author (multiple lines)
MySQL support: [none | licence | email support | extended email support ]
Synopsis:   synopsis of the problem (one line)
Severity:   [ non-critical | serious | critical ] (one line)
Priority:   [ low | medium | high ] (one line)
Category:   mysql
Class:  [ sw-bug | doc-bug | change-request | support ] (one line)
Release:mysql-3.23.58 (Source distribution)

Environment:
	machine, os, target, libraries (multiple lines)
System: Linux rhfury 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 
i386 GNU/Linux
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --with-system-zlib --enable-__cxa_atexit 
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
Compilation info: CC='i386-redhat-linux-gcc'  CFLAGS='-O2 -g -pipe 
-march=i386 -mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE'  CXX='i386-redhat-linux-g++'  CXXFLAGS='-O2 -g -pipe 
-march=i386 -mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -fno-rtti -fno-exceptions'  LDFLAGS=''
LIBC:
lrwxr-xr-x1 root root   13 Feb 14 22:39 /lib/libc.so.6 - 
libc-2.3.2.so
-rwxr-xr-x1 root root  1564956 Oct  2 17:51 /lib/libc-2.3.2.so
-rw-r--r--1 root root  2461044 Oct  2 15:43 /usr/lib/libc.a
-rw-r--r--1 root root  204 Oct  2 15:21 /usr/lib/libc.so
Configure command: ./configure '--host=i386-redhat-linux' 
'--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' 
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' 
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' 
'--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' 
'--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' 
'--infodir=/usr/share/info' '--without-readline' '--without-debug' 
'--enable-shared' '--with-extra-charsets=complex' '--with-bench' 
'--localstatedir=/var/lib/mysql' 
'--with-unix-socket-path=/var/lib/mysql/mysql.sock' 
'--with-mysqld-user=mysql' '--with-extra-charsets=all' '--with-innodb' 
'--enable-local-infile' '--enable-large-files=yes' '--enable-largefile=yes' 
'--with-berkeley-db-includes=/usr/include' 
'--with-berkeley-db-libs=/usr/lib' '--enable-thread-safe-client' 'CFLAGS=-O2 
-g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE' 'CXXFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-rtti 
-fno-exceptions' 'build_alias=i386-redhat-linux' 
'host_alias=i386-redhat-linux' 'target_alias=i386-redhat-linux-gnu'SEND-PR: 
-*- send-pr -*-
-D_LARGEFILE_SOURCE' 'CXXFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-rtti 
-fno-exceptions' 'build_alias=i386-redhat-linux' 
'host_alias=i386-redhat-linux' 'target_alias=i386-redhat-linux-gnu'

_
Free up your inbox 

Strings and variables in select statements

2004-03-23 Thread Annie Law
Hi,
 
I would appreciate help with the following.  
I have a table where each of the values in a column consists of a
combination of letters and numbers followed by a decimal then a single digit.
Examples of the two types of entries that could be found in this column(accession_num)
are:
BQ877252.1
AA3588976.2
and possibly
T84780
The entries above are found in a table called hs_identifiers.
The hs_identifiers table has two columns accession_num and hs_id_num.
 
Given an accession_num I want to be able to look up in the hs_identifiers table to 
look up for the corresponding hs_id_num.
 
This would be a simple select statement for example
Select hs_identifiers.hs_id_num from hs_identifiers,
where (accession_num = (result of another select statement)._)
or (accession_num=(result of another select statement));
 
The only thing is I am not sure what the syntax is for 
the part (accession_num = (result of another select statement)._)
 
In the section (result of another select statement)._)  I am trying to 
say the result concatenated with a period concatenated with one wild card character.
For example: result of another select statement = BQ877252
period is '.'
and wild card character 1,2,3, etc.
The whole string concatenated together would be BQ877252.1
 
thanks,
Annie.
 
 



-
Post your free ad now! Yahoo! Canada Personals


Max Open Tables

2004-03-23 Thread Jim Richardson
I am trying to push the performance of a Mysql database a little more,
it's pretty busy, but I hope to squeeze a tad more out of it. 

I am a newbie/pretty clueless wrt MySQL in general, so ...

I run the status command, and see the following. 

mysql  Ver 12.20 Distrib 4.0.13, for pc-linux (i686)

Connection id:  27840031
Current database:
Current user:   [EMAIL PROTECTED]
SSL:Not in use
Current pager:  stdout
Using outfile:  ''
Server version: 4.0.13-log
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/var/lib/mysql/mysql.sock
Uptime: 4 days 14 hours 26 min 56 sec
Threads: 161  Questions: 128065100  Slow queries: 0  Opens: 657  Flush
tables: 1  Open tables: 512  Queries per second avg: 322.082


The value for Open Tables is 512, which looks suspiciously to me like
it's hit a limit. Is there a way to increase that limit? Or am I
misunderstanding what status is telling me? 

--
Jim Richardson http://www.eskimo.com/~warlock
Ahhh... I see the fuck-up fairy has visited us again.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Sorting with an alpha numeric field.

2004-03-23 Thread Jacque Scott
I will give that a try.
 
Thank you

 Dan Nelson [EMAIL PROTECTED] 3/23/2004 11:31:50 AM 
In the last episode (Mar 23), Jacque Scott said:
 I have something like A001C, B689, B1001 etc...

Aah. This question pops up about once a year, usually under the
subject of Natural Sorting. There's no builtin function for doing
this, but one solution would be to write a UDF that finds runs of
numeric characters, and zero-pads them out to, say, 5 digits. Then
using ORDER BY padnumbers(myfield), your three sample values will look
like

A1C
B00689
B01001

, and mysql will sort them right.

-- 
Dan Nelson
[EMAIL PROTECTED] 



RE: Sorting with an alpha numeric field.

2004-03-23 Thread Erich Beyrent
 I have something like A001C, B689, B1001 etc...

I had to do something like this, and someone suggested the following:

order by 
case 
  when substring(YourField,1,1) between '0' and '9' 
  then ''
  when substring(YourField,2,1) between '0' and '9' 
  then left(YourField,1)
  when substring(YourField,3,1) between '0' and '9' 
  then left(YourField,2)
  ...
  else 'Z'
end
, cast(
case 
  when substring(YourField,1,1) between '0' and '9' 
  then substring(YourField,1)
  when substring(YourField,2,1) between '0' and '9' 
  then concat('0',substring(YourField,2))
  when substring(YourField,3,1) between '0' and '9' 
  then concat('00',substring(YourField,3))
  ...
  else 9
end
  as integer)  


I never was able to get it to work the way I wanted though...  Perhaps
it will trigger some ideas from the talented people on this list.

HTH

-Erich-



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



Re: Max Open Tables

2004-03-23 Thread Jim Richardson
On Tue, Mar 23, 2004 at 11:34:13AM -0800, Jim Richardson wrote:
I am trying to push the performance of a Mysql database a little more,
it's pretty busy, but I hope to squeeze a tad more out of it. 

I am a newbie/pretty clueless wrt MySQL in general, so ...

I run the status command, and see the following. 

mysql  Ver 12.20 Distrib 4.0.13, for pc-linux (i686)

Connection id:  27840031
Current database:
Current user:   [EMAIL PROTECTED]
SSL:Not in use
Current pager:  stdout
Using outfile:  ''
Server version: 4.0.13-log
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/var/lib/mysql/mysql.sock
Uptime: 4 days 14 hours 26 min 56 sec
Threads: 161  Questions: 128065100  Slow queries: 0  Opens: 657  Flush
tables: 1  Open tables: 512  Queries per second avg: 322.082


The value for Open Tables is 512, which looks suspiciously to me like
it's hit a limit. Is there a way to increase that limit? Or am I
misunderstanding what status is telling me? 



I have partially answered my own question, the Open Tables number looks
like a limit, but I am not sure I am hitting it. 

Some digging around has shown that one table of the database in question
on this machine, is getting beaucoup writes, about 10 mil/day. It is a
MyISAM table, and locking for the writes may be the bottleneck. 

So my question is, how can I improve this? any suggestions of things to
try, or paths to take? 

--
Jim Richardson http://www.eskimo.com/~warlock
Nothing says loser like nymshifter.
chrisv in C.O.L.A


signature.asc
Description: Digital signature


Re: Trouble Starting DB - First Time Installer

2004-03-23 Thread Egor Egorov
John Brown [EMAIL PROTECTED] wrote:
 Hi,
 I am a total linux and mysql newb, I am preparing this info as best as 
 possible.  Below is the output from the mysqlbug utility.
 I followed the directions for installing mysql  based on this page 
 http://www.mysql.com/doc/en/Installing_binary.html
 
 
 From: root
 To: [EMAIL PROTECTED]
 Subject: [50 character or so descriptive subject here (for reference)]
 
Description:
trying to start DB,
 
 [EMAIL PROTECTED] mysql]# bin/mysqld_safe --user=mysql 
 [1] 8402
 [EMAIL PROTECTED] mysql]# Starting mysqld daemon with databases from 
 /var/lib/mysql
 040323 11:00:07  mysqld ended
 
 
 [1]+  Donebin/mysqld_safe --user=mysql
 [EMAIL PROTECTED] mysql]#
 
 I only get the last two lines after pressing Enter, otherwise the cursor 
 simply blinks until I do.
 
 I run this to test if the DB is up or not
 
 [EMAIL PROTECTED] mysql]# bin/mysqladmin version
 bin/mysqladmin: connect to server at 'localhost' failed
 error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' 
 (2)'
 Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
 [EMAIL PROTECTED] mysql]#
 
How-To-Repeat:
I can repeat it consistantly.  From what I can tell, I have never gotten 
 the DB to start
Fix:
I checked to see if the /tmp/mysql.sock file exists, and it does not.  I 
 have been looking through the documentation on how to create the file, but 
 have failed to find anything (which doesnt mean it isnt there somewhere)  I 
 may have other problems, but I figure getting this file where it is supposed 
 to be will be a good start.  I have gone through the installation process 
 two times now with the same results.
 

Is there any error message in the error log file (/var/lib/mysql/host_name.err)?



-- 
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: --replicate* question

2004-03-23 Thread Egor Egorov
Chua Choon Keng [EMAIL PROTECTED] wrote:
 Dear all, 
 
 I am new to mysql replication. I know how to use
 the --replicate* options but I would like to know
 whether the options act as filter on the master or
 on the slave...

On the slave.

 
 From the documentation, it says:
 The --replicate-* rules are evaluated as follows
 to determine whether a statement will be executed
 by the slave or ignored
 
 This gives me the impression that all update
 queries are sent to slave, but if they are not
 matched by the rules, they are ignored. In my case,
 I am replicating a database with infrequent
 updates, but they are many other databases on the
 master with frequent updates etc. If my guess is
 correct, then I am wasting a lot of bandwidth as my
 master  slave are world apart...
 

What about using binlog-do-db=database_name option? In this case only updates will be 
logged if the current database is database_name:
http://www.mysql.com/doc/en/Binary_log.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: Trouble Starting DB - First Time Installer

2004-03-23 Thread John Brown
There is not a file with that name in
/var/lib/mysql/
or
/var/lib/mysql/mysql

From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Trouble Starting DB - First Time Installer
Date: Tue, 23 Mar 2004 22:15:22 +0200
John Brown [EMAIL PROTECTED] wrote:
 Hi,
 I am a total linux and mysql newb, I am preparing this info as best as
 possible.  Below is the output from the mysqlbug utility.
 I followed the directions for installing mysql  based on this page
 http://www.mysql.com/doc/en/Installing_binary.html


 From: root
 To: [EMAIL PROTECTED]
 Subject: [50 character or so descriptive subject here (for reference)]

Description:
trying to start DB,

 [EMAIL PROTECTED] mysql]# bin/mysqld_safe --user=mysql 
 [1] 8402
 [EMAIL PROTECTED] mysql]# Starting mysqld daemon with databases from
 /var/lib/mysql
 040323 11:00:07  mysqld ended


 [1]+  Donebin/mysqld_safe --user=mysql
 [EMAIL PROTECTED] mysql]#

 I only get the last two lines after pressing Enter, otherwise the cursor
 simply blinks until I do.

 I run this to test if the DB is up or not

 [EMAIL PROTECTED] mysql]# bin/mysqladmin version
 bin/mysqladmin: connect to server at 'localhost' failed
 error: 'Can't connect to local MySQL server through socket 
'/tmp/mysql.sock'
 (2)'
 Check that mysqld is running and that the socket: '/tmp/mysql.sock' 
exists!
 [EMAIL PROTECTED] mysql]#

How-To-Repeat:
I can repeat it consistantly.  From what I can tell, I have never 
gotten
 the DB to start
Fix:
I checked to see if the /tmp/mysql.sock file exists, and it does 
not.  I
 have been looking through the documentation on how to create the file, 
but
 have failed to find anything (which doesnt mean it isnt there somewhere) 
 I
 may have other problems, but I figure getting this file where it is 
supposed
 to be will be a good start.  I have gone through the installation 
process
 two times now with the same results.


Is there any error message in the error log file 
(/var/lib/mysql/host_name.err)?



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

_
Get tax tips, tools and access to IRS forms – all in one place at MSN Money! 
http://moneycentral.msn.com/tax/home.asp

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


innodb_buffer_pool_size limit

2004-03-23 Thread Keith Thompson
Is there a limit on what innodb_buffer_pool_size can be set in 4.0.17
(64-bit Solaris 9)?

I tried setting it to 4G in my.cnf and SHOW VARIABLES says it's 0.

-keith



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



Re: PHP script cannot connect MySQL server

2004-03-23 Thread Sami Maisniemi
On Tuesday 23 March 2004 02:15, [EMAIL PROTECTED] wrote:
  tcp0  0 *:3307  *:*
  LISTEN
 
 It seems that the correct socket is used. Here is the output:
 
 unix  2  [ ACC ] STREAM LISTENING 3303   private/relay
 unix  2  [ ACC ] STREAM LISTENING 3307   public/showq

  Looks like 3307 is indeed open, so you may want to modify your
 mysql_connect to use localhost:3307 - since that is likely to be the
 port mysqld is using based upon this output.  The default is usually
 3306, so if you do not include the :3307 port reference you may very
 well not be able to connect.
 Brad Eacker ([EMAIL PROTECTED])

I tried to connect to socket #3307 as follows:

$link = mysql_connect(localhost:3307, root, passwd);

but without any changes. Hmmm ... I did not expect this to be so hard.

Regards Sami


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



Interfaces to 5.0.0

2004-03-23 Thread Gordon
A few weeks ago I download the windows version for 5.0.0 and installed
it on my machine. After successfully installing the new version I was
able to connect with all of my old tools including MyCC 0.9.3,
MySQLFront, SQLyog, cmd and MySQL Administrator. 

Yesterday I downloaded the 5.0.0 RPM's for linux and only cmd and the
9.0.4 version of MyCC. 

Is the interface different on the linux verion vs the windows version?
Is there some setting I can use to allow the old {and current MySQL
Administrator} to connect?



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



RE: Can't Start Deamon - Installed MySQL 4.0.15 using YaST ( SuSE 9.0 Pro)

2004-03-23 Thread Odom, Duwayne
You need to install the default databases.

-Original Message-
From: Kevin Carpenter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 11:32 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Can't Start Deamon - Installed MySQL 4.0.15 using YaST (
SuSE 9.0 Pro)


James,

I try to start it at the command line using - mysql, mysqld, mysqld_safe - I've tried 
it as root and non-root.

Yes, I get errors - they were listed in my origional post - I don't have then handy 
now.

-

I tired mysqld_safe, as you suggested, it bombed but the good thing is it wrote to the 
mysqld.log.

Here's what it said:

040323 11:14:34  mysqld started
040323 11:14:37  InnoDB: Started
040323 11:14:37  Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't 
exist
040323 11:14:37  Aborting

040323 11:14:37  InnoDB: Starting shutdown...
040323 11:14:40  InnoDB: Shutdown completed
040323 11:14:40  /usr/sbin/mysqld-max: Shutdown Complete

040323 11:14:40  mysqld ended

---

What do you think?

   -:Kevin




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


The information contained in this e-mail message may be privileged, confidential, and 
protected from disclosure.  If you are not the intended recipient, any further 
disclosure, use, dissemination, distribution, or copying of this message or any 
attachment is strictly prohibited.  Unauthorized interception or disclosure of this 
e-mail violates federal criminal law.  If you think that you have received this e-mail 
message in error, please delete it and notify the sender immediately.




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



SHOW_DATABASES / safe-show-database question

2004-03-23 Thread Robert Montgomery
I recently upgraded to mysql 4.0.18.  In the past you
could set the option safe-show-databases and that
allowed users to list databases, but only those they
have permissions to see. It seems that this 4.0.18
will only allow users to see ALL databases, or NO
databases, depending on the SHOW_DATABASES field in
the mysql.user table.

Is there any way to allow users to list ONLY the
databases they have permissions on?

THANKS for any feedback!
Rob


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: PHP script cannot connect MySQL server

2004-03-23 Thread jeffrey_n_Dyke


n Tuesday 23 March 2004 02:15, [EMAIL PROTECTED] wrote:
  tcp0  0 *:3307  *:*
  LISTEN
 
 It seems that the correct socket is used. Here is the output:
 
 unix  2  [ ACC ] STREAM LISTENING 3303   private/relay
 unix  2  [ ACC ] STREAM LISTENING 3307   public/showq

  Looks like 3307 is indeed open, so you may want to modify your
 mysql_connect to use localhost:3307 - since that is likely to be the
 port mysqld is using based upon this output.  The default is usually
 3306, so if you do not include the :3307 port reference you may very
 well not be able to connect.
 Brad Eacker ([EMAIL PROTECTED])

I tried to connect to socket #3307 as follows:

$link = mysql_connect(localhost:3307, root, passwd);

but without any changes. Hmmm ... I did not expect this to be so hard.

--
I've lost track of this thread so sorry if this is no longer valid...
Have you read http://www.mysql.com/doc/en/Multiple_servers.html?

Its not as simple as just specying a port, i don't think, you'll need to
make sure mysql in using a different socket file on start up if you want to
connect to an additional/different port.  I set two up once..one on 3.x and
one on 4.0x, and specifying the socket file/listen port was the magic combo
for me.(2 years ago now, so my memory may not be serving me well)

Does this already work on 3306 for you?

Again, sorry if this is no longer valid or redundant.

Jeff
___

Regards Sami


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



Quick mysql question

2004-03-23 Thread ryan

Hi,

A quick question, which is the most stable version of mysql to run on a very busy and 
commercial website(s)?

4.0 or is 4.1 stable enough?

Thanks,
-R.A



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



Re: Quick mysql question

2004-03-23 Thread dan
4.1 seems stable enough, been running it since it was released.
in production, busy, commercial, enterprise environment.
plus it fixes some bugs in 4.0 and adds some (could be potentially)
necessary functions

Dan.

On Tue, 23 Mar 2004 [EMAIL PROTECTED] wrote:

 
 Hi,
 
 A quick question, which is the most stable version of mysql to run on a very busy 
 and commercial website(s)?
 
 4.0 or is 4.1 stable enough?
 
 Thanks,
 -R.A
 
 
 
 -- 
 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: Trouble Starting DB - First Time Installer

2004-03-23 Thread John Brown
the mysql group has every permission possible for that directory,
and I installed the binary, not rpm.  To be honest, i dont know the 
difference, so I went back and looked at the dl path I took I saw the 
difference in file names for rpm and binary, my file ended it .tar.gz



From: J.R. Bullington [EMAIL PROTECTED]
To: 'John Brown' [EMAIL PROTECTED]
Subject: RE: Trouble Starting DB - First Time Installer
Date: Tue, 23 Mar 2004 18:29:00 -0500
Try /var/lib/mysql/data

This is most likely a permissions issue. Make sure that the mysql user and
group have Ownership (read, write, execute, search) to /var/lib/mysql.
This might also be because you installed the RPM instead of the binary. 
Just
a thought.

J.R.

_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: Trouble Starting DB - First Time Installer

2004-03-23 Thread J.R. Bullington
That's weird, since I have only seen the RPM install the databases into
/var/lib/mysql, while the binaries install into /usr/local/mysql

Did you find the hostname.err file in /var/lib/mysql/data?

J.R.


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



Re: High resolution timestamps

2004-03-23 Thread Joshua J. Kugler
You can get millisecond resolution in MySQL 4.1. Considering most systems 
don't even support *true* millisecond resolution, I don't think you're going 
to find anything that supports microsecond resolution.

j- k-

On Tuesday 23 March 2004 07:18 am, Leon Brocard wrote:
 Hello,

 Recently I've been needing high-resolution timestamps
 (year/month/day/hour/minute/seconds/microseconds) in MySQL (to store
 network packets, mmm). Is this a planned feature for MySQL in the
 future?

-- 
Joshua J. Kugler
Fairbanks, Alaska
Computer Consultant--Systems Designer
.--- --- ...  ..- .--.- ..- --. .-.. . .-.
[EMAIL PROTECTED]
ICQ#:13706295
Every knee shall bow, and every tongue confess, in heaven, on earth, and under 
the earth, that Jesus Christ is LORD -- Count on it!


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



Re: PHP script cannot connect MySQL server

2004-03-23 Thread beacker
Sami Maisniemi [EMAIL PROTECTED] writes:
 It seems that the correct socket is used. Here is the output:
 
 unix  2  [ ACC ] STREAM LISTENING 3303   private/relay
 unix  2  [ ACC ] STREAM LISTENING 3307   public/showq
...
I tried to connect to socket #3307 as follows:

$link = mysql_connect(localhost:3307, root, passwd);

Sami,
 Could you verify that you can connect with mysql via

mysql -h localhost -P 3307

If we have identified the proper host/port you should receive the standard
'mysql ' prompt.
   Brad Eacker ([EMAIL PROTECTED])



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



RE: Trouble Starting DB - First Time Installer

2004-03-23 Thread John Brown
i have mysql folders in both those paths you mention.  I can not find a file 
with the .err extension at all.
I did a third re-install of mysql, deleting everything first... including 
the directories in var/lib/mysql ( I didnt even know those were there until 
the other respondant mentioned that path for the .err file).
after install, those directories are not there, only the usr/local/mysql 
directories.  Still same error however.

this is a non production server, I am going to reinstall OS from scratch and 
pay more attention to what is getting installed along with OS (enterprise 
edition of Redhat, so there is a lot of stuff).  I am wondering if perhaps a 
very of mysql was installed during the OS install and is causing some sort 
of conflict.

I will re-post if I continue to have the same problem after a new OS install

thanks



From: J.R. Bullington [EMAIL PROTECTED]
To: mysql [EMAIL PROTECTED]
Subject: RE: Trouble Starting DB - First Time Installer
Date: Tue, 23 Mar 2004 19:23:29 -0500
That's weird, since I have only seen the RPM install the databases into
/var/lib/mysql, while the binaries install into /usr/local/mysql
Did you find the hostname.err file in /var/lib/mysql/data?

J.R.

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

_
All the action. All the drama. Get NCAA hoops coverage at MSN Sports by 
ESPN. http://msn.espn.go.com/index.html?partnersite=espn

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


Re: Strings and variables in select statements

2004-03-23 Thread Ligaya Turmelle
I'm a beginner so don't quote me.  I beleive you need something like:

Select hs_identifiers.hs_id_num from hs_identifiers,
where (accession_num LIKE (result of another select statement)%);

I beleive that should give you the first part and if there is anything after
it.

Respectfully,
Ligaya Turmelle



Annie Law [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I would appreciate help with the following.
 I have a table where each of the values in a column consists of a
 combination of letters and numbers followed by a decimal then a single
digit.
 Examples of the two types of entries that could be found in this
column(accession_num)
 are:
 BQ877252.1
 AA3588976.2
 and possibly
 T84780
 The entries above are found in a table called hs_identifiers.
 The hs_identifiers table has two columns accession_num and hs_id_num.

 Given an accession_num I want to be able to look up in the hs_identifiers
table to look up for the corresponding hs_id_num.

 This would be a simple select statement for example
 Select hs_identifiers.hs_id_num from hs_identifiers,
 where (accession_num = (result of another select statement)._)
 or (accession_num=(result of another select statement));

 The only thing is I am not sure what the syntax is for
 the part (accession_num = (result of another select statement)._)

 In the section (result of another select statement)._)  I am trying to
 say the result concatenated with a period concatenated with one wild card
character.
 For example: result of another select statement = BQ877252
 period is '.'
 and wild card character 1,2,3, etc.
 The whole string concatenated together would be BQ877252.1

 thanks,
 Annie.





 -
 Post your free ad now! Yahoo! Canada Personals




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



Re: Selecting a Column

2004-03-23 Thread Ligaya Turmelle
So what are you asking?  I'm confused.  Are you asking just to get
'Tuesday'? (SELECT DAYNAME('2004-03-23');)  The value of Tuesday where
inventoryid = 1? (SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE
inventoryid='1'; which you already had.)  Or all the values in Tuesday?
(SELECT DAYNAME('2004-03-23') FROM inventoryRoom;)  Please clarify.

Respectfully,
Ligaya Turmelle


Yoed Anis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I have a table that looks like this:
 CREATE TABLE inventory (
 inventoryid int(11) NOT NULL,
 sunday int(3),
 monday int(3),
 tuesday int(3),
 wednesday int(3),
 thursday int(3),
 friday int(3),
 saturday int(3),
 PRIMARY KEY (inventoryid)
 );

 And I'm trying to run a command like

 SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1';

 That doesn't return Tuesday, but the value in the column Tuesday, an
 int of value 10.

 I need something like
 SELECT COLUMN(DAYNAME('2004-03-23')) FROM inventoryRoom WHERE
 inventoryid='1';

 But I don't know what command I'm looking for and all my searchs have
 come up fruitless.
 Plz CC this to my address if you reply.

 Thanks,
 Yoed




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



Re: sql question

2004-03-23 Thread Ligaya Turmelle
Maybe something like:

Select LIKE pkg_name%, LIKE site_%, version from table group by LIKE
pkg_name% , LIKE site_%;

but I'm still a beginner.

Respectfully,
Ligaya Turmelle

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello all,

 I've a table like this :

 site_1  pkg_name_1  version
 site_1  pkg_name_2  version
 site_1  pkg_name_3  version
 ...
 site_1  pkg_name_n  version
 site_2  pkg_name_1  version
 site_2  pkg_name_2  version
 ...
 site_2  pkg_name_n  version
 ...
 site_n  pkg_name_1  version
 ...
 site_n  pkg_name_n  version


 And i would like to make a sql statement to obtain a result like this ;

 |pkg| site_1  | site_2  | site_3   ... site_n
 |--
 |pkg_name_1 | version | version | version  ... version
 |pkg_name_2 | version | version | version  ... version
 |pkg_name_3 | version | version | version  ... version
 |...
 |pkg_name_n | version | version | version  ... version


 I really don't know how to write this sql request, even if there is one
way
 to do it...
 I still hope someone will have an idea.

 Thank's for you help

 --
 Vincent





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



MySQL Users Conference: New mailing list for those interested in the event

2004-03-23 Thread Zak Greant
Greetings All!

We have setting up a mailing list for people who are interested in the 
MySQL Users Conference (http://mysql.com/events/uc2004/)

If you are attending, planning to attend or want to know more about the 
event, we urge you to join this list by visiting 
http://lists.mysql.com/list.php?list=users-conferencesub=1 or by 
sending mail to [EMAIL PROTECTED]
--
Zak Greant
MySQL AB Community Advocate
MySQL User Conference Cat Herder

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


Re: Quick mysql question

2004-03-23 Thread Lokesh
[EMAIL PROTECTED] wrote:

Hi,

A quick question, which is the most stable version of mysql to run on a very busy and commercial website(s)?

4.0 or is 4.1 stable enough?

Thanks,
-R.A

4.0 is a released and stable version.
4.1 is a developement version which is alpha, but quite stable :)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Interfaces to 5.0.0

2004-03-23 Thread Lokesh
Gordon wrote:

A few weeks ago I download the windows version for 5.0.0 and installed
it on my machine. After successfully installing the new version I was
able to connect with all of my old tools including MyCC 0.9.3,
MySQLFront, SQLyog, cmd and MySQL Administrator. 

Yesterday I downloaded the 5.0.0 RPM's for linux and only cmd and the
9.0.4 version of MyCC. 

Is the interface different on the linux verion vs the windows version?
Is there some setting I can use to allow the old {and current MySQL
Administrator} to connect?

If you have upgraded from MySQL-3.x or MySQL 4.0; you surely need to 
concern about compatibility issues. Because of change in authentication 
mechanism, old clients (pre-4.1) can't talk to MySQL-5.0.0 servers.

Refer to http://www.mysql.com/doc/en/Upgrade.html, which lists the tasks 
and how to plan for upgrade

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


Problem Query EXISTS and IN

2004-03-23 Thread webmaster
Hi

(Sorry by my english, i speak spanish)

I have problem with a Query.

It does not recognize EXISTS nor IN nor NOT IN

My version is MySQL 4.0.11a-gamma

But I do not know if it recognizes those clauses.

I have dealed with the two forms:

1.  SELECT usu_id FROM usuario WHERE NOT EXISTS (SELECT * FROM grupo WHERE
usuario.g_id=grupo.g_id AND grupo.g_id  5)

2.  SELECT usu_id FROM usuario WHERE g_id NOT IN (SELECT g_id FROM grupo WHERE
grupo.g_id  5)


Thanks by your help.

Juan


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



Primary keys

2004-03-23 Thread JOHN MEYER
Is there a way to do a SQL Select and get a record without specifying the 
primary key.  Example.  I have two tables CANDLE and VOTIVES.  Can I define 
a select that says SELECT * FROM TABLE WHERE PRIMARY_KEY=...

John Meyer

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.com/go/onm00200415ave/direct/01/

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


Re: If DataBase Exists

2004-03-23 Thread Terence
This works on 4.1.1, not sure if it works on 4.0.14:

show databases like '%backups%'


- Original Message - 
From: A Z [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 12:33 AM
Subject: If DataBase Exists




MySQL 4.0.14

Possible to query for existence of a DB.  For example
connect to MySQL and run run a command to check if
Database (Test2) existed.

regards






___
Yahoo! Messenger - Communicate instantly...Ping 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

-- 
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: --replicate* question

2004-03-23 Thread Chua Choon Keng
 What about using binlog-do-db=database_name
option? In this case only updates will be logged if
the current database is database_name

What if I only wish to replicate a few tables of a
database? Using binlog-do-db=database_name does
limit to this particular database but there is no
binlog-ignore-table option that I can use... Is
there a workaround?

Many thanks.

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



Re: Problem Query EXISTS and IN

2004-03-23 Thread Michael Stassen
[EMAIL PROTECTED] wrote:
Hi

(Sorry by my english, i speak spanish)

I have problem with a Query.

It does not recognize EXISTS nor IN nor NOT IN

My version is MySQL 4.0.11a-gamma

But I do not know if it recognizes those clauses.

I have dealed with the two forms:

1.  SELECT usu_id FROM usuario WHERE NOT EXISTS (SELECT * FROM grupo WHERE
usuario.g_id=grupo.g_id AND grupo.g_id  5)
2.  SELECT usu_id FROM usuario WHERE g_id NOT IN (SELECT g_id FROM grupo WHERE
grupo.g_id  5)
Thanks by your help.

Juan
MySQL understands IN and NOT IN.  The problem is that you need at least 
mysql 4.1.x for subqueries, and thus for EXISTS.  You can, however, rewrite 
your queries to use a JOIN instead of a subquery -- something like this:

  SELECT usu_id
  FROM usuario
  LEFT JOIN grupo
  ON usuario.g_id=grupo.g_id AND grupo.g_id  5
  WHERE grupo.g_id IS NULL;
See the manual for more

  http://www.mysql.com/doc/en/Rewriting_subqueries.html

Michael

P.S.  No need to apologize -- your English is much better than my Spanish.

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


RE: Strings and variables in select statements

2004-03-23 Thread tweewan.wong
To date, my understanding is that mysql do not support sub-query.

My suggestion will be by using 2 sql statement.

The first statement will select value from the reference table. 
The value retrieve from first statement can be used to construct the second
statement.

Your first sql will be like :
a) Select a_col, b_col from table_a

Your second sql will be like 
b) select * from table_b where table_b.fk_col in ( value_a_col1,
value_a_col2, value_a_col3,...)

hope above help.



-Original Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED] 
Sent: 24 March 2004 09:25
To: [EMAIL PROTECTED]
Subject: Re: Strings and variables in select statements

I'm a beginner so don't quote me.  I beleive you need something like:

Select hs_identifiers.hs_id_num from hs_identifiers,
where (accession_num LIKE (result of another select statement)%);

I beleive that should give you the first part and if there is anything after
it.

Respectfully,
Ligaya Turmelle



Annie Law [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I would appreciate help with the following.
 I have a table where each of the values in a column consists of a
 combination of letters and numbers followed by a decimal then a single
digit.
 Examples of the two types of entries that could be found in this
column(accession_num)
 are:
 BQ877252.1
 AA3588976.2
 and possibly
 T84780
 The entries above are found in a table called hs_identifiers.
 The hs_identifiers table has two columns accession_num and hs_id_num.

 Given an accession_num I want to be able to look up in the hs_identifiers
table to look up for the corresponding hs_id_num.

 This would be a simple select statement for example
 Select hs_identifiers.hs_id_num from hs_identifiers,
 where (accession_num = (result of another select statement)._)
 or (accession_num=(result of another select statement));

 The only thing is I am not sure what the syntax is for
 the part (accession_num = (result of another select statement)._)

 In the section (result of another select statement)._)  I am trying to
 say the result concatenated with a period concatenated with one wild card
character.
 For example: result of another select statement = BQ877252
 period is '.'
 and wild card character 1,2,3, etc.
 The whole string concatenated together would be BQ877252.1

 thanks,
 Annie.





 -
 Post your free ad now! Yahoo! Canada Personals




-- 
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: Selecting a Column

2004-03-23 Thread tweewan.wong
Not sure why you don't get Tuesday. At my place ( I am using 5.1 beta
version). It did return Tuesday for this statement SELECT
DAYNAME('2004-03-23').

Anyway, I can get similar output by using 
select  date_format('2004-3-23','%W').



-Original Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED] 
Sent: 24 March 2004 09:33
To: [EMAIL PROTECTED]
Subject: Re: Selecting a Column

So what are you asking?  I'm confused.  Are you asking just to get
'Tuesday'? (SELECT DAYNAME('2004-03-23');)  The value of Tuesday where
inventoryid = 1? (SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE
inventoryid='1'; which you already had.)  Or all the values in Tuesday?
(SELECT DAYNAME('2004-03-23') FROM inventoryRoom;)  Please clarify.

Respectfully,
Ligaya Turmelle


Yoed Anis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I have a table that looks like this:
 CREATE TABLE inventory (
 inventoryid int(11) NOT NULL,
 sunday int(3),
 monday int(3),
 tuesday int(3),
 wednesday int(3),
 thursday int(3),
 friday int(3),
 saturday int(3),
 PRIMARY KEY (inventoryid)
 );

 And I'm trying to run a command like

 SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1';

 That doesn't return Tuesday, but the value in the column Tuesday, an
 int of value 10.

 I need something like
 SELECT COLUMN(DAYNAME('2004-03-23')) FROM inventoryRoom WHERE
 inventoryid='1';

 But I don't know what command I'm looking for and all my searchs have
 come up fruitless.
 Plz CC this to my address if you reply.

 Thanks,
 Yoed




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




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



Please help with this: ERROR 1047: Unknown command

2004-03-23 Thread Hiep Ho
Hello

 

Any help would be appreciated.

 

i have problem adding user to mysql. I can create a database and there is no
problem however I got this ERROR 1047: Unknown command when I tried to add
new user. I don't think I have this problem before. 

 

I run this command 

 

GRANT ALL ON *.* TO usename IDENTIFIED BY 'password' ;

 

All I got is this ERROR 1047: Unknown command

 

Thanks,

 

Hiep 



Newbie - dependencies Same problem --Plz giv the solution !!

2004-03-23 Thread rajesh k
Hi Robert / Victor /. !

Tried your method and got:

error : Failed dependencies 
 MySQL-server conflicts with
mysql-server-3.23.54a-11
 mysql conflicts with mysql-3.23.54a-11

rpm -i mysql-server-3.23.58-1.i386.rpm
  error:Failed dependencies:
  libmysqlclient.so.10 is needed by
mysql-server-3.23.58-1 Suggested 
  resolutions: mysql-3.23.58-1.i386.rpm

I tried 'locate' but could not find either file, so
then tried 'rpm 
 -e' of both.  I got 'not installed' as an answer. 
So tried your line 
 once more and got the same output.
 
 
Robb + ( ME TOO )- still in jail :-(

Plz get me out of the jail !!!

Thanx,
bii


 

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

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



RE: Selecting a Column

2004-03-23 Thread Chris
I don't think he wants to return a Value of 'Tuesday', he wants to return
the value of the column NAMED Tuesday.

So instead of
SELECT Tuesday FROM inventoryRoom WHERE inventoryid='1';

He's trying to specify the Tuesday column with DAYNAME('2004-03-23');

I have no idea if that's possible.

-Original Message-
From: tweewan.wong [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 10:27 PM
To: [EMAIL PROTECTED]
Subject: RE: Selecting a Column


Not sure why you don't get Tuesday. At my place ( I am using 5.1 beta
version). It did return Tuesday for this statement SELECT
DAYNAME('2004-03-23').

Anyway, I can get similar output by using
select  date_format('2004-3-23','%W').



-Original Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
Sent: 24 March 2004 09:33
To: [EMAIL PROTECTED]
Subject: Re: Selecting a Column

So what are you asking?  I'm confused.  Are you asking just to get
'Tuesday'? (SELECT DAYNAME('2004-03-23');)  The value of Tuesday where
inventoryid = 1? (SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE
inventoryid='1'; which you already had.)  Or all the values in Tuesday?
(SELECT DAYNAME('2004-03-23') FROM inventoryRoom;)  Please clarify.

Respectfully,
Ligaya Turmelle


Yoed Anis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I have a table that looks like this:
 CREATE TABLE inventory (
 inventoryid int(11) NOT NULL,
 sunday int(3),
 monday int(3),
 tuesday int(3),
 wednesday int(3),
 thursday int(3),
 friday int(3),
 saturday int(3),
 PRIMARY KEY (inventoryid)
 );

 And I'm trying to run a command like

 SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1';

 That doesn't return Tuesday, but the value in the column Tuesday, an
 int of value 10.

 I need something like
 SELECT COLUMN(DAYNAME('2004-03-23')) FROM inventoryRoom WHERE
 inventoryid='1';

 But I don't know what command I'm looking for and all my searchs have
 come up fruitless.
 Plz CC this to my address if you reply.

 Thanks,
 Yoed




--
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: Newbie - dependencies Same problem --Plz giv the solution !!

2004-03-23 Thread Nitin Mehta
You need to download Dynamic client libraries - (including 3.23.x
libraries) to satisfy these dependencies. This is available on mysql
download page. Choose for your particular version.

And if that helps, read the installation procedure, next time before
installation.

Hope that helps
Nitin


- Original Message - 
From: rajesh k [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 8:05 PM
Subject: Newbie - dependencies Same problem --Plz giv the solution !!


 Hi Robert / Victor /. !

 Tried your method and got:

 error : Failed dependencies
  MySQL-server conflicts with
 mysql-server-3.23.54a-11
  mysql conflicts with mysql-3.23.54a-11

 rpm -i mysql-server-3.23.58-1.i386.rpm
   error:Failed dependencies:
   libmysqlclient.so.10 is needed by
 mysql-server-3.23.58-1 Suggested
   resolutions: mysql-3.23.58-1.i386.rpm

 I tried 'locate' but could not find either file, so
 then tried 'rpm
  -e' of both.  I got 'not installed' as an answer.
 So tried your line
  once more and got the same output.
 
 
 Robb + ( ME TOO )- still in jail :-(

 Plz get me out of the jail !!!

 Thanx,
 bii




 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html

 -- 
 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: using old frm files

2004-03-23 Thread Nitin Mehta
you can very well use those files, though, im not sure, if you can check the
table structure bafore restoring it.

HTH
Nitin

- Original Message - 
From: dan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:34 PM
Subject: using old frm files


 we had a database blown away (oops) and we still have the old
 .frm files, is there any way to get this structure back?

 is there a way to view the contents of the .frm files to
 see how the tables/indexes were setup?

 I can't find anything in the docs, faqs, etc.

 Dan.


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