mysqld_multi

2004-08-20 Thread Lou Olsten
I now have multiple installations running on the same machine, and am also using 
mysqld_multi.  However, even though it's working, there's one thing I don't 
understand.  Why does the [mysqld_multi] section have to contain the pointers to 
mysqld and mysqladmin?  It seems to me that it should just go right to the section 
that's tied to the parameter given to the start script, i.e. mysqld_multi start 1 
should go right to the [mysqld1] section and get the info it needs from there. 
However, until I put both variables in the [mysqld_multi] section, it didn't work and 
gave me an error that it was looking for mysqld and mysqladmin in the /var/lib/mysql 
directory.  Here is my my.cnf file.

[mysqld_multi]
mysqld = /usr/local/mysql420/bin/mysqld
mysqladmin = /usr/local/mysql420/bin/mysqladmin

[mysqld1]
basedir= /usr/local/mysql420
mysqld = /usr/local/mysql420/bin/mysqld
port   = 3307
socket = /usr/local/mysql420/mysql420.sock
pid-file   = /usr/local/mysql420/my420.pid

[mysqld2]
basedir= /usr/local/mysql500
mysqld = /usr/local/mysql500/bin/mysqld
port   = 3306
socket = /usr/local/mysql500/mysql500.sock
pid-file   = /usr/local/mysql500/my500.pid

Multiple MySQL Versions on Same Linux Box

2004-08-17 Thread Lou Olsten
We have successfully (and easily) installed multiple versions of MySQL on
Windows and are now trying to do the same on Linux.

We have a Fedora machine successfully running 4.1, but we want to add 5.0 to
it as well.  We installed 4.1 with RPM, so it put a bunch of MySQL files all
over the place.

I've downloaded the 5.0 tar and unpacked it into its own directory, then ran
the install_db script.  It ran OK, but no data files were created in the
mysql or test directories; they're both empty.

Does this sound right?  Is there a step-by-step guide to installing multiple
versions on the same box?  I've been through the docs and while they address
management of multiple, and a vague instruction on installing, it doesn't
appear to be that detailed.

Thanks,

Lou


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



Re: Recommendation on god MySQL books

2004-06-18 Thread Lou Olsten
I really like the Certification Study Guide we just ordered last week.
Great info that I'd wish I had when I started.  I have no plans to take the
test, but I love the way the info is presented and the questions at the end
help ensure I got it.

Lou
- Original Message - 
From: Bartis, Robert M (Bob) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 17, 2004 1:44 PM
Subject: Recommendation on god MySQL books


 I'm looking for suggestions on books that would help me to improve my
understanding of MySQL operations, admin operations, replication etc. I'm
new to MySQL and am about to embark on supporting a database for my team to
use in recording test results. Any suggestions and recommendations ones to
stay away from?

 Thanks in advance
 Bob

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



Moving tables to different disks (High Performance MySQL)

2004-06-08 Thread Lou Olsten
In the High Performance MySQL book, on page 124, the author suggests:

If you have all your MySQL data on a single disk, you can try moving pieces to 
another disk.  If the majority of activity is focused on a small group of tables, 
consider moving them to a separate disk.

How do you accomplish that?  I know InnoDB now allows you to specify a tablespace per 
table, but what about MyISAM table types?

Thanks,

Lou

Re: Moving tables to different disks (High Performance MySQL)

2004-06-08 Thread Lou Olsten
Ah, the symbolic links.. Forgot about them... Thanks.
- Original Message - 
From: Dan Nelson [EMAIL PROTECTED]
To: Lou Olsten [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, June 08, 2004 3:49 PM
Subject: Re: Moving tables to different disks (High Performance MySQL)


 In the last episode (Jun 08), Lou Olsten said:
  In the High Performance MySQL book, on page 124, the author suggests:
  
  If you have all your MySQL data on a single disk, you can try moving
  pieces to another disk.  If the majority of activity is focused on a
  small group of tables, consider moving them to a separate disk.
  
  How do you accomplish that?  I know InnoDB now allows you to specify
  a tablespace per table, but what about MyISAM table types?
 
 With MyISAM tables, you can move just about anything:  entire
 databases, tables, even just the indexes.  Just move the files, and
 create symlinks in their place pointing to the new locations.
 
 -- 
 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: Backing Up a Database

2004-06-07 Thread Lou Olsten
Thanks, but I have innodb tables as well.

I don't see any caveats in the docs for mysqldump, so I'm *assuming* it'll
work correctly, but I'd like to hear from someone who is counting on it in a
production environment, just to be sure.

Thanks,

Lou

- Original Message - 
From: McKeever Chris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 04, 2004 8:39 PM
Subject: Re: Backing Up a Database




 On Fri, 4 Jun 2004 18:16 , Lou Olsten [EMAIL PROTECTED] sent:

 For the time I've been testing, I've used the procedures outlined in the
help to take my backups, which entails doing a FLUSH TABLES WITH
 READ LOCK in my MySQL monitor, then going to a shell prompt and executing
the mysqldump utility, then issuing the UNLOCK TABLES from my
 MySQL monitor.
 
 
 
 Now I'm trying to schedule all this and I have a question about using
just mysqldump.  If I use the --lock-tables parm, am I getting the same
 functionality?  The reason I'm concerned is because the help says: The
FLUSH TABLES statement is needed to ensure that the all active index
 pages are written to disk before you start the backup.
 
 

 I cant answer your question directly, but I suggest looking at
mysqlhotcopy

 
 Can I make sure that happens without moving back and forth between the
MySQL monitor and the mysqldump utility?
 
 
 
 Thanks,
 
 
 
 Lou
 
 

 ---
 Chris McKeever
 If you want to reply directly to me, please use
cgmckeever--at--prupref---dot---com
 A href=http://www.prupref.com;www.prupref.com/A
 Prudential Preferred Properties
 A href=http://www.prupref.com;Chicago and Illinois NorthShore Real
Estate Experts/A
 



  Prudential Preferred Properties   www.prupref.com
 Success Driven By Results
 Results Driven By Commitment
 Commitment Driven By Integrity
 We Are Prudential Preferred Properties


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



Backing Up a Database

2004-06-04 Thread Lou Olsten
For the time I've been testing, I've used the procedures outlined in the help to take 
my backups, which entails doing a FLUSH TABLES WITH READ LOCK in my MySQL monitor, 
then going to a shell prompt and executing the mysqldump utility, then issuing the 
UNLOCK TABLES from my MySQL monitor.

Now I'm trying to schedule all this and I have a question about using just mysqldump.  
If I use the --lock-tables parm, am I getting the same functionality?  The reason I'm 
concerned is because the help says: The FLUSH TABLES statement is needed to ensure 
that the all active index pages are written to disk before you start the backup. 

Can I make sure that happens without moving back and forth between the MySQL monitor 
and the mysqldump utility?

Thanks,

Lou



Re: Username/Password Basics

2004-06-02 Thread Lou Olsten
David,

Think of users as the concatenation of the user and the host from which the
user is connecting.  That's why in your GRANT statement, you will see the
'user'@'host' semantic employed.

When you say 'localhost' you're telling MySQL that the user you are
specifying is connecting from the local host.  So, [EMAIL PROTECTED] is
really one user, [EMAIL PROTECTED] is another user, and so on.  When MySQL
resolves the connection, I believe it first looks at the host for
resolution.

You do not have to put a user into the system for every location from which
you want to connect.  Instead, you can use wildcards like:
GRANT  ON *.* to 'Newbie'@'196.168.168.%'

or maybe 'Newbie'@'%.yourdomain.com'

Lou

- Original Message - 
From: David Blomstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 10:22 AM
Subject: Username/Password Basics


 I've been studying MySQL for a few weeks now and am
 about ready to publish some databases online. But I'm
 confused about usernames and passwords. I understand
 you can create usernames and passwords on three or
 four different levels, like root, database, etc. As I
 understand it, localhost is the standard platform on
 which all the databases rest.

 I believe all my databases have the same setting -
 localhost, newbie_user, Newbie

 Those aren't my real username and password, of course.
 But I THINK newbie_user and Newbie are the username
 and password for localhost, and none of my databases
 have usernames or passwords. So how do I create one?

 I thought I remembered seeing the password command in
 phpMyAdmin, but I can't find it now.

 And if I create a database username and password on
 top of a localhost username and password, am I going
 to have to log in with two usernames and passwords?

 Then again, I could be mistaken about the localhost
 username and password; it might be that newbie_user
 and Newbie are a DATABASE username and password shared
 by all my databases.




 __
 Do you Yahoo!?
 Friends.  Fun.  Try the all-new Yahoo! Messenger.
 http://messenger.yahoo.com/

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



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



Re: location of created database

2004-05-28 Thread Lou Olsten
From the docs at: http://dev.mysql.com/doc/mysql/en/CREATE_DATABASE.html

Databases in MySQL are implemented as directories containing files that
correspond to tables in the database. Because there are no tables in a
database when it is initially created, the CREATE DATABASE statement only
creates a directory under the MySQL data directory (and the `db.opt' file,
for MySQL 4.1.1 and up). 

You can change the data directory with the datadir parameter.
(http://dev.mysql.com/doc/mysql/en/Server_system_variables.html)

To change after the fact, I think you'll want to stop the server, move the
directories, change the datadir to the new location, then restart... I've
not done this, so someone else may want to confirm.

Lou



- Original Message - 
From: Bono, Saroj AA R62 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 28, 2004 10:52 AM
Subject: location of created database



When I created a database (directly in mysql) from some random dir where
I started mysql, I found that it got created in the /var/lib/mysql dir.
I ran mysql from a dir where my C++ program is. I wanted to create a
database using mysql_query so I did mysql_query( mysql, CREATE
DATABASE IF NOT EXISTS abc). THis didnt create anything. If it did
would it be created in the /var/lib location ?I want to create it in my
local dir (when I do get my syntax to work!). How do I tell mysql to
make the database in some specific location?
Thanks.


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



Client Apps Using a Config File

2004-05-27 Thread Lou Olsten
If I understand the docs correctly, I can use a config file on my client machine for 
the given mysql client apps such as the mysql command line tool. 

What if I'm using a 3rd-party app?  Will the libraries somehow know to read the config 
file or would the app have to take manual steps to do it?

Thanks,

Lou

Problem Installing MySQL Max

2004-05-24 Thread Lou Olsten
Trying to install MySQL 4.1.1 Max binary using MySQL-Max-4.1.1-0.i386.rpm onto Linux 
Fedora version.  When I do, I get the following failed dependencies:

libcrypto.so.0.9.6 is needed by MySQL-Max-4.1.1-0
libssl.so.0.9.6 is needed by MySQL-Max-4.1.1-0
libstdc++-libc6.2-2.so.3 is needed by MySQL-Max-4.1.1-0

But on my system I DOhave:

/lib/libcrypto.so.0.9.7a
/libssl.so.0.9.7a

I haven't figured out where to get the libstdc++ one yet, but shouldn't the other two 
be fine seeing how they are later versions?

Lou

Re: using host name option

2004-05-18 Thread Lou Olsten
Can you use the actual IP address and get it to work?  If so, then ping
localhost and ping tux and make sure the IP that you believe it should be is
actually being returned.

Lou
- Original Message - 
From: Timothy Waters [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 12:24 AM
Subject: using host name option


 I am having trouble using the -h option in my setup of MySQL. If I use '-h
localhost' in the command it will work, but my hostname on my box is tux. If
i use '-h tux' for the hostname option, it will not work. I double checked
my /etc/hosts and everything is as it should be there. Is there anything I
am doing wrong? What should I do to be able to connect to it on my LAN?
 Tim
 -- 
 __
 Check out the latest SMS services @ http://www.linuxmail.org
 This allows you to send and receive SMS through your mailbox.


 Powered by Outblaze

 -- 
 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: Comments/questions on High Performance MySQL

2004-05-14 Thread Lou Olsten
Hi.
- Original Message - 
From: Hans-Peter Grimm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 14, 2004 2:53 AM
Subject: Comments/questions on High Performance MySQL



 Hi,

 I just finished reading High Performance MySQL. Congratulations to the
 authors, it's a great book and I enjoyed reading it. Would be great if
 someone now started to write MySQL Internals ;-)

 There are some items in the book I'd like to comment or ask questions
 about. I hope the list is a right place to do so.


 page 12/13:
 On p.12, the output of SHOW PROCESSLIST is shown. In the Command
 column, the value is Query. However, table 1-1 on p.13 indicates that
 the Command column would display Processlist when the client is
 running SHOW PROCESSLIST. With 4.0.17, I verified that the output is
 indeed Query. Is it a MySQL or a documentation bug?

On my 4.0 and 4.1 installations, I get Query



 page 68:
 Quote: [...], a NULL value may appear only once as a primary key.
 What's the meaning of this - all columns of a PRIMARY KEY in MySQL are
 forced to be NOT NULL, aren't they?

No, they can be NULL.  This is a new concept to me, but I actually hit a
case the other day where it seemed useful.  I posted this query for another
user who was trying to find all users without a computer:

select * from users left join computers on (users.user_id =
computers.user_id)
 where computers.user_id is NULL;

user_id was his PK, but in order for the WHERE clause to work properly, it
had to be null
(http://dev.mysql.com/doc/mysql/en/LEFT_JOIN_optimisation.html). I suppose
you could rebuild the table with a different (perhaps auto_increment) PK to
avoid this.  But to set up this test, I made it the PK and made it to allow
NULLs, so MySQL does allow you to do it.



 page 125:
 I'd like to know whether it's recommended to include
 myisam_sort_buffer in the computation of the minimum memory needed?

 In the my-medium.cnf configuration, for instance, myisam_sort_buffer is
 clearly the largest of all thread buffers (8M vs. 512K for the
 second-largest buffer). In my-(large|huge).cnf, it's even 64M.

 The MySQL manual on myisam_sort_buffer_size says: The buffer that is
 allocated when sorting the index when doing a REPAIR or when creating
 indexes with CREATE INDEX or ALTER TABLE. To me, these seem rather rare
 operations that won't be performed by most of the clients. It makes a
 big difference, however, whether I use 9M or 1M per client in the
 computation of required memory (or even 64M per client with
 my-(large|huge).cnf). Do I miss something here?


 page 211:
 The username and hostname combination listing contains, in that order:
  @%.example.com
 [EMAIL PROTECTED]
 Since the second user entry is more specific (the MySQL manual says an
 empty user is least specific), shouldn't these entries be sorted in the
 reverse order? Also, the text following the listing explains: When jane
 connects from web.example.com, she'll receive the privileges granted to
 [EMAIL PROTECTED]. With a first-match rule, this makes sense only if
 [EMAIL PROTECTED] appears first.


 Thank you,
 Hans-Peter


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



--default_table_type

2004-05-14 Thread Lou Olsten
Is there a way to set this dynamically? 

Thanks,

Lou

InnoDB Questions

2004-05-13 Thread Lou Olsten
Need someone with some insight or experience with InnoDB (Heikki?? :-)

1) According to a book I'm reading (High Performance MySQL) InnoDB uses MVCC, 
effectively allowing readers to not block writers.  In Oracle (with which I am more 
familiar) this is accomplished via rollback segments, and now, undo tablespaces. 
Occasionally, if the rollback data overwrites itself, you can get a Snapshot too old 
message.  But you can control the size and number of the rollback segments to fit your 
system.  So, my InnoDB questions are:

a) Where does InnoDB store all of this information (such as the deleted rows)?  In the 
InnoDB tablespace?
b) How long is it stored?
c) Can we (users) control any of this?

2) Another question I have is surrounding fragmentation.  Is there a way I can monitor 
my InnoDB tables to see the level of fragmentation on the table and/or indexes?

Thanks very much for any help that you can provide.  BTW, though I'm not finished, I'm 
very much enjoying the book and would recommend it for someone like me who is new to 
MySQL but experienced in other RDBMS's.

Lou

Re: Saving PDF's as Blobs

2004-05-12 Thread Lou Olsten
I tried this and it DOES work with my PDFs.  However, I didn't fully
understand how LOAD_FILE would handle all different kinds of binary data, so
I tried the same thing with a JPG.  It ended up dropping over half of the
data.  So although LOAD_FILE does work for my PDFs, how can I go about
getting any form of data into a BLOB?  I suspect it has something to do with
converting the data to hex, but can't find a MySQL function to do that (that
is, to take a file and convert it... not just a string of characters).

Thanks,

Lou

- Original Message - 
From: Sasha Pachev [EMAIL PROTECTED]
To: Lou Olsten [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 5:01 PM
Subject: Re: Saving PDF's as Blobs


 Lou Olsten wrote:
  What SQL statement can I use to insert a PDF into a BLOB column?  I
don't want a pointer to the file, I want the actual file stored as a BLOB.

 If the file is on the server already -

 insert into pdfs (content) values(load_file('/path/to/file.pdf'))

 If the file is on the client, use some client language (C,Perl,PHP), call
 mysql_real_escape_string() on the contents of the file and insert the
escaped
 string.



 -- 
 Sasha Pachev
 Create online surveys at http://www.surveyz.com/

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



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



Saving PDF's as Blobs

2004-05-11 Thread Lou Olsten
What SQL statement can I use to insert a PDF into a BLOB column?  I don't want a 
pointer to the file, I want the actual file stored as a BLOB.  

Thanks!

Lou

Re: Validation/Linking Table Question

2004-05-11 Thread Lou Olsten
Bart,

One other thing... based on your description of your needs, you seem to have
a one-to-many relationship between computers and users.  In that case, there
wouldn't be a need for the intersection table comp_user_link.  You could
simply add a user_id column to your computers table, make it allow nulls
(for computers that don't have users), then your query would look like this
and you would have eliminated the overhead of an extra table.

select * from users left join computers on (users.user_id =
computers.user_id)
 where computers.user_id is NULL;

Lou

- Original Message - 
From: Bart Nessux [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 10, 2004 8:07 PM
Subject: Re: Validation/Linking Table Question


 Thanks Lou, I'll give this a go!


 From: Lou Olsten [EMAIL PROTECTED]
 Reply-To: Lou Olsten [EMAIL PROTECTED]
 To: Bart Nessux [EMAIL PROTECTED],[EMAIL PROTECTED]
 Subject: Re: Validation/Linking Table Question
 Date: Mon, 10 May 2004 17:52:38 -0400
 
 Assuming that your pre 4.1, meaning that you can't use a subquery
this
 will do it, BUT comp_id must be set to allow NULLS for this to work
 otherwise the optimizer will handle it differently
 (http://dev.mysql.com/doc/mysql/en/LEFT_JOIN_optimisation.html).  It is
 legal to create a primary key on a column that allows nulls, so it's just
a
 question of whether or not you want to do that.
 
 select * from users left join comp_user_link on (users.user_id =
 comp_user_link.user_id)
 where comp_user_link.comp_id is null;
 
 
 - Original Message -
 From: Bart Nessux [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 10, 2004 1:38 PM
 Subject: Validation/Linking Table Question
 
 
   I have three tables in a MySQL DB... among others:
  
   1. computers
   2. users
   3. comp_user_link
  
   This particular DB is used for inventory and tracking purposes. I
think
   the table names are self explanatory. Computers has 'comp_id'... users
   has 'user_id' as their primary indexed keys. These keys are linked
   together in the comp_user_link table. A user may have more than one
   computer (For example, Bob may have a desktop and a laptop at the same
   time), but no computer may be linked to more than one user
   simultaneously (Bob and Tom should never have the same laptop at the
   same time).
  
   Anyway, what I'd like to do is to find all 'user_ids' that aren't
linked
   to a computer. Any tips on how to arrange a SELECT statement to do
that?
  
   Thanks,
  
   Bart
  
   --
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
  
 

 _
 Best Restaurant Giveaway Ever! Vote for your favorites for a chance to win
 $1 million! http://local.msn.com/special/giveaway.asp



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



Re: Transaction question - no rollback needed?

2004-05-10 Thread Lou Olsten
See below
- Original Message - 
From: Jeremy Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED] Mysql. Com [EMAIL PROTECTED]
Sent: Sunday, May 09, 2004 9:31 PM
Subject: Transaction question - no rollback needed?


 Does it make sense to use a transaction just for the row locking
properties,
 and then not needing to error check?

 I have a situation where I have seperate files that are being run very
often
 in realtime by many different users.  One is calling a list of 12 football
 players.  The other is updating specific information about that player at
a
 given time.  When the update takes place, occasionally the call for the 12
 players will only return 11 (presumably it is in the middle of an UPDATE).

I don't understand why this would happen under any circumstance. Either your
query should be blocked or it should read a snapshot of the data as it
exists depending on your isolation level.  I can't imagine a scenario where
this would be good (desired) behavior by any RDBMS and it sounds like a
problem.

 So if I set autocommit = 0, begin work, perform the update, and then
commit
 will I in effect guarantee that the other read will wait until the update
is
 done before trying to find its 12 players?

Yes and No.  Using InnoDB, writers do not block readers, so they will still
be able to read committed data, but they won't be able to update or delete
it until your transaction commits.

Lou


 I hope I didn't make that too confusing, and I appreciate any help that
can
 be offered.

 Thanks,
 Jeremy


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



Blocking Selects with LOCK TABLES

2004-05-10 Thread Lou Olsten
According to the docs (http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html) :
If a thread obtains a READ lock on a table, that thread (and all other threads) can 
only read from the table. If a thread obtains a WRITE lock on a table, only the thread 
holding the lock can read from or write to the table. Other threads are blocked. 

So, I've got two threads going (T1, T2). 

T1 issues LOCK TABLES transtest WRITE;

But when I go to T2, I can still issue: SELECT * FROM transtest; and retrieve all the 
data.  I CANNOT update, so I know the command is at least partially working. As I 
understand it, I'm supposed to see a message from T2 that says something about This 
table has been locked with the LOCK TABLES command.  

It is an InnoDB table, if that matters.

Thanks,

Lou



Re: Blocking Selects with LOCK TABLES

2004-05-10 Thread Lou Olsten
 Looks like it's a query cache issue. In this case you get result from the
cache.

That was it.

THANKS

- Original Message - 
From: Victoria Reznichenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 10, 2004 1:20 PM
Subject: Re: Blocking Selects with LOCK TABLES


 Lou Olsten [EMAIL PROTECTED] wrote:
  According to the docs
(http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html)
  :
  If a thread obtains a READ lock on a table, that thread (and all other
threads) can only
  read from the table. If a thread obtains a WRITE lock on a table, only
the thread holding
  the lock can read from or write to the table. Other threads are blocked.
 
  So, I've got two threads going (T1, T2).
 
  T1 issues LOCK TABLES transtest WRITE;
 
  But when I go to T2, I can still issue: SELECT * FROM transtest; and
retrieve all the
  data.  I CANNOT update, so I know the command is at least partially
working. As I
  understand it, I'm supposed to see a message from T2 that says something
about This
  table has been locked with the LOCK TABLES command.
 
  It is an InnoDB table, if that matters.

 Looks like it's a query cache issue. In this case you get result from the
cache.


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



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



Re: Validation/Linking Table Question

2004-05-10 Thread Lou Olsten
Assuming that your pre 4.1, meaning that you can't use a subquery this
will do it, BUT comp_id must be set to allow NULLS for this to work
otherwise the optimizer will handle it differently
(http://dev.mysql.com/doc/mysql/en/LEFT_JOIN_optimisation.html).  It is
legal to create a primary key on a column that allows nulls, so it's just a
question of whether or not you want to do that.

select * from users left join comp_user_link on (users.user_id =
comp_user_link.user_id)
where comp_user_link.comp_id is null;


- Original Message - 
From: Bart Nessux [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 10, 2004 1:38 PM
Subject: Validation/Linking Table Question


 I have three tables in a MySQL DB... among others:

 1. computers
 2. users
 3. comp_user_link

 This particular DB is used for inventory and tracking purposes. I think
 the table names are self explanatory. Computers has 'comp_id'... users
 has 'user_id' as their primary indexed keys. These keys are linked
 together in the comp_user_link table. A user may have more than one
 computer (For example, Bob may have a desktop and a laptop at the same
 time), but no computer may be linked to more than one user
 simultaneously (Bob and Tom should never have the same laptop at the
 same time).

 Anyway, what I'd like to do is to find all 'user_ids' that aren't linked
 to a computer. Any tips on how to arrange a SELECT statement to do that?

 Thanks,

 Bart

 -- 
 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: Hash Index

2004-05-08 Thread Lou Olsten
Hope this helps 

Very much.  Thanks to all who responded.
http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/hash_tables.html was
helpful as well.

Lou

- Original Message - 
From: Andy Ford [EMAIL PROTECTED]
To: Lou Olsten [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004 6:33 PM
Subject: Re: Hash Index


 A hash is a key value pair

 i.e. if you want a value for a unique key (in perl anyway) you can do
 this...

 %status = (
 1 = true,
 0 = false
 );

 If I have a variable that hold an integer such as
 $test = 1  I can do the following.

 if($status{$test} eq true) {
 do something
 }

 I have passed the variable $test as a key to the hash %status, and it
 has returned a value for that unique key.

 It's very similar in mySQL

 I come from a C background and now working extensively in Perl - this is
 a very powerful feature.

 Hope this helps

 Andy

 On Thu, 2004-05-06 at 23:01, Lou Olsten wrote:
  This one is more curiosity than a problem.
 
  I have read the docs about HASH indexes and how they are used, but I'm
  just wholly unfamiliar with WHAT a HASH index is. I'm only familiar with
  the term 'hash' as it relates to encryption.  What exactly IS a hash
  index?
 
  Just curious,
 
  Lou
 -- 

 perl -e 'print qq^;@) [###]^^qq^z\.MY{eLQ9^'
 in:control developer, Telindus, RG27 9HY
 DDI: +44 1256 709211, GSM: +44 7810 636652



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



Re: Query Log

2004-05-06 Thread Lou Olsten
Well look at that.  I didn't look back to the Connect statement that starts
the ID.  Just when I think I'm getting a handle, I dive back into the
quicksand!  Ugh.

Thanks

Lou


- Original Message - 
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 04, 2004 5:25 AM
Subject: Re: Query Log


 Lou Olsten [EMAIL PROTECTED] wrote:
  I'm pretty sure that the answer to this is No, you cannot but I
figured I'd check
  anyway...

  As I go back through my query log, I'd like to know the user that issued
the statement.
  If the user is still connected, I can cross reference it with the SHOW
PROCESSLIST ID,
  but if they have signed off, is there a way to get the user then?

 If you look in the general query log file you can see Id column where
thread id is specified and username and host in the Argument column.
 For update log and slow query log use --log-long-format option.



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



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



Hash Index

2004-05-06 Thread Lou Olsten
This one is more curiosity than a problem.

I have read the docs about HASH indexes and how they are used, but I'm just wholly 
unfamiliar with WHAT a HASH index is. I'm only familiar with the term 'hash' as it 
relates to encryption.  What exactly IS a hash index?

Just curious,

Lou

4.0 mysql client vs 4.1 installation

2004-05-04 Thread Lou Olsten
This is not a question, rather just some information I wanted to post in case someone 
else hits it and searches the lists.

I do a lot of straight command line connecting using the mysql.exe client for windows. 
 Aside from my other challenges with getting users set up properly, I ran into another 
one yesterday where I couldn't connect from my workstation, which was using a 4.0.18 
mysql.exe (size=294,980).  The error was pretty straightforward:

ERROR 1250: Client does not support authentication protocol requested by server; 
consider upgrading MySQL client

When I copied the mysql.exe file from my 4.1.1 alpha installation to my workstation, I 
could connect fine.  The size for the 4.1.1 windows mysql.exe file is 974,992.  From 
my testing so far, I haven't run into any backward-compatibility issues.

Lou

innodb_tablespace_monitor

2004-05-04 Thread Lou Olsten
From the docs, it says:

You can use innodb_tablespace_monitor to check the integrity of the file space 
management inside the tablespace files. 

Does this mean that it is part of the SHOW INNODB STATUS command or is this something 
separate?

Thanks,

Lou

InnoBD Index Fragmentation

2004-05-04 Thread Lou Olsten
From the docs: If there are random insertions into or deletions from the indexes of 
a table, the indexes may become fragmented.

How can I go about determining if my indexes are, in fact, fragmented?

Thanks,

Lou

Query Log

2004-05-03 Thread Lou Olsten
I'm pretty sure that the answer to this is No, you cannot but I figured I'd check 
anyway...

As I go back through my query log, I'd like to know the user that issued the 
statement.  If the user is still connected, I can cross reference it with the SHOW 
PROCESSLIST ID, but if they have signed off, is there a way to get the user then?

Thanks,

Lou

[client] var not working

2004-04-29 Thread Lou Olsten
Per a response from Victoria (thanks, BTW!) I see that I can reload my InnoDB RI's 
data by turning off SET FOREIGN_KEY_CHECKS = 0 during the restore.  I then tried to go 
to the machine where the dumps were going to be restored and set this variable in the 
[client] section of my.cnf.  But when I try to connect after that, I get an: 

ERROR: unknown variable 'foreign_key_checks=0'.  

I then tried using:

set variable=foreign_key_checks=0 

...but got the same result. 

Is there a list of variables that I *can* use in the [client] section, or am I just 
doing something wrong.

Thanks,

Lou Olsten

Re: [client] var not working

2004-04-29 Thread Lou Olsten
Thanks, Paul.  You appear frustrated that I didn't look in the docs first.
I had been to that page (and thoroughly read it) after Victoria's reply.
Prior to the reply, I tried searching but wasn't sure what to search for, so
didn't find what I was looking for.  The real gist of my question was:

Is there a list of variables that I *can* use in the [client] section, or
am I just doing something wrong.

I'm trying to figure out why I couldn't just put it in the [client] section
because I'm trying to understand the entire product on a deeper level.  I've
thoroughly read http://dev.mysql.com/doc/mysql/en/Option_files.html and it
appears that this request (knowing all the config file options) has been
made by others, so I felt no need to post it there in addition to the
others.

So back to my question... is looking at the command line options for a
program a good way to figure out what can go into the option file or does
that not always hold true?  SHOW VARIABLES?  I noticed that SET
FOREIGN_KEY_CHECKS doesn't appear in the SHOW VARIABLES list.  The only
place I found it was by querying @@session.FOREIGN_KEY_CHECKS.

Thanks,

Lou
 - Original Message - 
From: Paul DuBois [EMAIL PROTECTED]
To: Lou Olsten [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 11:21 AM
Subject: Re: [client] var not working


 At 10:38 -0400 4/29/04, Lou Olsten wrote:
 Per a response from Victoria (thanks, BTW!) I see that I can reload
 my InnoDB RI's data by turning off SET FOREIGN_KEY_CHECKS = 0 during
 the restore.  I then tried to go to the machine where the dumps were
 going to be restored and set this variable in the [client] section
 of my.cnf.  But when I try to connect after that, I get an:
 
 ERROR: unknown variable 'foreign_key_checks=0'.
 
 I then tried using:
 
 set variable=foreign_key_checks=0
 
 ...but got the same result.
 
 Is there a list of variables that I *can* use in the [client]
 section, or am I just doing something wrong.

 There is an example that shows how to use the variable on this page:

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

 I got to this page by going to:

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

 Then I typed foreign_key_checks into the search box and clicked the Go
 button.  The first page in the list of hits is the one shown above.

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


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



Re: [client] var not working

2004-04-29 Thread Lou Olsten
Paul, please see below...

- Original Message - 
From: Paul DuBois [EMAIL PROTECTED]
To: Lou Olsten [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 1:00 PM
Subject: Re: [client] var not working


 At 12:22 -0400 4/29/04, Lou Olsten wrote:
 Thanks, Paul.  You appear frustrated that I didn't look in the docs
first.

 Um, no.

Long day.  Sorry for the intimation.  ;-)

 The only options that can go in the [client] section are those options
 that are understood by *all* client programs that read option files.
 Or at least all client programs that you happen to use that read option
 files.  So if myprog1 --help lists an option and myprog2 --help doesn't
 list an option, you shouldn't put it in [client].

Great. Thanks.

 Run the program with the --help option to find out what options you can
 list in an option file.  If an option is specific to a given program,
 put it in the option file section named for that specific program. E.g.,
 an option that mysqldump supports but other programs do not should go
 in the [mysqldump] section.

Got it.  Thanks.


 I've noticed those comments in the online manual as well.  Personally,
 I don't really see the point of trying to list every single possible
 option on that page.  The information for particular programs is given
 in the sections that describe those programs, and makes more sense in
 that context.

Agreed.  And especially being that I can use the --help option as stated
above.  That way it stays consistent across versions, etc.

 Well, one point here is that FOREIGN_KEY_CHECKS isn't a client option.
 But the fact that it doesn't show up in SHOW VARIABLES is, I agree, a
 problem. There is some talk going on behind the scenes about this, but
 it isn't solved yet.

Fair enough!

 This variable and other such are listed here:

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



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



Creating Users and Passwords

2004-04-29 Thread Lou Olsten
I thought I had a handle on this, but now I'm all screwed up.

MySQL 4.1.1a-alpha-max-debug-log
Windows 2000 Server

I'm trying to create a user roby with a password of 'foo' with access to everything.  
Here's what happens:

- Sign in as root on the local host.
- GRANT ALL PRIVILEGES ON *.* TO roby@'%' IDENTIFIED BY 'foo' WITH GRANT OPTION;
- On same machine, try to login with: mysql -u roby -pfoo -h localhost
- Receive: ERROR 1045 (28000): Access denied for user: 'roby'@'localhost' (Using 
password: YES)

I'm wondering why that doesn't work, but here's where I get REALLY confused.  I can 
then sign in with NO PASSWORD and get into the system:

- mysql -u roby
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 44 to server version: 4.1.1a-alpha-max-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql

Moreoever... there is no entry for roby in the mysql.db database, which I thought was 
supposed to happen when I granted everything.  

I then issued: 

mysql SET PASSWORD FOR roby = PASSWORD('foo');
Query OK, 0 rows affected (0.00 sec)
mysql flush privileges;
Query OK, 0 rows affected (0.10 sec)

But still received: 

C:\mysql\binmysql -u roby -pfoo
ERROR 1045 (28000): Access denied for user: 'roby'@'localhost' (Using password: YES)

Any help is appreciated! 

Lou

Re: Creating Users and Passwords

2004-04-29 Thread Lou Olsten
Thanks.  Tried it with no luck.  Moreover, I get the same results as below
when I try to connect with the mysql client from a different machine.
Really bizarre behavior.  I have a 4.1 alpha running at home on my XP box.
I will do some testing there tonight to see if it's something I'm doing
unique to that box.

Lou

- Original Message - 
From: Dan Nelson [EMAIL PROTECTED]
To: Lou Olsten [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 5:21 PM
Subject: Re: Creating Users and Passwords


 In the last episode (Apr 29), Lou Olsten said:
  I thought I had a handle on this, but now I'm all screwed up.
 
  MySQL 4.1.1a-alpha-max-debug-log
  Windows 2000 Server
 
  I'm trying to create a user roby with a password of 'foo' with access to
everything.  Here's what happens:
 
  - Sign in as root on the local host.
  - GRANT ALL PRIVILEGES ON *.* TO roby@'%' IDENTIFIED BY 'foo' WITH GRANT
OPTION;
  - On same machine, try to login with: mysql -u roby -pfoo -h localhost
  - Receive: ERROR 1045 (28000): Access denied for user:
'roby'@'localhost' (Using password: YES)

 Remember that localhost is a special keyword that refers to the
 unix-domain socket, and will not be matched with a wildcard '%' hostname.
 Use -h 127.0.0.1 or -h publicip if you are on the same machine as the
 server and want to test remote privs.

 -- 
 Dan Nelson
 [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: Creating Users and Passwords

2004-04-29 Thread Lou Olsten
A HUGE thank you to everyone who helped me with this. Everything is working
as expected now.  That connection stuff (along with the blank user entry)
got me!!!

 Finally, are you really sure you want someone to be able to connect as
 (effective) root from *anywhere* on the net?  Personally, I restrict that
 level of access to localhost only.  If you really need to be able to
 administer mysql remotely, I'd strongly recommend you make the host part
as
 specific as you can.  Maybe [EMAIL PROTECTED] or [EMAIL PROTECTED]

Thanks for the tip and when we move to production, we definitely will have
tighter security.  Right now I'm just laying the groundwork and educating
everyone (scary thought) so we can move to production with as little pain as
possible.

Thanks again.

Lou
- Original Message - 
From: Michael Stassen [EMAIL PROTECTED]
To: Lou Olsten [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 9:34 PM
Subject: Re: Creating Users and Passwords



 Lou Olsten wrote:

  I thought I had a handle on this, but now I'm all screwed up.
 
  MySQL 4.1.1a-alpha-max-debug-log
  Windows 2000 Server
 
  I'm trying to create a user roby with a password of 'foo' with access to
everything.  Here's what happens:
 
  - Sign in as root on the local host.
  - GRANT ALL PRIVILEGES ON *.* TO roby@'%' IDENTIFIED BY 'foo' WITH GRANT
OPTION;

 That's correct.

  - On same machine, try to login with: mysql -u roby -pfoo -h localhost
  - Receive: ERROR 1045 (28000): Access denied for user:
'roby'@'localhost'
  (Using password: YES)

 First, note that localhost is the default, so -h localhost is
unnecessary,
 though it shouldn't hurt.

 You need to read
http://dev.mysql.com/doc/mysql/en/Connection_access.html.
   The gist is that [EMAIL PROTECTED] matching is done host first, then user.  If
 more than one host matches, the most specific wins.  So, when conecting as
 roby from localhost, the anonymous user ''@localhost is a better match
than
 [EMAIL PROTECTED], because the host part is more specific.  This bites a lot of
people.
   Most, I think, solve this by deleting the anonymous users.

mysql -u root -p mysql
mysql DELETE FROM user WHERE User='';
mysql FLUSH PRIVILEGES;

 Another possibility is that you have a [EMAIL PROTECTED] user, who would also
 trump [EMAIL PROTECTED] when connecting from localhost.  You could check with

SELECT User, Host FROM user WHERE User='roby';

 Then either drop that user or make his privileges match.

  I'm wondering why that doesn't work, but here's where I get REALLY
   confused. I can then sign in with NO PASSWORD and get into the system:

 By default, the anonymous user has no password.  You can check.  Once
you're
 in, enter

SELECT CURRENT_USER();

 to see who mysql believes you are.

  - mysql -u roby
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 44 to server version:
4.1.1a-alpha-max-debug-log
 
  Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
  mysql
 
  Moreoever... there is no entry for roby in the mysql.db database, which
I
  thought was supposed to happen when I granted everything.

 No.  The db table holds db-specific privileges.  Global privileges (*.*)
go
 in the user table.

  I then issued:
 
  mysql SET PASSWORD FOR roby = PASSWORD('foo');
  Query OK, 0 rows affected (0.00 sec)
  mysql flush privileges;
  Query OK, 0 rows affected (0.10 sec)

 You didn't specify a host, so this defaults to setting the password for
 [EMAIL PROTECTED], which won't help if you're actually connecting as [EMAIL 
 PROTECTED]
or
 ''@localhost.

  But still received:
 
  C:\mysql\binmysql -u roby -pfoo
  ERROR 1045 (28000): Access denied for user: 'roby'@'localhost' (Using
password: YES)
 
  Any help is appreciated!
 
  Lou

 Finally, are you really sure you want someone to be able to connect as
 (effective) root from *anywhere* on the net?  Personally, I restrict that
 level of access to localhost only.  If you really need to be able to
 administer mysql remotely, I'd strongly recommend you make the host part
as
 specific as you can.  Maybe [EMAIL PROTECTED] or [EMAIL PROTECTED]

 Michael


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



Restoring a db with RI enforced

2004-04-28 Thread Lou Olsten
If I'm using mysqldump to dump a database with referential integrity in place, does 
MySQL build the information in such a way that the referenced tables are loaded first 
to avoid invalid inserts into a table with a foreign key in place?  I'm trying to find 
an option for mysqldump, and the closest one I see is --disable-keys, but I'm not sure 
if that's what I need or not.

Thanks,

Lou

MySQL Memory Structure

2004-04-27 Thread Lou Olsten
I'm trying to get a handle on the entire memory structure used by MySQL.  I'd like to 
be able to see the total memory used by the entire MySQL instance, and then a 
breakdown of what is going on within that aggregate allocation.  For example, I'd like 
to see how much memory is devoted to the query cache, innodb cache, actual MySQL 
process, along with the other various caches that are allocated.  I'm having 
difficulty finding an exhaustive list so I can start tracking down which memory pools 
are being allocated and used by which processes. 

Thanks

Lou O.

Re: MySQL Memory Structure

2004-04-27 Thread Lou Olsten
Here is an example of where I get frustrated.  Maybe I'm just not finding it
in the docs.

When I execute the show innodb status\G I get:

--
BUFFER POOL AND MEMORY
--
Total memory allocated 17490512; in additional pool allocated 924288
Buffer pool size   512
Free buffers   457
Database pages 54
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 54, created 0, written 14
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout

Yet, when I add up the InnoDB variables from SHOW VARIABLES, I get the
following:

innodb_additional_mem_pool_size | 1048576
innodb_buffer_pool_size | 8388608
innodb_log_buffer_size  | 1048576
innodb_log_file_size| 5242880

If I add them up, I get 15,728,640.  I'm trying to figure out the difference
between that number and the 17,490,512 shown by the SHOW INNODB STATUS
command  This is one example of my frustration trying to understand the
memory constructs and how they are interrelated.

Thanks,

Lou O.



- Original Message - 
To: Lou Olsten [EMAIL PROTECTED]
Sent: Tuesday, April 27, 2004 1:37 PM
Subject: Re: MySQL Memory Structure


 Lou,

 use show variables; to display this info. You can also
 narrow it down by using show varibles like 'innodb%';
 to see only variables that start with innodb.

 The various pools are in there. See the mysql site for
 the exhaustive list of server variables.

 Hope this helps,

 

 --- Lou Olsten [EMAIL PROTECTED] wrote:
  I'm trying to get a handle on the entire memory
  structure used by MySQL.  I'd like to be able to see
  the total memory used by the entire MySQL instance,
  and then a breakdown of what is going on within that
  aggregate allocation.  For example, I'd like to see
  how much memory is devoted to the query cache,
  innodb cache, actual MySQL process, along with the
  other various caches that are allocated.  I'm having
  difficulty finding an exhaustive list so I can start
  tracking down which memory pools are being allocated
  and used by which processes.
 
  Thanks
 
  Lou O.





 __
 Do you Yahoo!?
 Win a $20,000 Career Makeover at Yahoo! HotJobs
 http://hotjobs.sweepstakes.yahoo.com/careermakeover


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



Re: Still getting problems creating a new super user on version 4 under WinXP

2004-04-27 Thread Lou Olsten
Jeff,

I'm in the process of working with some grants, so I tried the following and
it worked fine.

grant all privileges on *.* to sec5 identified by 'sec' with grant option;

SHOW GRANTS FOR sec5 produced the following:

mysql show grants for sec5;
+---
+
| Grants for [EMAIL PROTECTED] |
+---
+
| GRANT ALL PRIVILEGES ON *.* TO 'sec5'@'%' IDENTIFIED BY PASSWORD
'789677c92632ab41' WITH GRANT OPTION |
+---
---
-+
1 row in set (0.00 sec)

- Original Message - 
From: Jeff Ritchie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 27, 2004 4:35 PM
Subject: Still getting problems creating a new super user on version 4 under
WinXP


GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost'
IDENTIFIED BY 'password' WITH GRANT OPTION;

Excuted in a MySQL console returns the following SQL error

ERROR 1064:you have an error in your SQL syntax.
check the manual that corresponds to you MYSQL server version for the right
syntax to use near 'password with grant option' at line 1

Copied and pasted the command direct from the manual and still ain't working
:(

HELP!!!

Cheers,
Jeff


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



Re: Searching the Docs

2004-04-22 Thread Lou Olsten
Thanks for your suggestion of searching the docs offline.  I already had the
HTML ones on my laptop, so it was a small step.

Lou
- Original Message - 
From: Donny Simonton [EMAIL PROTECTED]
To: 'Lou Olsten' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 21, 2004 4:51 PM
Subject: RE: Searching the Docs


 Lou,
 I normally download the html version of the manual and have a little
search
 feature just for it.  And you are correct, I've looked for a few of your
 examples and can't find any information on them besides you can turn them
on
 or off basically.  Not in the mood to bust out the code to figure out
 exactly what they do though.  Sorry.

 Donny

  -Original Message-
  From: Lou Olsten [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, April 21, 2004 3:35 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Searching the Docs
 
  I use the online docs extensively as I am still very much in learning
mode
  with MySQL.  However, I've been frustrated recently because it appears I
  cannot search for an EXACT string literal, which brings me back a ton of
  hits I don't want.  For example, I'm trying to search for the dynamic
  system variable called convert_character_set, but it returns results
with
  convert or set etc., when I only want to see hits for the exact
  string.  Is there a search type I can use, or some quoting system, or
  anything that will allow me to search in this manner?
 
  I've got several dynamic variables that I cannot find definitions for:
 
  convert_character_set
  error_count
  slave_compressed_protocol
  sql_big_tables
  sql_low_priority_updates
  sql_max_join_size
  sql_slave_skip_counter
  warning_count
 
  Thanks,
 
  Lou



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



Undocumented Dynamic Variables

2004-04-22 Thread Lou Olsten
Per one of my last posts on searching... I can't find the meanings for these 
variables.  I've tried a general google search with no luck.  Anyone got any ideas?

convert_character_set
error_count
slave_compressed_protocol
sql_big_tables
sql_low_priority_updates
sql_max_join_size
sql_slave_skip_counter
warning_count

Thanks,

Lou

Re: MySQL Website

2004-04-21 Thread Lou Olsten
I have not been able to access the mysql.com server for about a day and a
half now from my office.  From home, it's fine.  There have been rare
occasions in the past when our provider had dropped (or very slow)
connectivity with certain nodes on the Internet.  My understanding there is
limited, but I know that there are really only a handful of actual back-bone
providers out there for the 'Net, and if a main provider has problems with
one of those points, it can take down (or slow) access to vast geographical
areas.  I believe that's what's going on with our provider at present.
However, getting them to troubleshoot it is another matter altogether.  It
usually starts with Did you restart your modem? and degrades from there.
I can get to every other site that I normally visit without problems.  Still
no MySQL as of 9:14am EST.

Lou

- Original Message - 
From: Yves Goergen [EMAIL PROTECTED]
To: Lehman, Jason (Registrar's Office) [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 6:00 PM
Subject: Re: MySQL Website


 On 20.04.2004 17:53 (+0100), Lehman, Jason (Registrar's Office) wrote:
  Does anyone know what is going on with the MySQL website?

 No, it's accessible as usual. But with Firefox, only at the second try.
 Could also be a browser problem, I'm using an older nightly build.

 -- 
 Yves Goergen [EMAIL PROTECTED]

 BlackBoard Internet Newsboard System -- blackboard.unclassified.de
 Free (GPL), easy to use and install, secure, innovative! (PHP+MySQL)

 -- 
 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: MySQL Website - TRACERT

2004-04-21 Thread Lou Olsten
Here's my tracert:

  325 ms25 ms29 ms  65-86-11-209.client.dsl.net [65.86.11.209]
  423 ms29 ms24 ms  unknown.Level3.net [209.247.230.161]
  528 ms25 ms26 ms  so-5-0-0.bbr2.Chicago1.Level3.net
[4.68.112.209]
  623 ms25 ms25 ms  so-7-0-0.edge1.Chicago1.Level3.net
[209.244.8.14]
  725 ms26 ms24 ms  bpr1-ge-7-0-0.ChicagoEquinix.savvis.net
[208.174.226.61]
  827 ms25 ms24 ms  dcr2-so-4-3-0.Chicago.savvis.net
[208.175.10.237]
  988 ms90 ms87 ms  dcr2-loopback.SantaClara.savvis.net
[208.172.146.100]
 1088 ms88 ms87 ms  bhr1-pos-0-0.SantaClarasc8.savvis.net
[208.172.156.198]
 1186 ms87 ms90 ms  csr1-ve243.SantaClarasc8.savvis.net
[66.35.194.50]
 1289 ms91 ms91 ms  66.35.212.174
 13 *** Request timed out.
 14 *** Request timed out.
 15 *** Request timed out.


- Original Message - 
From: Lou Olsten [EMAIL PROTECTED]
To: Yves Goergen [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, April 21, 2004 9:14 AM
Subject: Re: MySQL Website


 I have not been able to access the mysql.com server for about a day and a
 half now from my office.  From home, it's fine.  There have been rare
 occasions in the past when our provider had dropped (or very slow)
 connectivity with certain nodes on the Internet.  My understanding there
is
 limited, but I know that there are really only a handful of actual
back-bone
 providers out there for the 'Net, and if a main provider has problems with
 one of those points, it can take down (or slow) access to vast
geographical
 areas.  I believe that's what's going on with our provider at present.
 However, getting them to troubleshoot it is another matter altogether.  It
 usually starts with Did you restart your modem? and degrades from there.
 I can get to every other site that I normally visit without problems.
Still
 no MySQL as of 9:14am EST.

 Lou

 - Original Message - 
 From: Yves Goergen [EMAIL PROTECTED]
 To: Lehman, Jason (Registrar's Office) [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, April 20, 2004 6:00 PM
 Subject: Re: MySQL Website


  On 20.04.2004 17:53 (+0100), Lehman, Jason (Registrar's Office) wrote:
   Does anyone know what is going on with the MySQL website?
 
  No, it's accessible as usual. But with Firefox, only at the second try.
  Could also be a browser problem, I'm using an older nightly build.
 
  -- 
  Yves Goergen [EMAIL PROTECTED]
 
  BlackBoard Internet Newsboard System -- blackboard.unclassified.de
  Free (GPL), easy to use and install, secure, innovative! (PHP+MySQL)
 
  -- 
  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: Searching the Docs

2004-04-21 Thread Lou Olsten
I use the online docs extensively as I am still very much in learning mode with MySQL. 
 However, I've been frustrated recently because it appears I cannot search for an 
EXACT string literal, which brings me back a ton of hits I don't want.  For example, 
I'm trying to search for the dynamic system variable called convert_character_set, but 
it returns results with convert or set etc., when I only want to see hits for the 
exact string.  Is there a search type I can use, or some quoting system, or anything 
that will allow me to search in this manner?

I've got several dynamic variables that I cannot find definitions for:

convert_character_set
error_count
slave_compressed_protocol
sql_big_tables
sql_low_priority_updates
sql_max_join_size
sql_slave_skip_counter
warning_count

Thanks,

Lou



Setting Dynamic Variables

2004-04-20 Thread Lou Olsten
I've found two methods that both seem to work fine (on 4.0.18) for setting dynamic 
variables:

mysql set @@session.autocommit=0;
mysql set session autocommit=0;

Which is the preferred (latest) method?  Is one eventually going to be deprecated?

Thanks,

Lou

Getting an older version of MySQL

2004-04-19 Thread Lou Olsten
Hi,

I'm currently running some instances of 4.0.18.  I read the following in the docs:

Beginning with MySQL 4.0.3, many server system variables are dynamic and can be set 
at runtime using SET GLOBAL or SET SESSION. You can also select their values using 
SELECT.

But when I look at the downloads page, I only have options for 4.0.18 (production) or 
4.1.1 (alpha).  

How do I upgrade my 4.0.18 to 4.0.3 or whatever the latest 4.0.x might be?

Thanks,

Lou

Re: Getting an older version of MySQL

2004-04-19 Thread Lou Olsten
Ah Ha!  Thanks!!!

Lou

- Original Message - 
From: Chris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 19, 2004 5:14 PM
Subject: RE: Getting an older version of MySQL


 4.0.18 is the latest 4.0.x release.

 4.0.3  4.0.9  4.0.10  4.0.18

 4.0.3 != 4.0.30

 -Original Message-
 From: Lou Olsten [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 19, 2004 1:44 PM
 To: [EMAIL PROTECTED]
 Subject: Getting an older version of MySQL


 Hi,

 I'm currently running some instances of 4.0.18.  I read the following in
the
 docs:

 Beginning with MySQL 4.0.3, many server system variables are dynamic and
 can be set at runtime using SET GLOBAL or SET SESSION. You can also select
 their values using SELECT.

 But when I look at the downloads page, I only have options for 4.0.18
 (production) or 4.1.1 (alpha).

 How do I upgrade my 4.0.18 to 4.0.3 or whatever the latest 4.0.x might be?

 Thanks,

 Lou


 -- 
 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: about flush logs

2004-04-16 Thread Lou Olsten
When I do a FLUSH LOGS my bin log does increment and a new one is created.
My query log does not behave this way, however.  Just the bin log.  It
creates files with the .00x extension where x is an incremental number.

Lou
- Original Message - 
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 8:09 AM
Subject: Re: about flush logs


 Tang, Grace H [EMAIL PROTECTED] wrote:
  In my box, mysql server version is 4.0.18.
 
  I tried  flush logs. Nothing happened in the mysql data directory.
All the log files
  were not replaced.
 
  Does flush logs rename the old log files and create new log files?

 FLUSH LOGS closes and reopens all logs. In doesn't rename anything. For
update log if you didn't specify extention, FLUSH LOGS creates new log file.



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



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



Getting Aggregate Object Data

2004-04-07 Thread Lou Olsten
I'm in the process of trying to move some of our systems to MySQL from SQL Server and 
Oracle.  At this point I'm learning and testing MySQL. 

One immediate question I have is regarding getting aggregate information.  For 
example, the SHOW DATABASES command would be an example of something I would get from 
the SQL Server data dictionary table, sysdatabases.  It appears that MySQL has no such 
mechanisms, and that you must rely on many of the SHOW commands.  In the case of 
databases, it works great, but what about other objects?

For example, if I want to see all indexes in my sales database?  Or do I have to loop 
through each table with the SHOW INDEXES command?  That's one example of what I'm 
talking about. 

Thanks so much for the help.

Lou Olsten
[EMAIL PROTECTED]