Re: MySQL Control Center and Linux box connection

2004-11-01 Thread Gleb Paharenko
Hi.

See:

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

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

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



And may be something like this will help you:



GRANT ALL PRIVILEGES ON *.* TO 'root'@'ip address' IDENTIFIED BY 'goodsecret';





Jerry Swanson [EMAIL PROTECTED] wrote:

 I have Linux box running Red Hat and 3.23. I  install MySQL Contorl

 Center and trying connect to the mysql on Linux box.

 

 When I try to connect I receive the error message.

 ERROR: HOST 'ip address' is not allowed to connect to this MySQL server.

 

 What I'm doing wrong here?

 

 TH

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




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



Re: mysql 4.1 + debian

2004-11-01 Thread Gleb Paharenko
Hi.

See:

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



What OS do you use?



What is the output of the following statement:



SHOW VARIABLES LIKE 'have_bdb';



If you don't need bdb try to start MySQL with skip-bdb in /etc/my.cnf in section 
[mysqld] 



And you may use official binaries from MySQL AB :)





Ron Gilbert [EMAIL PROTECTED] wrote:

 I just installed debian (test) and am trying to get mysql 4.1 working.  

 The only deb package for 4.1 that I could find was experimental, 

 which might explain the problem I am having.

 

 When I start the server, I get the following in my syslog:

 

 Oct 31 01:35:22 cove1 mysqld_safe[2523]: started

 Oct 31 01:35:22 cove1 mysqld[2526]: 041031  1:35:22  [ERROR] bdb:  

 unable to initialize mutex: Function not implemented

 Oct 31 01:35:22 cove1 mysqld[2526]: 041031  1:35:22  [ERROR] bdb:  

 process-private: unable to initialize environment lock: Function not 

 implemented

 Oct 31 01:35:22 cove1 mysqld[2526]: 041031  1:35:22  [ERROR] Can't init 

 databases

 Oct 31 01:35:22 cove1 mysqld[2526]: 041031  1:35:22  [ERROR] Aborting

 Oct 31 01:35:22 cove1 mysqld[2526]:

 Oct 31 01:35:22 cove1 mysqld[2526]: 041031  1:35:22  [NOTE] 

 /usr/sbin/mysqld: Shutdown complete

 

 I've googled for the mutex error and only find one hit with someone 

 experiencing the same problem I am having and no solution.

 

 Any ideas?  I'm new to debian, BTW.

 

 Ron

 

 

 

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




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



Re: Linker Error

2004-11-01 Thread Gleb Paharenko
Hi.



You may upgrade to the latest release and try again.



What compiler do you use?



I'm using 4.0.20a on Windows 98.



My program compiler successfully but gives a linker error:



C:\SC\BIN\..\lib\mysqlclient.lib(default)  Offset 955A0H Record Type 00C3 

 Error 16: Index Range 

 

 --- errorlevel 1

 

 --- errorlevel 1

   

   Regards

   Premalpremal  mishra [EMAIL PROTECTED] wrote:



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




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



Re: go back machine

2004-11-01 Thread Anders Karlsson
An example, which use a subquery (available from MySQL 4.1):
select eqid, paramid, lastmodified, value from eq_deltalist param1
where lastmodified = (SELECT max(lastmodified) FROM eq_deltalist
  WHERE paramid = param1.paramid AND eqid = param1.eqid AND 
lastmodified = now())

You would probably want to join the outer of the two queries with eq and 
eq_params also

Regards
/Karlsson
Niklas Karlsson wrote:
I'd like to setup an application to store equipment configuration data in a
MySql database. The basic setup is that each equipment has a certain number
of parameters which may change over time. I'd like to track these changes
over time and want to be able to create queries which determine the status a
certain date.

I guess the easiest approach is to have one column per parameter and simply
store the value of all parameters whenever I read up the configuration data
using the Equipment Id and Date as keys. However, I'd like to store only the
delta information, I.e. data changed between different dates.

To give an idea, I need to be able to track around 100 parameters for
roughly 1 different equipments so performance is an issue.

Assuming now I create the following tables;

CREATE TABLE `eq` (
 `eqid` int(11) NOT NULL auto_increment,
 `eqname` char(10) default NULL,
 PRIMARY KEY  (`eqid`)
) 


CREATE TABLE `eq_params` (
 `paramid` int(4) NOT NULL default '0',
 `paramname` char(10) default NULL,
 PRIMARY KEY  (`paramid`)
) 


CREATE TABLE `eq_deltalist` (
 `eqid` int(4) NOT NULL default '0',
 `paramid` int(11) NOT NULL default '0',
 `lastmodified` datetime NOT NULL default '-00-00 00:00:00',
 `value` double(15,3) default NULL,
 PRIMARY KEY  (`eqid`,`paramid`,`lastmodified`)
) 


If I define my equipments in eq, the different parameters in eq_params
and each change of given parameter in eq_deltalist, how do I query for the
valid parameters a certain date (i.e. when the lastmodified date is
closest to the date in question) ??

Thankful for any good ideas.

BR // Niklas
 

--
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Anders Karlsson ([EMAIL PROTECTED])
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Sales Engineer
/_/  /_/\_, /___/\___\_\___/ Stockholm
   ___/   www.mysql.com Cellphone: +46 708 608121
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL functions

2004-11-01 Thread Jon Stephens
In MySQL versions before 5.0, you can write a user-defined function in C 
and compile it as a shared object. Beginning with MySQL 5.0, you can 
write stored routines. See these sections of the MySQL Manual:

http://dev.mysql.com/doc/mysql/en/Adding_functions.html
http://dev.mysql.com/doc/mysql/en/Adding_procedures.html
 Date: Sat, 30 Oct 2004 23:13:42 +0200
 To: [EMAIL PROTECTED]
 From: Ferhat BINGOL [EMAIL PROTECTED]
 Subject: MySQL functions
 Message-ID: [EMAIL PROTECTED]

 Hi,

 How do I add a new function to MySQL SQL statement list.

 What I mean is AVG(), MIN() or MAX() is a ready function isnt it? Is 
there a
 way to add new functions without compiling all server?

 Regards...


--
Jon Stephens, Technical Writer
MySQL AB   www.mysql.com
Office: +61 (07) 3388 2228
Are you MySQL certified?  www.mysql.com/certification
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: libmysqlclient.so.12 client libraries for OS X

2004-11-01 Thread Rob Kudyba
OK so how do you reconfigure? Here's what happens when I try this:
./configure CC=gcc CFLAGS=-O3 -fno-omit-frame-pointer CXX=gcc \
 CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors \
 -fno-exceptions -fno-rtti \
 ./configure --prefix=/usr/local/mysql \
 --with-extra-charsets=complex --enable-thread-safe-client \
 --enable-local-infile --enable-shared
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!
Michael Stassen wrote:
MySQL does not come in pieces for Mac OS X.  The whole thing comes in 
one Mac OS X binary package in PKG format, downloaded as a disk image 
(.dmg) file 
http://dev.mysql.com/doc/mysql/en/Mac_OS_X_installation.html.  The 
installer puts everything in /usr/local/mysql-VERSION, with a symbolic 
link at /usr/local/mysql.

The package does not include a shared library, however, as it's built 
with the --disable-shared flag 
http://dev.mysql.com/doc/mysql/en/Mac_OS_X_10.x.html.

Michael
Rob Kudyba wrote:
Where is there an OS X equivalent of:
MySQL-client-VERSION.i386.rpm
The standard MySQL client programs. You probably always want to install
this package. which is referred to here:
http://dev.mysql.com/doc/mysql/en/Linux-RPM.html
Specifically, I am looking for libmysqlclient.so.12 since you cannot
package that in applications since it would break the terms of the GPL.


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


Re: why aren't my PRIMARY KEYs being used?

2004-11-01 Thread SGreen
I disagree with your LEFT JOIN/RIGHT JOIN results. 

SELECT 
activenodes.name,lrsrc.lid,activelayers.rsrcc,lrsrc.rsrc,nrsrc.rsrc
FROM activelayers
LEFT JOIN lrsrc ON lrsrc.id=activelayers.id AND 
lrsrc.lid=activelayers.lid
RIGHT JOIN nrsrc ON lrsrc.rsrc=nrsrc.rsrc
RIGHT JOIN activenodes ON nrsrc.id=activenodes.id
ORDER BY activelayers.lid DESC;

Since you RIGHT JOINed nrsrc and activenodes to your query, neither 
your 1st nor your 5th columns should contain any null values. So, the 
columns that could contain null values are the 2nd, 3rd, and 4th (as both 
activelayers and lrsrc are optional tables

However, only your 2nd and 4th columns contain nulls. So, where are the 
optional (non-matching) rows for column 3? Where are those null values? 
There should be nulls there for everywhere you have a null in columns 2 
and 4, right? 
...OR... 
Are the tables activelayers, nrsrc, and activenodes participating in 
a Cartesian product and only lrsrc is actually optional? 

Which method of looking at this query is correct?  Can you be certain that 
the same style query will respond with the same decisions about which 
tables are optional and which ones aren't (because of the mix of LEFT and 
RIGHT joins in the same query)?  The only way to avoid this kind of 
order-of-operations dilemma is to use parentheses to group (nest) your 
joins so that they evaluate in the correct order. However, last time I 
checked, that is still on the TODO list to fix.

http://dev.mysql.com/doc/mysql/en/TODO_sometime.html (see third from last)

So to get back to the original issue. 

To recap: from http://lists.mysql.com/mysql/174702
snip
Conceptually, here's what I'm trying to do: I've got a set of tasks to 
execute
(frames).  The frames which are ready to execute are in wait mode. 
These
frames are associated with layers (in the table layers), and these 
layers
have 0 or more layer resource requirements (in the table lrsrc).  I 
also
have a table of compute nodes (nodes).  Each of these nodes has 0 or 
more
node resources (in the table nrsrc).  If a layer requires linux and
perl resources, frames in that layer will only run on compute nodes 
which
have linux and perl resources. 
snip

What was the question are you trying to answer? I know it was something 
about matching layers and nodes but I am not perfectly clear on what 
results you wanted.

I really do want to help and I don't want to argue over what I think is a 
bug (or an under-developed section) in the program. You may have received 
the results you wanted this time but I am not confident that this query is 
correct for the question you are asking nor am I confident that it will 
continue to return correct results in the future.

Thanks for your patience,

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Laszlo Thoth [EMAIL PROTECTED] wrote on 10/30/2004 04:21:15 AM:

 
 On Oct 29, 2004, at 6:26 AM, [EMAIL PROTECTED] wrote:
 
  I think it may be because of your mixed left and right joins. There 
  are several bugs listed that show that the optimizer mishandles 
  certain combinations of left and right joins.
 
  SELECT
  
  
activelayers.id,activelayers.lid,activelayers.rsrcc,COUNT(lrsrc.rsrc=nr 
  src.rsrc)
   as matchcount,activenodes.name,activenodes.rsrcc
   FROM activelayers
   LEFT JOIN lrsrc ON lrsrc.id=activelayers.id AND 
  lrsrc.lid=activelayers.lid
   INNER JOIN nrsrc ON lrsrc.rsrc=nrsrc.rsrc
   INNER JOIN activenodes ON nrsrc.id=activenodes.id
   GROUP BY activelayers.id,activelayers.lid,activenodes.id
   HAVING matchcount=activelayers.rsrcc
   ORDER BY activelayers.lid DESC;
 
 This actually didn't produce the same result.  I'm doing a RIGHT JOIN 
 rather than a LEFT or INNER JOIN to catch node resources (nrsrc) which 
 do not match layer resources (lrsrc), or nodes with no layer resources 
 at all.  This example makes the difference a little clearer:
 
 SELECT 
 activenodes.name,lrsrc.lid,activelayers.rsrcc,lrsrc.rsrc,nrsrc.rsrc
 FROM activelayers
 LEFT JOIN lrsrc ON lrsrc.id=activelayers.id AND 
 lrsrc.lid=activelayers.lid
 RIGHT JOIN nrsrc ON lrsrc.rsrc=nrsrc.rsrc
 RIGHT JOIN activenodes ON nrsrc.id=activenodes.id
 ORDER BY activelayers.lid DESC;
 
 +---+--+---+--+--+
 | name  | lid  | rsrcc | rsrc | rsrc |
 +---+--+---+--+--+
 | node1 | NULL | 1 | NULL |1 |
 | node2 | NULL | 1 | NULL |2 |
 | node3 | NULL | 1 | NULL |1 |
 | node3 | NULL | 1 | NULL |2 |
 | node0 | NULL | 1 | NULL | NULL |
 | node1 |4 | 2 |1 |1 |
 | node2 |4 | 2 |2 |2 |
 | node3 |4 | 2 |1 |1 |
 | node3 |4 | 2 |2 |2 |
 | node0 | NULL | 2 | NULL | NULL |
 | node1 |3 | 2 |1 |1 |
 | node2 |3 | 2 |2 |2 |
 | node3 |3 | 2 |1 |1 |
 | node3 |3 | 2 |2 |2 |
 | node0 | NULL | 2 | NULL | NULL |
 | node1 | NULL | 1 | NULL |1 |
 | node2 |2 | 1 |2 |2 

Re: libmysqlclient.so.12 client libraries for OS X

2004-11-01 Thread Michael Stassen
That's right, it's a precompiled binary.  If you want a different 
configuration, you have to download the source and build your own 
http://dev.mysql.com/downloads/.  I haven't tried --enable-shared on Mac 
OS X, so I can't promise it will work, but I'm not aware of any reason it 
wouldn't.

In any case, I don't see how this will help you, as your stated goal was to 
avoid distributing the library.  I suspect you'll either have to face the 
licensing issue and distribute your app with the library built in, or 
distribute your app in source with instructions to build against the 
customer's copy of the library.

Michael
Rob Kudyba wrote:
OK so how do you reconfigure? Here's what happens when I try this:
./configure CC=gcc CFLAGS=-O3 -fno-omit-frame-pointer CXX=gcc \
  CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors \
  -fno-exceptions -fno-rtti \
  ./configure --prefix=/usr/local/mysql \
  --with-extra-charsets=complex --enable-thread-safe-client \
  --enable-local-infile --enable-shared
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!
Michael Stassen wrote:
MySQL does not come in pieces for Mac OS X.  The whole thing comes in 
one Mac OS X binary package in PKG format, downloaded as a disk image 
(.dmg) file 
http://dev.mysql.com/doc/mysql/en/Mac_OS_X_installation.html.  The 
installer puts everything in /usr/local/mysql-VERSION, with a symbolic 
link at /usr/local/mysql.

The package does not include a shared library, however, as it's built 
with the --disable-shared flag 
http://dev.mysql.com/doc/mysql/en/Mac_OS_X_10.x.html.

Michael
Rob Kudyba wrote:
Where is there an OS X equivalent of:
MySQL-client-VERSION.i386.rpm
The standard MySQL client programs. You probably always want to install
this package. which is referred to here:
http://dev.mysql.com/doc/mysql/en/Linux-RPM.html
Specifically, I am looking for libmysqlclient.so.12 since you cannot
package that in applications since it would break the terms of the GPL.


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


UPDATE LOW PRIORITY

2004-11-01 Thread Ronan Lucio
Hi All,
I have o little (I think) doubt:

If I use a query UPDATE LOW PRIORITY and right after
I execute a SELECT in the same table/column.

Will I receive the correct result or only after MySQL commit
the data?

Any help would be appreciated,

Thanks,
Ronan



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



Re: UPDATE LOW PRIORITY

2004-11-01 Thread Paul DuBois
At 12:26 -0300 11/1/04, Ronan Lucio wrote:
Hi All,
I have o little (I think) doubt:
If I use a query UPDATE LOW PRIORITY and right after
I execute a SELECT in the same table/column.
Will I receive the correct result or only after MySQL commit
the data?
What is the correct result?
Any help would be appreciated,
Thanks,
Ronan

--
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: UPDATE LOW PRIORITY

2004-11-01 Thread Ronan Lucio
 What is the correct result?

The correct result is the data in the updated column after commit.

For example, if I have:

Table1
=
- id
- name

INSERT INTO Table1 (id, name) VALUES (1, 'AAA')

UPDATE LOW PRIORITY Table1
SET name = 'BBB'

SELECT name
FROM Table1

Will it return BBB?

Thanks,
Ronan




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



RE: UPDATE LOW PRIORITY

2004-11-01 Thread Jay Blanchard
[snip]
Will I receive the correct result or only after MySQL commit
the data?
[/snip]

From TFM, If you specify the LOW_PRIORITY keyword, execution of the
UPDATE is delayed until no other clients are reading from the table.

You can get more by RTFM at
http://dev.mysql.com/doc/mysql/en/UPDATE.html

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



Re: max allowed packet error

2004-11-01 Thread Gleb Paharenko
Hi.



Please download and install official binaries, as this looks like a compilation bug 
which is likely to occur when compilation is done by hands on Linux. :)



folks I have successfully compiled and install mysql-4.1.7 from source

in my Debian (3.0, lots of free space in hd, 64MB RAM) woody and was in

the stage of doing a bin/mysql_install_db --user=mysql when I got the

following error:





ERROR: 1153  Got a packet bigger than 'max_allowed_packet' bytes

041101 15:25:48 [ERROR] Aborting



041101 15:25:48 [Note] /usr/local/mysql/libexec/mysqld: Shutdown

complete





I have copied the mysql-medium.cnf to /etc/my.cnf and have noticed that

the max-allowed-packet is 1M. no matter what I set it to 8M, 10M, 16M

I still get the error.



I have now attached the mysqlbug report for further info. I hope there's

a solution for this.





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




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



Re: UPDATE LOW PRIORITY

2004-11-01 Thread Gleb Paharenko
If you specify the LOW_PRIORITY keyword, execution of the UPDATE is delayed until no 
other clients are reading from the table.



So, when it returns, all updates will be commited and select statement will return the 
correct result.





Ronan Lucio [EMAIL PROTECTED] wrote:

 Hi All,

 I have o little (I think) doubt:

 

 If I use a query UPDATE LOW PRIORITY and right after

 I execute a SELECT in the same table/column.

 

 Will I receive the correct result or only after MySQL commit

 the data?

 

 Any help would be appreciated,

 

 Thanks,

 Ronan

 

 

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




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



Re: UPDATE LOW PRIORITY

2004-11-01 Thread Ronan Lucio
Jay,

 From TFM, If you specify the LOW_PRIORITY keyword, execution of the
 UPDATE is delayed until no other clients are reading from the table.

Yes, I had alread read it, but it only specify when the data
will be commited, not what will be returned.

Let´s change the question:

Before the that be commited (until no other clients are reading from the
table)
the results for SELECTs will be either the data on disk or the date on the
cache?

Thanks,
Ronan



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



Re: UPDATE LOW PRIORITY

2004-11-01 Thread Ronan Lucio
Gleb,

 So, when it returns, all updates will be commited and select statement
will return the correct result.

It´s exactly what I´d wanted to know.

Thank you very much,
Ronan



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



Re: libmysqlclient.so.12 client libraries for OS X

2004-11-01 Thread Rob Kudyba
OK using the source and adding '--enable-shared' to the configure line 
works on OS X. I then had to create 3 links in order for our app to find 
the client library:
ln -s /usr/local/mysql/lib/mysql/libmysqlclient.12.0.0.dylib 
/usr/lib/libmysqlclient.12.0.0.dylib
ln -s /usr/lib/libmysqlclient.12.0.0.dylib /usr/lib/libmysqlclient.12.dylib
ln -s /usr/lib/libmysqlclient.12.0.0.dylib /usr/lib/libmysqlclient.dylib

We're simply working on a how-to/faq to address this issue informing 
users that they will have to install/configure MySQL to have this in 
place...

Thanks for the help.
Michael Stassen wrote:
That's right, it's a precompiled binary.  If you want a different 
configuration, you have to download the source and build your own 
http://dev.mysql.com/downloads/.  I haven't tried --enable-shared on 
Mac OS X, so I can't promise it will work, but I'm not aware of any 
reason it wouldn't.

In any case, I don't see how this will help you, as your stated goal 
was to avoid distributing the library.  I suspect you'll either have 
to face the licensing issue and distribute your app with the library 
built in, or distribute your app in source with instructions to build 
against the customer's copy of the library.

Michael
Rob Kudyba wrote:
OK so how do you reconfigure? Here's what happens when I try this:
./configure CC=gcc CFLAGS=-O3 -fno-omit-frame-pointer CXX=gcc \
  CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors \
  -fno-exceptions -fno-rtti \
  ./configure --prefix=/usr/local/mysql \
  --with-extra-charsets=complex --enable-thread-safe-client \
  --enable-local-infile --enable-shared
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!
Michael Stassen wrote:
MySQL does not come in pieces for Mac OS X.  The whole thing comes 
in one Mac OS X binary package in PKG format, downloaded as a disk 
image (.dmg) file 
http://dev.mysql.com/doc/mysql/en/Mac_OS_X_installation.html.  The 
installer puts everything in /usr/local/mysql-VERSION, with a 
symbolic link at /usr/local/mysql.

The package does not include a shared library, however, as it's 
built with the --disable-shared flag 
http://dev.mysql.com/doc/mysql/en/Mac_OS_X_10.x.html.

Michael
Rob Kudyba wrote:
Where is there an OS X equivalent of:
MySQL-client-VERSION.i386.rpm
The standard MySQL client programs. You probably always want to 
install
this package. which is referred to here:
http://dev.mysql.com/doc/mysql/en/Linux-RPM.html

Specifically, I am looking for libmysqlclient.so.12 since you cannot
package that in applications since it would break the terms of the 
GPL.





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


Re: UPDATE LOW PRIORITY

2004-11-01 Thread Paul DuBois
At 12:46 -0300 11/1/04, Ronan Lucio wrote:
  What is the correct result?
The correct result is the data in the updated column after commit.
For example, if I have:
Table1
=
- id
- name
INSERT INTO Table1 (id, name) VALUES (1, 'AAA')
UPDATE LOW PRIORITY Table1
SET name = 'BBB'
SELECT name
FROM Table1
Will it return BBB?
It depends.
After the INSERT, name is 'AAA'.
When the UPDATE is issued, if no other client is reading from the
table, the UPDATE executes and changes name to 'BBB'.  Then the SELECT
also returns 'BBB'.  (The distinction that you draw in another message
between on disk and in the cache is irrelevant.)
If some other client happens to be reading from the table, the UPDATE
blocks until no client is reading and then executes.
Then the SELECT also returns 'BBB', as above.
Now, this result depends on the UPDATE and the SELECT being issued by the
same time.  If one client issues the UPDATE and another issues the SELECT,
it's perfectly posssible for the SELECT to return 'AAA'.
--
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: UPDATE LOW PRIORITY

2004-11-01 Thread Paul DuBois
At 11:22 -0500 11/1/04, Paul DuBois wrote:
At 12:46 -0300 11/1/04, Ronan Lucio wrote:
  What is the correct result?
The correct result is the data in the updated column after commit.
For example, if I have:
Table1
=
- id
- name
INSERT INTO Table1 (id, name) VALUES (1, 'AAA')
UPDATE LOW PRIORITY Table1
SET name = 'BBB'
SELECT name
FROM Table1
Will it return BBB?
It depends.
After the INSERT, name is 'AAA'.
When the UPDATE is issued, if no other client is reading from the
table, the UPDATE executes and changes name to 'BBB'.  Then the SELECT
also returns 'BBB'.  (The distinction that you draw in another message
between on disk and in the cache is irrelevant.)
If some other client happens to be reading from the table, the UPDATE
blocks until no client is reading and then executes.
Then the SELECT also returns 'BBB', as above.
Now, this result depends on the UPDATE and the SELECT being issued by the
same time.  If one client issues the UPDATE and another issues the SELECT,
it's perfectly posssible for the SELECT to return 'AAA'.

Sorry, mistake in the preceding para:
issued by the same time - issued by the same client.
--
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]


mysqldump

2004-11-01 Thread Josh Howe
 

Hi,

 

Can anybody help me with a linux newbie question. I want to use
mysqldump to backup all of the tables in a database that start with z_.
Can I do this in linux with a single line? Thanks.



my.cnf parameter settings for 4 GB RAM

2004-11-01 Thread Anil Doppalapudi
please provide me listof my.cnf parameter values for 4 GB RAM . from support
files i can list out only upto 2 GB RAM

my database is mysql 4.0.20 binary installation on linux and along with
database apache, tomcat and one more application is running on the server.


Thanks in advance
Anil



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



Query Building Help

2004-11-01 Thread Ryan Sommers
I have 2 tables, category and ticket (relevant description follows):

mysql describe ticket;
+-+-+--+-+-++
| Field   | Type| Null | Key | Default
| Extra  |
+-+-+--+-+-++
| id  | int(6) unsigned |  | PRI | NULL  |
auto_increment |
| catid   | int(6) unsigned |  | | 0 |
   |
| state   | tinyint(3) unsigned | YES  | | 0 |
   |
+-+-+--+-+-++
mysql describe category;
+---+-+--+-+-++
| Field | Type| Null | Key | Default | Extra  |
+---+-+--+-+-++
| id| int(6) unsigned |  | PRI | NULL| auto_increment |
| name  | char(128)   |  | | ||
+---+-+--+-+-++

ticket.catid := SELECT id FROM category;

I'm trying to formulate a single SELECT query (possible subqueries) to
return the following data: category.id AS catid, category.name AS catname,
(SELECT catid, COUNT(catid) AS tick_total FROM ticket GROUP BY catid),
(SELECT state, count(state) AS state_count FROM ticket WHERE catid=X GROUP
BY state)

Basically:
 - category id and name
 - total number of tickets in the category
 - total number of tickets in each state per category.

Row would look like:
catname | catid | tick_total | state_0_count | state_1_count | ... |
state_n_count

Is this possible using queries and subqueries? Or would this be something
I'd have to use procedures for? (I'm working on 4.1 so no procedures,
which is why I ask.)

I've been trying to find a way to do it with subqueries but the roadblock
I seem to be hitting is I need some way to turn the fields of a row from
one query into the columns of another query.

Note, I know this could be easily accomplished in the program instead of
MySQL, but it's always a challenge to see how much I can stuff into a
single query.


-- 
Ryan Sommers
[EMAIL PROTECTED]


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



Re: my.cnf parameter settings for 4 GB RAM

2004-11-01 Thread Gleb Paharenko
Hi.



Tune key_buffer_size for it. And you may want to order commercial support to receive 
finetune of your server: go to https://order.mysql.com/?ref=ensita



Anil Doppalapudi [EMAIL PROTECTED] wrote:

 please provide me listof my.cnf parameter values for 4 GB RAM . from support

 files i can list out only upto 2 GB RAM

 

 my database is mysql 4.0.20 binary installation on linux and along with

 database apache, tomcat and one more application is running on the server.

 

 

 Thanks in advance

 Anil

 

 

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




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



Disincluding columns when using load data

2004-11-01 Thread Dan Stark
I've checked through the archives a documentation but cannot find an
answer to my problem. I'm attempting to load data from a text file
that has a column that is not present in my database table.

Table
B C D

File
A B C D

I've been trying to find a way to ignore the first column of the text
file by specifiing columns like:
(Null,B,C,D) or ('',B,C,D) but mysql doesn't understand these
commands. Is there a way to ignore columns with load data?

TIA

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



mysql admin clients

2004-11-01 Thread leegold
newbie question about mysql admin clients. What are some good ones? And
importantly can they access and allow me to edit the db record fields
themselves? eg. I see a mis-spelled word in a field - I could go in
there and edit the field.

Thanks,
lee G

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



Updating rows from a query

2004-11-01 Thread Stephen Rasku
I am using the C API with MySQL 4.0.17 on QNX 6.2.1b.

I want to update the rows that are returned as I get them.  Is this
possible.  Here's a simplified version of what I am trying to do:

query = select seqNo, priority from packet where timestamp  now() -
interval 15 second order by priority desc, timestamp;
mysql_query(mysql, query);
result = mysql_use_result(mysql);

while (row = mysql_fetch_row(result))
{
seqNo = atoi(row[0]);
priority = atoi(row[1]);

sprintf(updateStr, update packet set timestamp = now() where
seqNo = %d, seqNo);
mysql_query(mysql, updateStr);
}

However, when I do this, I get:

Commands out of sync;  You can't run this command now

Anyone have any ideas on how to to accomplish this?

...Stephen

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



Re: [users@httpd] November 2, 2004

2004-11-01 Thread Patrick Donker
GH wrote:
Greetings:
  This is just a friendly reminder that if you are registered in the
United States to VOTE on November 2, 2004 (TOMORROW)
  Need to know where you vote?
 Please see the attached file (it is an image) that contains some information
Do we care? Realy? Unlikely. Maybe you should send your 'useful' info on 
 a national mailinglist only.

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


Re: Updating rows from a query

2004-11-01 Thread Paul DuBois
At 15:18 -0800 11/1/04, Stephen Rasku wrote:
I am using the C API with MySQL 4.0.17 on QNX 6.2.1b.
I want to update the rows that are returned as I get them.  Is this
possible.  Here's a simplified version of what I am trying to do:
query = select seqNo, priority from packet where timestamp  now() -
interval 15 second order by priority desc, timestamp;
mysql_query(mysql, query);
result = mysql_use_result(mysql);
while (row = mysql_fetch_row(result))
{
seqNo = atoi(row[0]);
priority = atoi(row[1]);
sprintf(updateStr, update packet set timestamp = now() where
seqNo = %d, seqNo);
mysql_query(mysql, updateStr);
}
However, when I do this, I get:
Commands out of sync;  You can't run this command now
Anyone have any ideas on how to to accomplish this?
You have to use mysql_store_result(), not mysql_use_result().
--
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]


Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

2004-11-01 Thread Cecep Rosuludin
Dear AlL,

my former question is how to run mysql service. but now  i have run mysql service

[EMAIL PROTECTED] root]# service mysql start
Starting MySQL Server   [  OK  ]

but i still cannot connect to mysql

[EMAIL PROTECTED] root]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/m
ysql.sock' (2)

can you give some advice..! what should i do.
-- 
___
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10


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



Re: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

2004-11-01 Thread Pahlevanzadeh Mohsen
It can has many reason:
1.Your Socket file doesn't exist!
2.If it does exist,Please kill your mysql  instead of
running its daemon,run its file in bg mode. (with 
sign)


--- Cecep Rosuludin [EMAIL PROTECTED] wrote:

 Dear AlL,
 
 my former question is how to run mysql service.
 but now  i have run mysql service
 
 [EMAIL PROTECTED] root]# service mysql start
 Starting MySQL Server   
[  OK  ]
 
 but i still cannot connect to mysql
 
 [EMAIL PROTECTED] root]# mysql
 ERROR 2002: Can't connect to local MySQL server
 through socket '/var/lib/mysql/m
 ysql.sock' (2)
 
 can you give some advice..! what should i do.
 -- 
 ___
 Find what you are looking for with the Lycos Yellow
 Pages

http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:   

http://lists.mysql.com/[EMAIL PROTECTED]
 
 


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator   programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


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



RE: mysql online administration docs equivalent of the book?

2004-11-01 Thread Eko Budiharto
MySQL online administration docs equivalent of the book. They are
exactly the same.
If you need more advanced details in about administration, you can read
some other books.


-Original Message-
From: Mark Day [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 9:25 AM
To: [EMAIL PROTECTED]
Subject: mysql online administration docs equivalent of the book?

Hello, I was wondering if people consider the on line docs at the mysql 
web site to be equivalent to their books
regarding the database administration. Does the book go into more 
detail, or is all the contents of that book online?
Thanks for the clarification, and pointers to good online mysql 
administration docs.




-- 
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: Can't connect to local MySQL server through socket'/var/lib/m ysql/mysql.sock'

2004-11-01 Thread Cecep Rosuludin
Spenser,

thanks for respons, I have done what you've ever done. this the result

[EMAIL PROTECTED] root]# ps -e | grep mysql
[EMAIL PROTECTED] root]#


- Original Message -
From: Spenser [EMAIL PROTECTED]
To: Cecep Rosuludin [EMAIL PROTECTED]
Subject: Re: Can't connect to local MySQL server through 
socket'/var/lib/mysql/mysql.sock'
Date: Mon, 01 Nov 2004 18:51:09 -0600

 
 I've had this happen when the server was down.  If you're using Linux
 check the processes:
 
 ps -e | grep mysql
 
 This has also happened to me when I make changes to my data directory
 for MySQL and the new directory doesn't have the proper permissions or
 ownership.  
 
 

-- 
___
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10


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



How do I export a set of data nightly

2004-11-01 Thread Scott Haneda
My query works:
(version 4)

SELECT u.id, r.user_id,
   u.first_name, u.middle_name, u.last_name,
   u.company, u.department, u.address, u.address2,
   u.city, u.state, u.country, u.zip,
   u.phone, u.fax, u.email,
   DATE_FORMAT(u.updated, '%m/%d/%Y'), DATE_FORMAT(u.added, '%m/%d/%Y'),
   r.serial, r.product, DATE_FORMAT(r.added, '%m/%d/%Y')
FROM user as u 
INNER JOIN registered_serials as r
WHERE u.id = r.user_id LIMIT 10

However, I need to run this once a day on schedule via cron, but I am not
sure how to feed this statement into mysql from bash, can someone point me
to the correct way?

-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com Fax: 313.557.5052
[EMAIL PROTECTED]  Novato, CA U.S.A.



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



Re: mysql admin clients - But can I edit a column field?

2004-11-01 Thread leegold

On Tue, 2 Nov 2004 01:12:37 +0200, Polyakov Dmitryi
[EMAIL PROTECTED] said:
 Hello leegold,
  for what OS? or you need just web-based app?
 for win - MySQLFront
 web-based - phpMyAdmin (PHP required)
 Tuesday, November 2, 2004, 12:57:46 AM, you wrote:


But can I edit a column field? Can I go into a specific column in a
specific record and edit it just like I was in a text editor? That's the
action I want. None on the products specifically state they can do it(?)
Thanks




 
 l newbie question about mysql admin clients. What are some good ones?
 And
 l importantly can they access and allow me to edit the db record fields
 l themselves? eg. I see a mis-spelled word in a field - I could go in
 l there and edit the field.
 
 l Thanks,
 lee G
 

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



Re: How do I export a set of data nightly

2004-11-01 Thread ian douglas
There are lots of ways to do it. My personal favorite is to write it in 
Perl with the DBI library and tell cron to run that Perl script ... your 
Perl script could then write the data in any format you see fit, even 
send it somewhere else using Net::FTP or whatever.

Just my $0.02...
-id
Scott Haneda wrote:
My query works:
(version 4)
SELECT u.id, r.user_id,
   u.first_name, u.middle_name, u.last_name,
   u.company, u.department, u.address, u.address2,
   u.city, u.state, u.country, u.zip,
   u.phone, u.fax, u.email,
   DATE_FORMAT(u.updated, '%m/%d/%Y'), DATE_FORMAT(u.added, '%m/%d/%Y'),
   r.serial, r.product, DATE_FORMAT(r.added, '%m/%d/%Y')
FROM user as u 
INNER JOIN registered_serials as r
WHERE u.id = r.user_id LIMIT 10

However, I need to run this once a day on schedule via cron, but I am not
sure how to feed this statement into mysql from bash, can someone point me
to the correct way?

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


Re: mysql admin clients - But can I edit a column field?

2004-11-01 Thread ian douglas
But can I edit a column field? Can I go into a specific column in a
specific record and edit it just like I was in a text editor? That's the
action I want. None on the products specifically state they can do it(?)
phpMyAdmin will allow you to alter a column name within a table, yes.
can't speak for other tools though, but phpMyAdmin has been pretty 
stable for me for the last number of years.

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


Re: Can't connect to local MySQL server through socket'/var/lib/m ysql/mysql.sock'

2004-11-01 Thread Cecep Rosuludin
Spenser,

[EMAIL PROTECTED] root]# ls -l /var/lib/mysql
total 20564
-rw-rw  1 mysql mysql25088 Nov  1 14:10 ib_arch_log_00
-rw-rw  1 mysql mysql 10485760 Nov  2 07:39 ibdata1
-rw-rw  1 mysql mysql  5242880 Nov  2 07:39 ib_logfile0
-rw-rw  1 mysql mysql  5242880 Nov  1 14:10 ib_logfile1
drwx--x--x  2 mysql mysql 4096 Feb 23  2004 mysql/
-rw-rw  1 mysql root  7509 Nov  2 07:39 server6.cma-cgm.com.err
drwxr-xr-x  2 mysql mysql 4096 Feb 23  2004 test/

Actually, this the third version that I installed.

1.mysql-standard-4.1.7-pc-linux-i686.tar.gz (delete)
2.MySQL-server-4.1.7-0.i386.rpm (I removed by rpm -e filename)
3.the third one, I install mysql from Mandrake cd installer


- Original Message -
From: Spenser [EMAIL PROTECTED]
To: Cecep Rosuludin [EMAIL PROTECTED]
Subject: Re: Can't connect to local MySQL server through 
socket'/var/lib/mysql/mysql.sock'
Date: Mon, 01 Nov 2004 19:06:43 -0600

 
 Well, this definitely indicates that the server's not running.  Of
 course, maybe that's what you were saying in your original posting. Try
 checking the permissions of /var/lib/mysql or wherever it said that the
 socket should be in that error message.
 
 ls -l /var/lib/mysql 
 
 It should show that the owner of that directory is mysql.
 
 You may have a problem with your original installation.  Have you ever
 successfully run MySQL on this serve before.  If not, you might want to
 download the rpm files from mysql.com for the latest stable version and
 install or upgrade the software.
 
 
 On Mon, 2004-11-01 at 19:01, Cecep Rosuludin wrote:
  Spenser,
  
  thanks for respons, I have done what you've ever done. this the result
  
  [EMAIL PROTECTED] root]# ps -e | grep mysql
  [EMAIL PROTECTED] root]#
  
 
 
 

-- 
___
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10


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



Re: How do I export a set of data nightly

2004-11-01 Thread Spenser
You could write a bash script like this:

#!/bin/bash

mysql -u username -ppassword --exec=SELECT...;  textfile.txt


There's no space after -p and before the password.  This will export the
results to a simple text file.  It might not be in format you want
though.  But, it gives you an idea of how to pull this off.


On Mon, 2004-11-01 at 19:27, Scott Haneda wrote:
 My query works:
 (version 4)
 
 SELECT u.id, r.user_id,
u.first_name, u.middle_name, u.last_name,
u.company, u.department, u.address, u.address2,
u.city, u.state, u.country, u.zip,
u.phone, u.fax, u.email,
DATE_FORMAT(u.updated, '%m/%d/%Y'), DATE_FORMAT(u.added, '%m/%d/%Y'),
r.serial, r.product, DATE_FORMAT(r.added, '%m/%d/%Y')
 FROM user as u 
 INNER JOIN registered_serials as r
 WHERE u.id = r.user_id LIMIT 10
 
 However, I need to run this once a day on schedule via cron, but I am not
 sure how to feed this statement into mysql from bash, can someone point me
 to the correct way?
 
 -- 
 -
 Scott HanedaTel: 415.898.2602
 http://www.newgeo.com Fax: 313.557.5052
 [EMAIL PROTECTED]  Novato, CA U.S.A.
 
 


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



Re: How do I export a set of data nightly

2004-11-01 Thread Daniel Kasak
Scott Haneda wrote:
My query works:
(version 4)
SELECT u.id, r.user_id,
  u.first_name, u.middle_name, u.last_name,
  u.company, u.department, u.address, u.address2,
  u.city, u.state, u.country, u.zip,
  u.phone, u.fax, u.email,
  DATE_FORMAT(u.updated, '%m/%d/%Y'), DATE_FORMAT(u.added, '%m/%d/%Y'),
  r.serial, r.product, DATE_FORMAT(r.added, '%m/%d/%Y')
FROM user as u 
INNER JOIN registered_serials as r
WHERE u.id = r.user_id LIMIT 10

However, I need to run this once a day on schedule via cron, but I am not
sure how to feed this statement into mysql from bash, can someone point me
to the correct way?
 

Write your script with the following line at the top:
tee /path/to/output/file.sql
The 'tee' command tells mysql to output to the given file.
The put the select / whatever commands after this command.
Save the file, for example, as my_nightly_sql_commands.sql
The set up a cron job to call the script:
#!/bin/sh
mysql -u username -ppassword  /path/to/my_nightly_sql_commands.sql
Note that there is NO space between the '-p' and the password.
That's about it. I haven't tested the above, but it should work. At 
least I use each of the individual parts at one point or another, but 
never all together.

Dan
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Can't connect to local MySQL server through socket'/var/lib/m ysql/mysql.sock'

2004-11-01 Thread ian douglas
[EMAIL PROTECTED] root]# ls -l /var/lib/mysql
total 20564
-rw-rw  1 mysql mysql25088 Nov  1 14:10 ib_arch_log_00
-rw-rw  1 mysql mysql 10485760 Nov  2 07:39 ibdata1
-rw-rw  1 mysql mysql  5242880 Nov  2 07:39 ib_logfile0
-rw-rw  1 mysql mysql  5242880 Nov  1 14:10 ib_logfile1
drwx--x--x  2 mysql mysql 4096 Feb 23  2004 mysql/
-rw-rw  1 mysql root  7509 Nov  2 07:39 server6.cma-cgm.com.err
drwxr-xr-x  2 mysql mysql 4096 Feb 23  2004 test/
Therein lies your problem: you can't connect to 
/var/lib/mysql/mysql.sock if it doesn't exist :o)

RedHat was notorious for putting mysql.sock in /tmp/ ... perhaps check 
that path to see if the socket file exists there, and do one of the 
following:

(a) symlink it to /var/lib/mysql:
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
-OR-
(b) modify your MySQL configuration (check for /etc/my.cnf):
under the [mysqld] heading:
socket=/var/lib/mysql/mysql.sock
... set that path and filename to wherever your mysql.sock file lives.
You could try using:
locate mysql.sock
... to find the file for you as well.
-id
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: How do I export a set of data nightly

2004-11-01 Thread Daniel Kasak
Daniel Kasak wrote:
Write your script with the following line at the top:
tee /path/to/output/file.sql

Actually thinking about this more, you can probably skip this bit and 
just direct your output from the command called by cron, as per 
Spenser's example.
ie:

mysql -u username -ppassword  /path/to/my_nightly_sql_commands.sql  
/path/to/output_file.sql

It seems a bit cleaner...
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

question about typing mysql table names

2004-11-01 Thread Ginger Cheng
Hello, MySQL gurus,
  I am just wondering if there is a way to set MySQL so that you 
can have the name of the mysql table completed for you if you hit tab, 
like typing file names in bash, you only need to type enough characters 
to uniquely identify the file or directory name, then you press tab, the 
rest will be out automatically?
  It may be a stupid question but I like to use informative name 
while still trying to escape from boring typing.

  Thank you for helps. Hope you all had a great halloween
--
ginger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: question about typing mysql table names

2004-11-01 Thread Spenser
It should already by enabled for you unless you have the line
no-auto-rehash in your my.cnf configuration file.  Or you could be
starting mysql with --no-auto-rehash or -a.

On Mon, 2004-11-01 at 20:27, Ginger Cheng wrote:
 Hello, MySQL gurus,
I am just wondering if there is a way to set MySQL so that you 
 can have the name of the mysql table completed for you if you hit tab, 
 like typing file names in bash, you only need to type enough characters 
 to uniquely identify the file or directory name, then you press tab, the 
 rest will be out automatically?
It may be a stupid question but I like to use informative name 
 while still trying to escape from boring typing.
 
Thank you for helps. Hope you all had a great halloween
 
 -- 
 ginger
 


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



Re: question about typing mysql table names

2004-11-01 Thread Paul DuBois
At 18:27 -0800 11/1/04, Ginger Cheng wrote:
Hello, MySQL gurus,
  I am just wondering if there is a way to set MySQL so that you 
can have the name of the mysql table completed for you if you hit 
tab, like typing file names in bash, you only need to type enough 
characters to uniquely identify the file or directory name, then you 
press tab, the rest will be out automatically?
  It may be a stupid question but I like to use informative name 
while still trying to escape from boring typing.

  Thank you for helps. Hope you all had a great halloween
mysql --auto-rehash db_name
Hit tab to complete.  If it doesn't complete, the letters typed so far
are ambiguous.  Hit tab again to see the possible completions.
You do need to type a database name on the command line.
--
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]


Utf8 collations

2004-11-01 Thread Brown, Brooks
All of the unicode collations listed in the reference manual except the binary 
collations are not sensitive to diacritical marks.  That is, if I do the following:

create table t ( filename varchar(260) ) type=InnoDB CHARACTER SET utf8 collate 
utf8_unicode_ci;

-- insert an e-acute
insert into t values ( x'c3a9' ); 

mysql select * from t where filename = 'e';
+--+
| f|
+--+
| é|
+--+

The problem is that e really isn't the same as e-acute for the file system.  Ideally, 
what I want is a collation that is case insensitive, but is sensitive to diacritical 
symbols, but a case sensitive collation would be okay if it were sensitive to 
diacritical symbols?  Is there none available for utf8 as the manual indicates?  If 
not, how difficult would it be to develop one?

I am using 4.1.3 on Mac OS X.

Brooks R. Brown
Software Engineer
Extensis, Inc.
http://www.extensis.com/


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



Re: Can't connect to local MySQL server through socket'/var/lib/m ysql/mysql.sock'

2004-11-01 Thread Cecep Rosuludin
ian,

[EMAIL PROTECTED] root]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
[EMAIL PROTECTED] root]#

this my script of my.cnf

[client]
port= 3306
socket  = /var/lib/mysql/mysql.sock

[mysqld]
port= 3306
socket  = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
net_buffer_length = 2K
thread_stack = 64K
server-id   = 1



- Original Message -
From: ian douglas [EMAIL PROTECTED]
To: Cecep Rosuludin [EMAIL PROTECTED]
Subject: Re: Can't connect to local MySQL server through 
socket'/var/lib/mysql/mysql.sock'
Date: Mon, 01 Nov 2004 17:48:27 -0800

 
  [EMAIL PROTECTED] root]# ls -l /var/lib/mysql
  total 20564
  -rw-rw  1 mysql mysql25088 Nov  1 14:10 ib_arch_log_00
  -rw-rw  1 mysql mysql 10485760 Nov  2 07:39 ibdata1
  -rw-rw  1 mysql mysql  5242880 Nov  2 07:39 ib_logfile0
  -rw-rw  1 mysql mysql  5242880 Nov  1 14:10 ib_logfile1
  drwx--x--x  2 mysql mysql 4096 Feb 23  2004 mysql/
  -rw-rw  1 mysql root  7509 Nov  2 07:39 server6.cma-cgm.com.err
  drwxr-xr-x  2 mysql mysql 4096 Feb 23  2004 test/
 
 Therein lies your problem: you can't connect to 
 /var/lib/mysql/mysql.sock if it doesn't exist :o)
 
 RedHat was notorious for putting mysql.sock in /tmp/ ... perhaps check 
 that path to see if the socket file exists there, and do one of the 
 following:
 
 (a) symlink it to /var/lib/mysql:
 
   ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
 
 -OR-
 
 (b) modify your MySQL configuration (check for /etc/my.cnf):
 
   under the [mysqld] heading:
 
   socket=/var/lib/mysql/mysql.sock
 
 ... set that path and filename to wherever your mysql.sock file lives.
 
 You could try using:
 
   locate mysql.sock
 
 ... to find the file for you as well.
 
 -id
 
 

-- 
___
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10


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



Re: Can't connect to local MySQL server through socket'/var/lib/m ysql/mysql.sock'

2004-11-01 Thread ian douglas
[EMAIL PROTECTED] root]# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
[mysqld]
port= 3306
socket  = /var/lib/mysql/mysql.sock
Which is fine ... you neglected to say whether or not that fixed your 
problem?

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


RE: max allowed packet error

2004-11-01 Thread Ferino Mardo
yes that I did (installed binaries) and it's working now. *sigh*

wish I could use the source.

 -Original Message-
 From: Gleb Paharenko [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 01, 2004 06:56 PM
 To: [EMAIL PROTECTED]
 Subject: Re: max allowed packet error
 
 
 Hi.
 
 
 
 Please download and install official binaries, as this looks 
 like a compilation bug which is likely to occur when 
 compilation is done by hands on Linux. :)
 
 
 
 folks I have successfully compiled and install mysql-4.1.7 
 from source
 
 in my Debian (3.0, lots of free space in hd, 64MB RAM) woody 
 and was in
 
 the stage of doing a bin/mysql_install_db --user=mysql 
 when I got the
 
 following error:
 
 
 
 
 
 ERROR: 1153  Got a packet bigger than 'max_allowed_packet' bytes
 
 041101 15:25:48 [ERROR] Aborting
 
 
 
 041101 15:25:48 [Note] /usr/local/mysql/libexec/mysqld: Shutdown
 
 complete
 
 
 
 
 
 I have copied the mysql-medium.cnf to /etc/my.cnf and have 
 noticed that
 
 the max-allowed-packet is 1M. no matter what I set it to 
 8M, 10M, 16M
 
 I still get the error.
 
 
 
 I have now attached the mysqlbug report for further info. I hope 
 there's
 
 a solution for this.
 
 
 
 
 
 -- 
 For technical support contracts, goto 
 https://order.mysql.com/?ref=ensita
 This email is sponsored by Ensita.NET http://www.ensita.net/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
 /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
___/   www.mysql.com
 
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 

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



How can I store Images in the MySQL Database

2004-11-01 Thread Mulley, Nikhil
Hi Lists ,
 
My Query is How Can I store Images in the MySQL Database , and how to Index them , 
can anybosy help me on this please
 
I am starting out a Online Photo Gallery and want to share them , and I want to 
make the search available, Does anybody has already done on this ?
 
Please help me in this.
 
Regards,
Nikhil.


RE: How can I store Images in the MySQL Database

2004-11-01 Thread Dave Tiger
Hi Nikhil,

Have a look at www.hotscripts.com for either a script that dose this or a
tutorial to show you how to do it.

But in general you DO NOT store the image in a MySql table you just store
its location  name i.e. 'images/image1.png' and then with a select
statement use the result in a 'img src' string for your script.

Here is another place to start for a PHP example but there a loads for other
scripting languages.

http://www.zend.com/zend/tut/photogallery.php

I hope that helps

Dave Carrera


-- 
UK Web Hosting @ http://www.ephgroup.com  


-Original Message-
From: Mulley, Nikhil [mailto:[EMAIL PROTECTED] 
Sent: 02 November 2004 05:05
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: How can I store Images in the MySQL Database


Hi Lists ,
 
My Query is How Can I store Images in the MySQL Database , and how to
Index them , can anybosy help me on this please
 
I am starting out a Online Photo Gallery and want to share them , and I
want to make the search available, Does anybody has already done on this ?
 
Please help me in this.
 
Regards,
Nikhil.

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 29/10/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 29/10/2004
 


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