perl-DBI Question

2002-07-05 Thread Brian Warn

Hello, I need some advice regarding a scrolling list that I've built
from a query.  I can generated the scrolling list just fine, but when I
try to put the subroutine within a table (cell), all I get is a hash
reference:

-+-+
Date | column  |
-+-+
date_calc(DBI::db=HASH(0xfdd40)) +2|
-+-+

Code for above output:

print start_form (-method = post, -action = url ());
print table align=\center\ border=\1\ cellspacing=\0\;
print trtdDate/tdtdcolumn/td/tr;
print trtddate_calc($dbh)/tdtd2/td/tr;
print /table;
print end_form ();

Now, if I break apart the line that generates the above, I get the
scrolling list to appear properly, but it doesn't appear in the first
cell, it appears above the table.  I get a '1' which indicates I believe
that the subroutine returned a true value: 

(scrolling list appears here)
---+-+
Date   | column  |
---+-+
1  +2|
---+-+

Code for above output:

print start_form (-method = post, -action = url ());
print table align=\center\ border=\1\ cellspacing=\0\;
print trtdDate/tdtdcolumn/td/tr;
print trtd . date_calc($dbh) . /tdtd2/td/tr;
print /table;
print end_form ();

Please advise what I should do to correct this.  BTW, the subroutine I'm
using for the above is as follows:

sub date_calc {
$dbh = shift;
($sth, $stmt);
$stmt = qq { select distinct When from rCam order by When desc
};
$sth = $dbh-prepare ($stmt);
$sth-execute ();
print select name=\dates\;
while ($row = $sth-fetchrow_hashref ()){
push (@date_ary,$row-{When});
}
$sth-finish ();
foreach $elt (@date_ary){
print option$elt/option\n;
}
print /select\n;
}

Thanks,
Brian


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Some PHP - mySQL help please ... new to both

2002-03-08 Thread Brian Warn

Did you check the mysql db, host, and user tables to make sure that
'localhost' and 'administrator' have appropriate permissions to use your
desired database?  This issue caused me much frustration until I had
things set right.  You should see something like the following.  I'm
assuming that your PHP application and your mysql db live on the same
box.  If it's a PHP issue, then I don't know what to advise you since I
don't know PHP.

mysql use mysql;
mysql select * from user;
+-+--+--+-+-
+-+-+-+---+-
+---+--+---++---
--+++
| Host| User | Password | Select_priv |
Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv |
Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv |
References_priv | Index_priv | Alter_priv |
+-+--+--+-+-
+-+-+-+---+-
+---+--+---++---
--+++
| localhost   | administrator |  | Y
| Y   | Y   | Y   | Y   | Y | Y
| Y | Y| Y | Y  | Y
| Y  | Y  |

mysql select * from host;
+-+---+-+-+-
+-+-+---++--
---+++
| Host| Db| Select_priv | Insert_priv |
Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv |
References_priv | Index_priv | Alter_priv |
+-+---+-+-+-
+-+-+---++--
---+++
| localhost   | your_db_name | Y   | Y   | Y
| Y   | Y   | Y | Y  | Y   |
Y  | Y  |


mysql select * from db;
+-+-+--+-+--
---+-+-+-+---++-
+++
| Host| Db  | User | Select_priv |
Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv |
Grant_priv | References_priv | Index_priv | Alter_priv |
+-+-+--+-+--
---+-+-+-+---++-
+++
| localhost (you could try % if the box isn't visible to anyone but you)
| your_db_name   | administrator | Y   | Y   | Y
| Y   | Y   | Y | Y  | Y   |
Y  | Y  |

-Original Message-
From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 08, 2002 9:05 AM
To: [EMAIL PROTECTED]
Subject: Some PHP - mySQL help please ... new to both


I am very new to both PHP and mySQL.  Any help would be greatly
appreciated.

While running this code I get  following fatal error.

PHP is installed and running correctly on the server.
mySQL I THINK is running properly.  I created a table and this code is
from a tutorial I am trying to run through for discussion threads.  No
matter what I make the connection as (admin or nobody)  I still get the
same result, which leads me to believe that there is something wrong
with the coding.  I am too new to this to debug.  Line 5 of the
dbconnect.php file
is where the script stops.   again any help would be greatly
appreciated.


?
LINE 5  if (!($mylink = mysql_connect
(localhost,administrator,)))
 {
  print h3could not connect to database/h3\n;
  exit;
 }
 mysql_select_db(mytest);
?

RESULT  while trying to run script.

Fatal error: Maximum execution time of 60 seconds exceeded in
dbconnect.php on line 5


Thank You



Daniel Negrón
Lotus Notes Administrator / Developer
KB Electronics, Inc.
954.346.4900x122
http://www.kbelectronics.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? 

DBD::mysql for non-mysql box

2002-03-07 Thread Brian Warn

If I want to load DBD::mysql on a box where mysql is not installed, do I
need to install some mysql components?  I'm doing this because I'll be
connecting to a remote box from my perl script to query, etc. mysql on the
remote box.  While using cpan to install the DBD::mysql module, I received
the following errors:

Can't exec mysql_config: No such file or directory at Makefile.PL line
167.
Failed to determine directory of mysql.h. Use perl Makefile.PL
--cflags=-Idir

Since mysql.h normally lives in $MYSQL/include, I'm thinking that I'll have
to install it locally to make this work.

Thanks,
Brian

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: :mysql for non-mysql box

2002-03-07 Thread Brian Warn

Please disregard.  I finally found the answer -- I need mysql client
software on the local box -- in the online documentation.

Brian

-Original Message-
From: Brian Warn [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 3:40 PM
To: 'MySQL List'
Subject: DBD::mysql for non-mysql box


If I want to load DBD::mysql on a box where mysql is not installed, do I
need to install some mysql components?  I'm doing this because I'll be
connecting to a remote box from my perl script to query, etc. mysql on
the remote box.  While using cpan to install the DBD::mysql module, I
received the following errors:

Can't exec mysql_config: No such file or directory at Makefile.PL line
167. Failed to determine directory of mysql.h. Use perl Makefile.PL
--cflags=-Idir

Since mysql.h normally lives in $MYSQL/include, I'm thinking that I'll
have to install it locally to make this work.

Thanks,
Brian

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




3.22.32: max table size

2002-02-22 Thread Brian Warn

As show table status doesn't appear to be supported in this older version
I'm using, how did you who used this version get max table size information?
I haven't been to find anything from the list archives/manual about this.

Brian
sql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: 3.22.32: max table size

2002-02-22 Thread Brian Warn

I did see that reference, but found that myisamchk wasn't an option
either.  I did find isamchk is available and have been seeing what
information it is able to provide.  I'm wondering now whether summing
the table.ISD, table.ISM, and table.frm filesizes that I get from a
simple ls -l output will give me the total diskspace occupied by the
table?

Brian
sql,query

-Original Message-
From: Gurhan Ozen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 22, 2002 8:58 AM
To: Brian Warn; 'MySQL List'
Subject: RE: 3.22.32: max table size


Quoted from http://www.mysql.com/doc/T/a/Table_size.html is:

By default, MySQL tables have a maximum size of about 4G. You can check
the maximum table size for a table with the SHOW TABLE STATUS command or
with the myisamchk -dv table_name. See section 4.5.6 SHOW Syntax. 

Gurhan

-Original Message-
From: Brian Warn [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 11:28 AM
To: 'MySQL List'
Subject: 3.22.32: max table size


As show table status doesn't appear to be supported in this older
version I'm using, how did you who used this version get max table size
information? I haven't been to find anything from the list
archives/manual about this.

Brian
sql,query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




v3.22.32 and temp tables

2002-02-19 Thread Brian Warn

Hi,
I want to build a temp table which I can query to sum values.  If I try
create temporary table tbl_name select some_query_here, then I get an
error that tells me that I have an error with my sql syntax near 'temporary
table tbl_name select some_query_here'.  Am I correct in thinking that this
is due to the version of mysql I'm using?  (No, I can't upgrade it at this
point).

I wasn't successful in finding the answer to my dilemma at
www.mysql.com/doc/manual.php.  

Thanks,
Brian 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




explain table within perl DBI

2002-02-14 Thread Brian Warn

When I run the code  below, information about the first column in each
table in my list is excluded.  Any ideas why?

@table_listing=`cat /usr/local/file.txt`;  # contains table list used
below

$dbh =
DBI-connect(dbi:mysql:database=dbname;host=hostIP;port=port_number,
user, password) or dienice(Can't connect: $DBI:errstr);
foreach $table (@table_listing){
chomp $table;
print ~~ $table Table ~\n;

$statement=explain $table;
$sth = $dbh-prepare($statement) or dienice(Can't prepare
statement: ,$dbh-errstr);
$dbh-errstr;   
$sth-execute;
@row_ary = $sth-fetchrow_array;
while (($expl0,$expl1,$expl2) = $sth-fetchrow_array){
print $expl0 ... $expl1 ... $expl2\n;
}
$sth-finish;
print \n;
}
$dbh-disconnect;

-Brian
sql, query, mysql, database


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




select count distinct

2002-02-13 Thread Brian Warn

I'm stuck right now with using v. 3.22.32.  Yes, I know I need to
upgrade, but I can't for various reasons.  Anyway, I need to do a select
count(distinct column) from table query, but can't since this version
doesn't support it.  How can I do this?

Thanks,
Brian


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: mysql-gui won't connect

2002-01-14 Thread Brian Warn

As I recall when I set this up on my machine, you have to identify your
machine in the host table (identify it as a permitted host), the db
table (let mysql know to what db's, as what user, with what permissions
you're allowed to connect), and I believe the user table to the mysql
db.  With these three mysql db table entries, you should be in business.

Brian 

-Original Message-
From: Mervyn Passmore [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 14, 2002 2:41 PM
To: [EMAIL PROTECTED]
Subject: mysql-gui won't connect


I've installed mysql-gui, but I get the following error message when
trying to connect, after entering my password: Can't connect to local
MySQL server through socket '' (2)

From the command line #mysql -p connects after entering the password.

Have I something else to configure?

Thanks.
Mervyn



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: 'tmp/mysql.sock' (2) error

2001-09-05 Thread Brian Warn

Yes, I gave it 644 permissions.

- Original Message -
From: Carsten H. Pedersen [EMAIL PROTECTED]
To: BW (ST) [EMAIL PROTECTED]; MySQL List [EMAIL PROTECTED]
Sent: Wednesday, September 05, 2001 10:58 AM
Subject: RE: 'tmp/mysql.sock' (2) error


  I'm trying to use a socket besides the standard /tmp/mysql.sock one.
I've
  tried specifying socket=/path/to/socket in both [client] and [mysqld]
  sections of my.cnf, and I've tried to edit safe_mysqld directly with
this
  path.  In all cases, the mysql server appears to start (no error
messages
  are generated when I run S99mysql start, anyway), but I get the
  ERROR 2002:
  Can't connect to local MySQL server through socket '/tmp/mysql.sock'
(2)
  message.
 
  I'm guessing that some other file is overwriting the my.cnf
  settings so that
  the server still expects connections to come through the /tmp/mysql.sock
  socket.  I can't, however, figure out which file that is/may be.
 
  In consulting the docs, all I can glean is that (1) I'm using the wrong
  socket file which is precisely what I'm attempting to do, or (2) per the
  third-to-last bullet at the bottom of p.571 of the mysql manual, I need
to
  somehow notify the clients of the new path.  I believe this is where I'm
  stuck since I thought the [client] setting in my.cnf was suppose
  to do this.
 
  All help to sort this out is appreciated.

 Is my.cnf world readable?

 / Carsten
 --
 Carsten H. Pedersen
 keeper and maintainer of the bitbybit.dk MySQL FAQ
 http://www.bitbybit.dk/mysqlfaq



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL tool

2001-06-06 Thread Brian Warn

I've had good success with DB Tools:  http://dbtools.vila.bol.com.br

- Original Message -
From: Muhammad Asif [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 8:11 AM
Subject: MySQL tool


 Is there any tool available for managing graphically databases,tables as
 well as
 user and their rights for MySQL







 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Apologies in advance

2001-05-24 Thread Brian Warn

If the contractor didn't use a my.cnf file, check your
$MYSQL/bin/safe_mysqld file.  Somewhere around line 124 (v. 3.22.32 on
solaris), you should find and entry such as:

nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR
$MY_OPTS\  $err_log 21



on my redhat box, the entry (line 220 or so) looks like this:
$NOHUP_NICENESS $ledir/$MYSQLD
$defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR
$USER_OPTION --pid-file=$pid_file --skip-locking  $err_log 21


Looks like $MY_BASEDIR_VERSION  and $DATADIR are the variables you need to
check in safe_mysqld.

-Brian

- Original Message -
From: Cal Evans [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 24, 2001 7:42 AM
Subject: Re: Apologies in advance


 Check /etc/my.cnf or /etc/.my.cnf (I forget which)  This should be the
 global conf (ini) file for mysql.

 Cal

 - Original Message -
 From: Joe Fox [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, May 24, 2001 9:22 AM
 Subject: Apologies in advance


  I'm new to Linux and mysql (our web development has always been done by
  outside contractors). They went belly up towards the end of last year
and
 I
  have been maintaining the system ever since (with no major problems).
 
  Today the server had to be rebooted (the first time since they went...)
 and
  when it came back the database was kinda not working (a technical
term).
 I
  think that the basedir and datadir may be pointing to the wrong place.
How
  does somebody with a little (practically none) knowledge of Linux or
mysql
  go about changing these ?
 
  when I try to access the data base I get,
  didn't find any fields in table ABC
  didn't find any fields in table DEF
  didn't find any fields in table .
 
  when I try as ps -elf | grep sql
  I get the 3 processes running with the basedir  datadir =
 /usr/local/mysql
  but unfortunately this is not where my .frm,.ISD,.ISM files are.
 
  sorry about this but in windows terms how do I change my ini file ?
  Joe.
 
 
 
  **
  The information in this email is confidential and is intended
  solely for the addressee(s). Access to this email by anyone
  else is unauthorised. If you are not an intended recipient,
  you must not read, use or disseminate the information
  contained in the email.
  Any views expressed in this message are those of the
  individual sender, except where the sender specifically
  states them to be the views of Dairygold Co-Op Society
  Limited and any of its subsidiaries.
  **
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




set options (not at safe_mysqld at startup)

2001-05-21 Thread Brian Warn

Hello All,

Is there some way, when mysql server is running, to change an option?  I want to 
change skip_networking to OFF without doing a server restart.

Thanks,
Brian



Re: Telnet into MySQL

2001-05-21 Thread Brian Warn

I vote for VanDyke's CRT as well -- lots of features and ~ $30 (US) for the
license.

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 21, 2001 3:04 PM
Subject: Re: Telnet into MySQL



 Any good ones for the Windozes version..When I use just regular ol Telnet
I get Smiley and clovers and hearts and the version.

 Cheers

 -Original Message-
 FROM: Eric Fitzgerald
 TO: Angerer, Chad, 'Tim Thorburn', [EMAIL PROTECTED]
 DATE: Mon 5/21/01 15:58
 SUBJECT: Re: Telnet into MySQL

 I really prefer SecureCRT from VanDyke software myself.  Perfect blend of
 features and simplicity for my needs.  It has a shareware version that
does
 expire, but the license is cheap for it.  Go to www.vandyke.com and
download
 the shareware version to give it a try.
 - Original Message -
 From: Angerer, Chad [EMAIL PROTECTED]
 To: 'Tim Thorburn' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, May 21, 2001 1:58 PM
 Subject: RE: Telnet into MySQL


  go to www.ssh.com .. I beleieve there a few nice clients there.
 
  Chad
 
  -Original Message-
  From: Tim Thorburn [mailto:[EMAIL PROTECTED]]
  Sent: Monday, May 21, 2001 3:21 PM
  To: [EMAIL PROTECTED]
  Subject: Telnet into MySQL
 
 
  Hello,
 
  Can someone here recommend a good Telnet program (with SSH) that I can
use
  to connect to my servers MySQL database?
 
  Preferably something shareware/freeware - but if it must be purchased,
I'm
  not against that.
 
  Thank you
 
  -Tim
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




mysqldump across platforms

2001-05-16 Thread Brian Warn

I'm looking at different ways to backup a database from a solaris 2.8 box to a solaris 
2.7 one.  In addition to the standard system backups that our sysadmins do during the 
week, I want to do a full backup of the database to a box where I have much more disk 
space than the one where the production mysql database sits.  Aside from rcp'ing the 
database, does mysqldump have the abiltiy to backup to another box?  I don't see 
anything in the options -- except for --host maybe -- that allows this sort of thing.

Thanks,
Brian



changing mysql.sock location

2001-05-09 Thread Brian Warn

Hello,
I'm trying to change the location where mysql.sock is written on server startup from 
/tmp to another location.  I've discovered that, on machine (solaris 8; mysql 
v.3.22.32) reboot, that the /tmp directory changes it's permissions to 755 (owned by 
root).  Since safe_mysqld runs as mysql user, I need to change /tmp to 777 and 
manually launch safe_mysqld.  The sysadmins don't want to mess with the default /tmp 
permissions; since I don't want to be paged in the middle of the night if the box goes 
down, I want to have mysql.sock go somewhere else.  

I changed the $MYSQL_UNIX_PORT location in safe_mysqld from /tmp/mysql.sock to the new 
location.  When I fire up the safe_mysqld script, the mysql server log file shows that 
mysqld started OK and is ready for connections.  The web server gives internal 
configuration error messages; the web server log isn't any help -- it just gives 
'premature termination of script headers' message by the script that I called.

I looked at the permissions for mysql.sock at each location.  Both were rwxrwxrwx   1 
mysqlother  0 May  9 12:56 /tmp/mysql.sock.

As I don't know what to do next, I'd appreciate any advice about this...

Thanks,
Brian



Re: some question about create db

2001-05-04 Thread Brian Warn

Might be a case of the blind leading the blind here (list folks: please
correct me if I'm way off base ...)

I believe that one way to do this would be to create a file with any SQL
commands you want to run and then redirect it to mysql via back ticks:

`mysql -uroot  sql_command_file`;

Normally, mysql expects a table listed after -uroot, but it might work if
sql_command_file has 'create database db name here' in it.

-Brian

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 8:34 AM
Subject: some question about create db


 I have to create a database from an application (written in perl)
 how can I do?
 how can I create a db if the user is not a root?
 which command can I use?
 Thank you in advance, Mario.

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




restore 'dumped' database

2001-05-02 Thread Brian Warn

Hi,

How do I restore a copied database that I've created with mysqldump?  I have both the 
DuBois book and, of course, the online manual handy.  I'm obviously looking in the 
wrong area of them because I can't find anything (I thought the keyword 'restore' 
would net me something, but no joy).  I'll happily take my 'RTFM' beatings if someone 
would just point me to the appropriate section(s) of one or both...

-Brian



Re: start mysql at startup

2001-04-10 Thread Brian Warn


I followed the instructions at the top of the mysql.server file and it works
great for me:

# Copyright Abandoned 1996 TCX DataKonsult AB  Monty Program KB  Detron HB
# This file is public domain and comes with NO WARRANTY of any kind

# Mysql daemon start/stop script.

# Usually this is put in /etc/init.d (at least on machines SYSV R4
# based systems) and linked to /etc/rc3.d/S99mysql. When this is done
# the mysql server will be started when the machine is started.

-Brian

- Original Message -
From: "Ngu Nguyen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 10, 2001 10:24 AM
Subject: start mysql at startup


Hi,

I just finished installing mysql, but the only way I can start mysql is
using "./configure" or "./bin/safe_mysqld".  In the documentation it tells
me to use "mysql.server start" but this command doesn't work.  I was
wondering if anyone could tell me what I am doing wrong.

I am also wondering how I could get mysql running at startup.  I have no
clue on how to do this at all.

I'd really appreciate your help.

Thanks,

Ngu



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: environment setting

2001-04-10 Thread Brian Warn

Make sure in (solaris + ksh) /etc/profile or $HOME/.profile that
/usr/local/mysql/bin is in the path for the user under which you run mysql:

e.g.
PATH=/usr/bin:/usr/local/bin:/usr/local/mysql/bin

-Brian

- Original Message -
From: "Ngu Nguyen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 10, 2001 1:05 PM
Subject: environment setting


Hi,

I was wondering how I can run mysql commands without typing
"/usr/local/mysql/bin/" up front.  E.g. Just "mysql --user=... --host=... -p
.." instead of "/usr/local/mysql/bin/mysql --user=... --host=... -p
.."

Thanks,

Ngu



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Mysqld problem Re: ownership/permission problems

2001-04-04 Thread Brian Warn

Not sure how helpful I'll be able to be for you.  I  installed
MySQL-3.23.36-1.i386.rpm and MySQL-client-3.23.36-1.i386.rpm packages.  I
verified that everything worked as root and then shutdown the server.  I
then followed the steps outlined on p. 476 of the manual (also p. 419 of
Monty Widenius' MySQL book).  I also received some advice from another
person on this list -- I've attached it below -- that I used.

I discovered in my (server name).err file -- mine was located in my
/var/lib/mysql directory -- that mysqld couldn't find  the
/var/lib/mysql/mysql/host.frm file.  After changing the permissions on the
mysql table to 760, everything worked fine.  As you'll see below, the
recommendation was to set it to 660.

Hope this helps a bit ...

-Brian
---
Excerpt from note I received:

You should create a "mysql" group also,  and make sure that the "mysql" user
has it as it's "primary group ID" (in /etc/passwd).  Then you can add the
appropriate users (such as your own login) to the group (so you don't have
to be "root" to access the mysql stuff).

You can leave your "mysql" program directory owned by "root.root" (user and
group = "root"),  as long as the "var" subdirectory and all the files and
directories in "var" are owned by "mysql.mysql" with 2770 (rwxrws---) for
the directory permissions and 660 (rw-rw) for the files...   Set the
same ownership and permissions for the 'data' directories (if you've placed
them somewhere else on the system (linked to 'var' via symbolic links).

- Original Message -
From: "Foresight Systems Ltd." [EMAIL PROTECTED]
To: "Brian Warn" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 04, 2001 1:57 AM
Subject: Mysqld problem Re: ownership/permission problems


 Dear Sir,
 Since you already have mysql running, we seek your help in sorting out
 some problem.
 mysqld starts and ends instantaneously.
 BRWe are using Red Hat Linux 7.0 /Apache Server on PIII 550 intel
 processor.
 BRWe have compiled the mysql and installed version 3.23.32.
 BRThe contents of our my.cnf file in /etc is as follows :
 BR
 BR# Example mysql config file.
 BR# You can copy this to one of:
 BR# /usr/local/mysql/etc/my.cnf to set global options,
 BR# mysql-data-dir/my.cnf to set server-specific options (in this
 BR# installation this directory is /usr/local/mysql/var) or
 BR# ~/.my.cnf to set user-specific options.
 BR#
 BR# One can use all long options that the program supports.
 BR# Run the program with --help to get a list of available options

 P# This will be passed to all mysql clients
 BR[client]
 BR#password = my_password
 BRportnbsp; = 3306
 BRsocketnbsp; = /var/lib/mysql/mysql.sock

 P# Here is entries for some specific programs
 BR# The following values assume you have at least 32M ram

 P# The MySQL server
 BR[mysqld]
 BRportnbsp; = 3306
 BRsocketnbsp; = /var/lib/mysql/mysql.sock
 BRskip-locking
 BRset-variable = key_buffer=16M
 BRset-variable = max_allowed_packet=1M
 BRset-variable = thread_stack=128K
 BR# Start logging
 BRlog

 P[mysqldump]
 BRquick
 BRset-variable = max_allowed_packet=16M

 P[mysql]
 BRno-auto-rehash

 P[isamchk]
 BRset-variable = key_buffer=16M
 BR==
 BRThe contents on the error file is follows

 P010403 16:19:55nbsp; mysqld started
 BR010403 16:19:56nbsp; Can't start server : Bind on unix socket:
 Permission
 denied
 BR010403 16:19:56nbsp; Do you already have another mysqld server
 running
 on socket: /var/lib/mysql/mysql.sock ?
 BR010403 16:19:56nbsp; Aborting

 P010403 16:19:56nbsp; mysqld ended

 P010403 16:35:05nbsp; mysqld started
 BR010403 16:35:05nbsp; Can't start server : Bind on unix socket:
 Permission
 denied
 BR010403 16:35:05nbsp; Do you already have another mysqld server
 running
 on socket: /var/lib/mysql/mysql.sock ?
 BR010403 16:35:05nbsp; Aborting

 P010403 16:35:05nbsp; mysqld ended

 P010403 17:09:52nbsp; mysqld started
 BR010403 17:09:52nbsp; Can't start server : Bind on unix socket:
 Permission
 denied
 BR010403 17:09:52nbsp; Do you already have another mysqld server
 running
 on socket: /var/lib/mysql/mysql.sock ?
 BR010403 17:09:52nbsp; Aborting

 P010403 17:09:52nbsp; mysqld ended

 P
 BRFurther,We have also tried latest available rpm installation -i386
 downloaded from mysql.com.
 BRusing command
 BRrpm -i rpm-file-name
 BRbut it fails to install rpm package just stating
 BRcan not install rpm
 Please guide, how to create mysql users,set permissions,ownerships etc.

 Regards
 Akshaya

 Brian Warn wrote:

  I finally did find a discussion in Monty's book on p. 417 about this.
 
  Thanks,
  Brian
 
  - Original Message -
  From: "B. van Ouwerkerk" [EMAIL PROTECTED]
  To:

ownership/permission problems

2001-04-03 Thread Brian Warn

After installing the server and client RPMs on my RH 7 box and verifying that 
everything worked properly as root.  Since I want mysql to run as the mysql user, I 
searched for every directory where mysql occurred and changed ownership from root:root 
to mysql:root.  I can start safe_mysqld fine and use and modify the test database.  I 
cannot, however, use the mysql db at all -- I get an error that says "access denied 
for user: '@localhost' to database 'mysql' " when I try to use it. 

I haven't had any success so far finding any help in the manual or Monty's book about 
this particular condition, so any help is appreciated.

tia,
Brian



Re: ownership/permission problems

2001-04-03 Thread Brian Warn

I finally did find a discussion in Monty's book on p. 417 about this.

Thanks,
Brian

- Original Message -
From: "B. van Ouwerkerk" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 03, 2001 11:20 AM
Subject: Re: ownership/permission problems



 I haven't had any success so far finding any help in the manual or
Monty's
 book about this particular condition, so any help is appreciated.

 I don't know about the RPM's. But if you would install from source there
is
 a directory called Docs containing a manual.txt I did NOT compare this
with
 the online manual but this one states clearly how to start MySQL as
another
 user.

 Bye,


 B.


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php