RE: MySQL Help Needed Please

2003-01-04 Thread Anton Zavrin
I have this file:
srwxrwxrwx  1 mysql  wheel0 Jan  2 16:45 mysql.sock

I have two of .err files and non of the log files

I also can't find my *.cnf file(s)

Did: ps -ef | grep mysql
Got nothing

What should I do?

Best Regards, Anton


-Original Message-
From: Thomas Spahni [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 03, 2003 7:01 AM
To: Anton Zavrin
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL Help Needed Please

Anton,

check the .err and .log files in your data
directory.
Then check permissions. My sock file looks like:

srwxrwxrwx1 mysqldaemon  0 Dez 30 19:12 mysql.sock

and finally check for your

socket= /tmp/mysql.sock

entries in /etc/my.cnf and ~/.my.cnf

Thomas Spahni

On Fri, 3 Jan 2003, Anton Zavrin wrote:

> Hi guys,
> I'm new here and need help.
> I'm installing MySQL on FreeBSD 4.7. I actually had/have MySQL
installed
> but when I'm trying to run it says:
> error: 'Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)' Check that mysqld is running and that the
> socket: '/tmp/mysql.sock' exists!
>
> I checked /tmp/mysql.sock' and the file exists.
> But I don't see any process that would show me mysqld is running.
>
> Then I tried to re-install it from the ports and it says:
> You appear to already have a mysql database directory in
/var/db/mysql.
>
> In order to preserve your existing data, you should:
> - dump all your databases
> - kill mysql if it is running
> - delete the /var/db/mysql directory
> - run 'make install'
> - start up mysql
> - re-create all of your database
> - re-load your data
>
> If you understand the consequences of this upgrade, please re-build
this
> port with the environment variable OVERWRITE_DB defined.
> *** Error code 1
>
> Stop in /usr/ports/databases/mysql323-server.
>
> Please help, what should I do?
>
> Best Regards, Anton


-
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




How to Unlock a row?

2003-01-04 Thread Clyde
Hi,

Using MySql with InnoDB files you can lock rows for update.
Eg select * from customer where cusomerID=1 for update

I assume these locks are release when the the records selected are actually updated 
(or the connection is terminated). But how do you release these record locks if you do 
not want to go ahead with the update.

Scenario:

User selects records to update.
User changes mind (clicks on cancel button)

Now we have locked rows that need to be unlocked.

How to do this?

Thanks
Clyde







-
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 + ASP Getting Started

2003-01-04 Thread John Berman
Hi

I have on line access databases and I query them using ASP - I often
create the initial in the access dbase and then use asp on the query and
again this method works well.

I have recently upgrade the database format to mysql but am still using
ASP which I assume is ok ?

Can I create queries within the MYSQL dbase and then use ASP to query
them (hope this makes sense)

Im using mySQL Front to interface with the dbase (is this the best
graphical interface) and I can create queries on the fly but cant save
them  - well only locally in text files I had hoped to save them in a
similar way to views in SQL

Regards

John 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




PHP and MySQL bug

2003-01-04 Thread Nuno Lopes
Dear Sirs,

I'm using PHP and MySQL to make my programs. But I think I discovered a bug
in PHP or in MySQL (I don't know!).

In one of my files I have the following:

MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
$r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");

/* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
MYSQL_NUM)"
And the another query:
*/

MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

/* i don't know why but this doesn't work! But if I close the connection and
open another te query is done:*/

MYSQL_CLOSE();
MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

---
I don't know why is this? Because I'm used to do more than a query per
connection and this never happened!
I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.


I hope you solve this,
Nuno Lopes



-
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: Order by does not use an index when it should.

2003-01-04 Thread harm
On Fri, Jan 03, 2003 at 08:24:17PM -0500, Brian Lindner wrote:
> harm,
> 
> Your order by will not use your weg_2 index because, as you stated,
> weg_2 index is on (col1, col2, col3, nr) as a group so it wont be used
> for the individual columns as you need
> 
> try to create a separate index on just the nr column, that should be used by the 
>orderby
> clause.  This way your weg_5 will be used for the where (the 3 col)
> and the new index will be for the orderby

There is an index on 'nr', it is the primary key :)


This is one of the examples from the manual which is supposed to use the
index for the order by:

SELECT * FROM t1 WHERE key_part1=constant ORDER BY key_part2

Looks like the same situation to me.


Thanks,
Harmen


> 
> Hope that helps
> 
> --
>  Brian Lindner
> 
> Friday, January 3, 2003, 8:05:05 PM, you wrote:
> > Hello,
> 
> > I am trying to get a sort to use an index. The query is very simple:
> 
> > select nr from mytable where col1='const' and col2='another const' and col3='YA
> > const' order by nr;
> 
> > The explain gives me:
> > 
>+-+--+--+---+-+---+--+--+
> > | table   | type | possible_keys| key   | key_len | ref
> > | rows | Extra|
> > 
>+-+--+--+---+-+---+--+--+
> > | mytable | ref  | bla4,weg,weg_3,weg_4,weg_5,weg_2 | weg_5 |  17 |
> > const,const,const | 2840 | Using where; Using index; Using filesort |
> > 
>+-+--+--+---+-+---+--+--+
> 
> > According to the docs (http://www.mysql.com/doc/en/ORDER_BY_optimisation.html)
> > it should use index 'weg_2', which is an index on (col1, col2, col3, nr)
> > but it doesn`t. You are suppost to tell because there is the 'Using filesort' 
>remark
> > (Again according to the docs). And of course the query is quite slow.
> > Index 'weg_5' is (col1, col2, col3).
> 
> > So, to summarise, the select itself is perfectly fine, using indexes as it should, 
>it is
> > just the sort should use the index as wel.
> 
> > Did I misread the docs or is there anything else? Any clues?
> 
> > Thanks for your time,
> 
> > Harmen
> > (Yes I know there are lots of redundant indexes, they are leftovers from
> > tests to figure this out :)
> > (Using 4.0.7, 3.23.50 did the same thing)
> 
> 
> 

-- 
The Moon is Waxing Crescent (3% of Full)
   nieuw.nl - 2dehands.nl: 57873

-
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: comparision in the datetime field

2003-01-04 Thread Egor Egorov
On Friday 03 January 2003 19:25, aman raheja wrote:

> I have a datetime field in one of my tables in the MySQL database.
> Can I do something like return all records between two certain dates, say
> between Nov 02, 2002 and Nov 07, 2002.

SELECT .. WHERE mydatefield BETWEEN '2002-11-02 00:00:00' AND '2002-11-07 
00:00:00'



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




-
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: LOAD DATA LOCAL

2003-01-04 Thread Egor Egorov
On Friday 03 January 2003 22:38, Stefan Hinz wrote:

> I use 4.0.7-max-nt on a Win2K box, and whatever I do, I cannot use LOAD
> DATA LOCAL (keep getting error 1148). I tried:
>
> - Starting the server with --local-infile=1, and with --local-infile.
> - Starting the mysql client with --local-infile[=1]
> - Combining server and client options
>
> The manual page on this is quite contradictory.
>
> I agree with the user comment on that manual page:
>
> I just wasted 3 hours of my time tracking down this
> annoying security "improvement" -- thanks but no
> thanks, MySQL developers. This was poorly thought
> out and poorly implemented.
>
> Any hints how to make LOAD DATA LOCAL work in spite of this
> "improvement"?

Stefan, currently I have no Windows box on hands, to check it out on Win32, but I 
remember that it works for me at least on 4.0.6 with local-infile=1 in 
my.cnf.

It also works like a charm on my Linux box on 4.0.7:

mysql> LOAD DATA LOCAL '/tmp/a.sql' INTO TABLE a;
Query OK, 3 rows affected (0.01 sec)
Records: 3  Deleted: 0  Skipped: 0  Warnings: 0



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




-
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: How to Unlock a row?

2003-01-04 Thread Victoria Reznichenko
On Saturday 04 January 2003 11:45, Clyde wrote:

> Using MySql with InnoDB files you can lock rows for update.
> Eg select * from customer where cusomerID=1 for update
>
> I assume these locks are release when the the records selected are actually
> updated (or the connection is terminated). But how do you release these
> record locks if you do not want to go ahead with the update.
>
> Scenario:
>
> User selects records to update.
> User changes mind (clicks on cancel button)
>
> Now we have locked rows that need to be unlocked.

Use COMMIT/ROLLBACK. they release all locks that were set in the current 
transaction. 


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





-
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: deleting tables with same prefix !

2003-01-04 Thread Victoria Reznichenko
On Friday 03 January 2003 19:14, aman raheja wrote:

> How can I delete all tables starting with prefix 'abc' in the MySQL
> database (there
> are about 200 such tables).
> Wild cards?

Nope. You should use list of all tables in the DROP TABLE command if you want 
to do it only with MySQL.

> Or if I just delete the files from the location where all the MySQL
> database tables are
> stored, what would happen ?

Deleting a file is not a best way to drop the table, it's probably the worst 
one. 



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





-
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: auto increment question

2003-01-04 Thread Arthur Fuller
Yes you have neither triggers or stored procedures. Instead you'll have to
remember to use the same code everywhere in your app that can update the
table:

Update mytable
SET col1 = 'somevalue', col2 = 3456, col3 = now(), Viewed = Viewed + 1

hth,
Arthur

- Original Message -
From: "Adolfo Bello" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 7:15 PM
Subject: RE: auto increment question


> It sounds to me that a trigger would help, but mysql doesn't has them
> yet.
>
> Adolfo
>
> > -Original Message-
> > From: Paul DuBois [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 03, 2003 8:04 PM
> > To: Kevin; [EMAIL PROTECTED]
> > Subject: Re: auto increment question
> >
> >
> > At 15:28 -0800 1/3/03, Kevin wrote:
> > >Hello,
> > >
> > >I have a table with an ID column and a viewed column. I
> > would like the
> > >viewed column to increment by one each time the row is updated.
> > >
> > >Stats
> > >===
> > >ID
> > >views
> > >
> > >is this possible?
> >
> > Sure.  Since you're updating the row anyway, set the column
> > value to one more than its current value. :-)
> >
> > No, it won't happen automatically, which I would guess is
> > what you're really asking.
> >
> > >
> > >-k
> > >
> > >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




re: Re: Order by does not use an index when it should.

2003-01-04 Thread Victoria Reznichenko
On Saturday 04 January 2003 14:53, harm wrote:

> > Your order by will not use your weg_2 index because, as you stated,
> > weg_2 index is on (col1, col2, col3, nr) as a group so it wont be used
> > for the individual columns as you need
> >
> > try to create a separate index on just the nr column, that should be used
> > by the orderby clause.  This way your weg_5 will be used for the where
> > (the 3 col) and the new index will be for the orderby
>
> There is an index on 'nr', it is the primary key :)
>
>
> This is one of the examples from the manual which is supposed to use the
> index for the order by:
>
> SELECT * FROM t1 WHERE key_part1=constant ORDER BY key_part2
>
> Looks like the same situation to me.

I tested it on 4.0.7 and MySQL picks up right index.
What is your table structure?



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





-
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: PHP and MySQL bug

2003-01-04 Thread Larry Brown
I'd like to try and see if I can find the problem as I write with PHP for
MySQL quite a bit.  However, without the specifics of how the script is
running as is, I can't tell where the problem is.  Write a quick script in
complete detail that does what your post is doing and I'll look for
anything.  Right now I have to assume certain steps are being made.  If they
are than I don't have a solution but I'd rather go with what you are
actually doing than go by my assumptions.  By all means hide the names of
the innocent and continue with a,b,c but just don't do "..."

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 5:46 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: PHP and MySQL bug

Dear Sirs,

I'm using PHP and MySQL to make my programs. But I think I discovered a bug
in PHP or in MySQL (I don't know!).

In one of my files I have the following:

MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
$r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");

/* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
MYSQL_NUM)"
And the another query:
*/

MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

/* i don't know why but this doesn't work! But if I close the connection and
open another te query is done:*/

MYSQL_CLOSE();
MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

---
I don't know why is this? Because I'm used to do more than a query per
connection and this never happened!
I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.


I hope you solve this,
Nuno Lopes



-
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: Re: Order by does not use an index when it should.

2003-01-04 Thread harm
On Sat, Jan 04, 2003 at 03:25:00PM +0200, Victoria Reznichenko wrote:
> On Saturday 04 January 2003 14:53, harm wrote:
> 
> > > Your order by will not use your weg_2 index because, as you stated,
> > > weg_2 index is on (col1, col2, col3, nr) as a group so it wont be used
> > > for the individual columns as you need
> > >
> > > try to create a separate index on just the nr column, that should be used
> > > by the orderby clause.  This way your weg_5 will be used for the where
> > > (the 3 col) and the new index will be for the orderby
> >
> > There is an index on 'nr', it is the primary key :)
> >
> >
> > This is one of the examples from the manual which is supposed to use the
> > index for the order by:
> >
> > SELECT * FROM t1 WHERE key_part1=constant ORDER BY key_part2
> >
> > Looks like the same situation to me.
> 
> I tested it on 4.0.7 and MySQL picks up right index.
> What is your table structure?

| nr | int(10) unsigned |  | PRI | NULL| auto_increment |
| weg| enum('n','y')|  | MUL | n   ||
| dbase  | varchar(15)  |  | | ||
| land   | enum('nl','be')  |  | | nl  ||

There are about 35 other fields so I won`t include them all. 

The table has about 1.5 mil rows. Type is innodb.
Query:
describe select nr from ad  where dbase='auto_access' and weg="n" and land="nl" order 
by ad.nr;

Describe:
| table | type | possible_keys| key   | key_len | ref | rows | 
|Extra|
| ad| ref  | bla4,weg,weg_3,weg_4,weg_5,weg_2 | weg_5 |  17 | 
|const,const,const | 4028 | Using where; Using index; Using filesort |


Matches about 1873 rows. (Varies, from 10 to 5000)

Indexes:
| ad|  1 | weg_5 |1 | weg | A
|  20 | NULL | NULL   |  | BTREE  | |
| ad|  1 | weg_5 |2 | land| A
|  20 | NULL | NULL   |  | BTREE  | |
| ad|  1 | weg_5 |3 | dbase   | A
|  20 | NULL | NULL   |  | BTREE  | |
| ad|  1 | weg_2 |1 | weg | A
|  20 | NULL | NULL   |  | BTREE  | |
| ad|  1 | weg_2 |2 | land| A
|  20 | NULL | NULL   |  | BTREE  | |
| ad|  1 | weg_2 |3 | dbase   | A
| 890 | NULL | NULL   |  | BTREE  | |
| ad|  1 | weg_2 |4 | nr  | A
| 1729450 | NULL | NULL   |  | BTREE  | |

It uses 'weg_5', it should use 'weg_2'.


Thanks for the help,
Harmen





-- 
The Moon is Waxing Crescent (4% of Full)

-
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: LOAD DATA LOCAL

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Jon,

thanks for trying to help!

> Not much help I know, but you are not the only person having this
problem.

Okay, all you striving folks from MySQL on this list! When are you going
to solve this? (The LOCAL feature is not essential to me, but it's a
pain in the neck to encounter issues like this in MySQL :(

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Jon Bertsch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 11:19 PM
Subject: Re: LOAD DATA LOCAL



I posted the same question two weeks ago. The only suggestion was to add
flags to the my.cnf file:

[mysqld]
local-infile=1

[mysql]
local-infile=1

But this didn't work.

I've tried using the flags on startup of MySQL as shown in the manual
but
this fails as well.

We were running 3.23.49.

I then upgraded to 3.23.54a which appears to have the command turned on
when compiled - the configure line says --enable load data local - but
it
doesn't work for this version either (on my system).

I wrote a work around script to allow upload of the file through a form
on
the web server and then ftp it to my database server. I can then use
LOAD
DATA without the local to insert the data. This works but you have to
have
the correct permissions set on the directory that the file is FTP'd
into.
So if you can get the file to the correct server then just avoid the
local
part of the clause and give the path to the file while running the
command
line or SQL. Of course this approach recreates the security hole but my
scripts are all behind login pages anyway.

Not much help I know, but you are not the only person having this
problem.

Jon Bertsch

At 09:38 PM 1/3/2003 +0100, you wrote:
>Hi,
>
>(I posted this question once before in a Re: that everyone seems to
have
>missed ;-)
>
>I use 4.0.7-max-nt on a Win2K box, and whatever I do, I cannot use LOAD
>DATA LOCAL (keep getting error 1148). I tried:
>
>- Starting the server with --local-infile=1, and with --local-infile.
>- Starting the mysql client with --local-infile[=1]
>- Combining server and client options
>
>The manual page on this is quite contradictory.
>
>I agree with the user comment on that manual page:
>
>I just wasted 3 hours of my time tracking down this
>annoying security "improvement" -- thanks but no
>thanks, MySQL developers. This was poorly thought
>out and poorly implemented.
>
>Any hints how to make LOAD DATA LOCAL work in spite of this
>"improvement"?
>
>Regards,
>--
>   Stefan Hinz <[EMAIL PROTECTED]>
>   Geschäftsführer / CEO iConnect GmbH 
>   Heesestr. 6, 12169 Berlin (Germany)
>   Tel: +49 30 7970948-0  Fax: +49 30 7970948-3
>
>
>
>-
>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




re: comparision in the datetime field

2003-01-04 Thread Paul DuBois
At 15:07 +0200 1/4/03, Egor Egorov wrote:

On Friday 03 January 2003 19:25, aman raheja wrote:


 I have a datetime field in one of my tables in the MySQL database.
 Can I do something like return all records between two certain dates, say
 between Nov 02, 2002 and Nov 07, 2002.


SELECT .. WHERE mydatefield BETWEEN '2002-11-02 00:00:00' AND '2002-11-07
00:00:00'


Or, if records that occur any time on Nov 07 should be deleted, modify
the end of the query a little bit:

SELECT .. WHERE mydatefield BETWEEN '2002-11-02 00:00:00' AND '2002-11-07
23:59:59'


-
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




Field \ Table Types - Beginner

2003-01-04 Thread John Berman
Hi

Well I searched the web for answers first but there is so much its hard
to know were to start

I'm creating a Genealogical Database and want to start right and ensure
my basic table and fields are correct (I see that I can a large variety
of table types)

My data is made of Names, Dates and occasionally images. From the web
side the vast majority of queries will be made on the surname so I'm
thinking that I should create a full text index on the surname field ?
as that will enable fast searching on the field ?

Any advice on what field types I should use for names \ dates and Images
would be appreciated - oh and table type.


Regards

John


-
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: PHP and MySQL bug

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Nuno,

> $r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");
>
> /* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
> MYSQL_NUM)"
> And the another query:
> */
>
> MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");
>
> /* i don't know why but this doesn't work!*/

It doesn't work because of the /* Some code including ... */ part ;-)

First thing, I would check if $h and $id really are what you expect them
to be, like:

$sql = "UPDATE d SET h='$h' WHERE id='$id'";
echo $sql;
MYSQL_QUERY($sql);

If this part is okay, then the problem lies within this myterious /*
Some code */.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Nuno Lopes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 11:46 AM
Subject: PHP and MySQL bug


> Dear Sirs,
>
> I'm using PHP and MySQL to make my programs. But I think I discovered
a bug
> in PHP or in MySQL (I don't know!).
>
> In one of my files I have the following:
>
> MYSQL_CONNECT("localhost", "**user**", "**pass**");
> mysql_select_db("be");
> $r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");
>
> /* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
> MYSQL_NUM)"
> And the another query:
> */
>
> MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");
>
> /* i don't know why but this doesn't work! But if I close the
connection and
> open another te query is done:*/
>
> MYSQL_CLOSE();
> MYSQL_CONNECT("localhost", "**user**", "**pass**");
> mysql_select_db("be");
> MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");
>
> ---
> I don't know why is this? Because I'm used to do more than a query per
> connection and this never happened!
> I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.
>
>
> I hope you solve this,
> Nuno Lopes
>
>
>
> -
> 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: auto increment question

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Kevin,

> I have a table with an ID column and a viewed column. I would like the
> viewed column to increment by one each time the row is updated.
> Stats
> ===
> ID
> views

UPDATE Stats SET Views = Views + 1 WHERE ID = (selected row)

Or is there more behind this question?

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Kevin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 12:28 AM
Subject: auto increment question


> Hello,
>
> I have a table with an ID column and a viewed column. I would like the
> viewed column to increment by one each time the row is updated.
>
> Stats
> ===
> ID
> views
>
> is this possible?
>
> -k
>
> 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




Re: LOAD DATA LOCAL

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Egor,

>> Any hints how to make LOAD DATA LOCAL work in spite of this
>> "improvement"?

> Stefan, currently I have no Windows box on hands, to check it out on
Win32, but I
> remember that it works for me at least on 4.0.6 with local-infile=1 in
> my.cnf.

as far as I remember from MySQL trainings in the last two months, LOCAL
worked with 4.0.3 and 4.0.4 on Win32, and with 3.23.52 on SuSE Linux
8.1.

Once again: This security "improvement" is a pain in the neck, or as
stated with the user comments on the appropriate manual page:

>>> This was poorly thought out and poorly implemented.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Egor Egorov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 2:07 PM
Subject: re: LOAD DATA LOCAL


> On Friday 03 January 2003 22:38, Stefan Hinz wrote:
>
> > I use 4.0.7-max-nt on a Win2K box, and whatever I do, I cannot use
LOAD
> > DATA LOCAL (keep getting error 1148). I tried:
> >
> > - Starting the server with --local-infile=1, and
with --local-infile.
> > - Starting the mysql client with --local-infile[=1]
> > - Combining server and client options
> >
> > The manual page on this is quite contradictory.
> >
> > I agree with the user comment on that manual page:
> >
> > I just wasted 3 hours of my time tracking down this
> > annoying security "improvement" -- thanks but no
> > thanks, MySQL developers. This was poorly thought
> > out and poorly implemented.
> >
> > Any hints how to make LOAD DATA LOCAL work in spite of this
> > "improvement"?
>
> Stefan, currently I have no Windows box on hands, to check it out on
Win32, but I
> remember that it works for me at least on 4.0.6 with local-infile=1 in
> my.cnf.
>
> It also works like a charm on my Linux box on 4.0.7:
>
> mysql> LOAD DATA LOCAL '/tmp/a.sql' INTO TABLE a;
> Query OK, 3 rows affected (0.01 sec)
> Records: 3  Deleted: 0  Skipped: 0  Warnings: 0
>
>
>
> --
> For technical support contracts, goto
https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Egor Egorov
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
><___/   www.mysql.com
>
>
>
>
> -
> 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: Field \ Table Types - Beginner

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
John,

> My data is made of Names, Dates and occasionally images. From the web
> side the vast majority of queries will be made on the surname so I'm
> thinking that I should create a full text index on the surname field ?
> as that will enable fast searching on the field ?

You will only want to do this if you expect surnames to be some 1,000
chars long ;-)

Otherwise, you just take CHAR / VARCHAR, and put an index on the surname
column, to speed up lookups and order by statements.

Names and other short text: CHAR (faster) or VARCHAR (saves disk space),

Dates: DATE or DATETIME (if you need time values, too) or TIMESTAMP (if
you want this for the obvious reason the name is telling),

Images: You _can_ store images in the database (BLOB column type), but
in most cases people just use _references_ to the images, like the file
name (as CHAR/VARCHAR). The images themselves are not stored in the
database.

You can find more info on column types here:
http://www.mysql.com/doc/en/Column_types.html

> Any advice on what field types I should use for names \ dates and
Images
> would be appreciated - oh and table type.

Table type: MyISAM is the fastest table type for quite alot of
situations. If you expect a high update / select ratio for your records
(I assume you don't), InnoDB tables will be superior. If you need
advanced stuff like transactions, foreign keys etc. (I assume you don't,
at least not at the beginning), you will _have_ to use InnoDB, as MyISAM
doesn't support this.

I suggest you start with MyISAM, and if you find out it doesn't
(optimally) fit your needs, you can still switch to InnoDB.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "John Berman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 4:38 PM
Subject: Field \ Table Types - Beginner


> Hi
>
> Well I searched the web for answers first but there is so much its
hard
> to know were to start
>
> I'm creating a Genealogical Database and want to start right and
ensure
> my basic table and fields are correct (I see that I can a large
variety
> of table types)
>
> My data is made of Names, Dates and occasionally images. From the web
> side the vast majority of queries will be made on the surname so I'm
> thinking that I should create a full text index on the surname field ?
> as that will enable fast searching on the field ?
>
> Any advice on what field types I should use for names \ dates and
Images
> would be appreciated - oh and table type.
>
>
> Regards
>
> John
>
>
> -
> 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




is it a bug?

2003-01-04 Thread Luca Burlizzi
hello,

I have a problem in mysql 4.0.7

this piece of code worked until version 4.0.4
SELECT @ID:='';
SELECT @ID:=CONCAT(@ID,',',MAX(ID)) FROM WF_Users GROUP BY GUID;
SELECT @ID;

the result was: ",1,2,.,n".

but today doesn't works anymore
now the result is ".n" where n is the last max(id) value in the result set.


-
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 Help Needed Please

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Anton,

first thing, try:

ps [whatever options] | grep mysqld

The daemon (database server) is called mysqld, not mysql.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Anton Zavrin" <[EMAIL PROTECTED]>
To: "'Thomas Spahni'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 9:01 AM
Subject: RE: MySQL Help Needed Please


> I have this file:
> srwxrwxrwx  1 mysql  wheel0 Jan  2 16:45 mysql.sock
>
> I have two of .err files and non of the log files
>
> I also can't find my *.cnf file(s)
>
> Did: ps -ef | grep mysql
> Got nothing
>
> What should I do?
>
> Best Regards, Anton
>
>
> -Original Message-
> From: Thomas Spahni [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 7:01 AM
> To: Anton Zavrin
> Cc: [EMAIL PROTECTED]
> Subject: Re: MySQL Help Needed Please
>
> Anton,
>
> check the .err and .log files in your data
> directory.
> Then check permissions. My sock file looks like:
>
> srwxrwxrwx1 mysqldaemon  0 Dez 30 19:12 mysql.sock
>
> and finally check for your
>
> socket= /tmp/mysql.sock
>
> entries in /etc/my.cnf and ~/.my.cnf
>
> Thomas Spahni
>
> On Fri, 3 Jan 2003, Anton Zavrin wrote:
>
> > Hi guys,
> > I'm new here and need help.
> > I'm installing MySQL on FreeBSD 4.7. I actually had/have MySQL
> installed
> > but when I'm trying to run it says:
> > error: 'Can't connect to local MySQL server through socket
> > '/tmp/mysql.sock' (61)' Check that mysqld is running and that the
> > socket: '/tmp/mysql.sock' exists!
> >
> > I checked /tmp/mysql.sock' and the file exists.
> > But I don't see any process that would show me mysqld is running.
> >
> > Then I tried to re-install it from the ports and it says:
> > You appear to already have a mysql database directory in
> /var/db/mysql.
> >
> > In order to preserve your existing data, you should:
> > - dump all your databases
> > - kill mysql if it is running
> > - delete the /var/db/mysql directory
> > - run 'make install'
> > - start up mysql
> > - re-create all of your database
> > - re-load your data
> >
> > If you understand the consequences of this upgrade, please re-build
> this
> > port with the environment variable OVERWRITE_DB defined.
> > *** Error code 1
> >
> > Stop in /usr/ports/databases/mysql323-server.
> >
> > Please help, what should I do?
> >
> > Best Regards, Anton
>
>
> -
> 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




aide

2003-01-04 Thread Demba COULIBALY
Bonjour Messieurs,

J'ai téléchargé MYSQL a partir d'Internet et j'ai
installé sous Windows 98 en monoposte (pas de réseau).

Quand je lance C:\MYSQL\BIN\MYSQL.EXE, j'obtiens
l'erreur suivante : 
ERROR 2003: Can't connect to Mysql server on
'localhost' (10061).

Que dois je faire pour lancer MYSQL afain de
l'utiliser sans problème sous Windows 98.

=
Demba COULIBALY
MCP
Administrateur réseau
de l'Université de Bamako
Tél. : 223 222 33 25
Cél. : 223 672 89 17

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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: comparision in the datetime field

2003-01-04 Thread Octavian Rasnita
Use:

select * from table where date_col between 'xxx' and 'yyy';

You need to replace XXX and YYY with the dates you want like
'2003010430' for January 04, 2003, 11:11:30.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

- Original Message -
From: "aman raheja" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 7:25 PM
Subject: comparision in the datetime field


Hi All
I have a datetime field in one of my tables in the MySQL database.
Can I do something like return all records between two certain dates, say
between Nov 02, 2002 and Nov 07, 2002.
Thanks
Aman

-
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: Hiding the password

2003-01-04 Thread Octavian Rasnita
Well, I guess the best solution would be to use a Windows server.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

- Original Message -
From: "Benjamin Pflugmann" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, December 25, 2002 8:39 PM
Subject: Re: Hiding the password


Hello.

On Wed 2002-12-25 at 13:15:58 +0200, [EMAIL PROTECTED] wrote:
> Hi all,
>
> I want to make a CGI program in Perl that queries a MySQL database, and
the
> problem is that I need to write the password for the database in the
program
> and this password can be seen by any user that has an account on that
> server.
>
> I need to gave 755 permissions to CGI scripts because they need to be
> executed by the web server account, and not by my account.
>
> Do you have any tips for hiding the password,

Not really. Whereever you put it, the web server account has be able
to access it, so the problem stays. Even if you could arrange that
only the web server account can read it (e.g. by changing the owner of
a file containing the password), every user with permission to create
CGI scripts can still write a script to read the data.

> or accessing MySQL from CGI scripts is not secure at all?

Well, it is as secure as the server is set up. E.g. one can set up
Apache so that it executes CGIs as the user to whom the script
belongs. I know this has its own problems... it was only intended as
example that it is a question of the server configuration.

The "best" way is always a compromise and depends on how the server is
used. If the server configuration is not in your hands, I don't there
is much you can do, except asking the admin which way she suggests.

HTH,

Benjamin.

--
[EMAIL PROTECTED]



-
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: Hiding the password

2003-01-04 Thread Octavian Rasnita
It is exactly the same thing with a PHP script.

If someone has and account on that server, they can login and read the php
file.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

- Original Message -
From: "Brent Bailey" <[EMAIL PROTECTED]>
To: "Benjamin Pflugmann" <[EMAIL PROTECTED]>
Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 4:26 PM
Subject: Re: Hiding the password


i would try using php to have you page connect to the mysql database.. The
code gets parsed
first then is loaded into the browser...so the user & pass for the database
is never seen.. i
would use something like:

$db = mysql_connect("localhost", "mysql-user", "mysql-user-password");
 mysql_select_db("whatever-database-name",$db);


Brent

Benjamin Pflugmann wrote:

> Hello.
>
> On Wed 2002-12-25 at 13:15:58 +0200, [EMAIL PROTECTED] wrote:
> > Hi all,
> >
> > I want to make a CGI program in Perl that queries a MySQL database, and
the
> > problem is that I need to write the password for the database in the
program
> > and this password can be seen by any user that has an account on that
> > server.
> >
> > I need to gave 755 permissions to CGI scripts because they need to be
> > executed by the web server account, and not by my account.
> >
> > Do you have any tips for hiding the password,
>
> Not really. Whereever you put it, the web server account has be able
> to access it, so the problem stays. Even if you could arrange that
> only the web server account can read it (e.g. by changing the owner of
> a file containing the password), every user with permission to create
> CGI scripts can still write a script to read the data.
>
> > or accessing MySQL from CGI scripts is not secure at all?
>
> Well, it is as secure as the server is set up. E.g. one can set up
> Apache so that it executes CGIs as the user to whom the script
> belongs. I know this has its own problems... it was only intended as
> example that it is a question of the server configuration.
>
> The "best" way is always a compromise and depends on how the server is
> used. If the server configuration is not in your hands, I don't there
> is much you can do, except asking the admin which way she suggests.
>
> HTH,
>
> Benjamin.
>
> --
> [EMAIL PROTECTED]
>
> -
> 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

--
Brent Bailey CCNA
High Speed Data Services
MetroCast Cablevision
603-332-8629 ext:242
[EMAIL PROTECTED]





-
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




mysqlbug

2003-01-04 Thread ing . conti
platform. OSX 10.2 ( jaguar)

when I try to compile the source distro, i get:



sql_udf.cc:57:19: dlfcn.h: No such file or directory
sql_udf.cc: In function `void init_syms(udf_func*)':
sql_udf.cc:88: `dlsym' undeclared (first use this function)
sql_udf.cc:88: (Each undeclared identifier is reported only once for 
each
   function it appears in.)
sql_udf.cc: In function `void udf_init()':
sql_udf.cc:182: `dlopen' undeclared (first use this function)
sql_udf.cc:185: `dlerror' undeclared (first use this function)
sql_udf.cc:198: `dlclose' undeclared (first use this function)
make[4]: *** [sql_udf.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


and "make" stops

ANY IDEA?


Ing. Conti
via s. Gottardo 76
20052 MONZA MI ITALY
0039-39-324723
www.ingconti.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



transaction support in mysql3.23.54-win

2003-01-04 Thread Nirmal Shah
hi,
i have installed mysql3.23.54 on windows and have
followed all instructions as required for using
mysqld-max to have transaction support.
i have created a table using TYPE=INNODB, but cannot
use rollback on it.
the error i get in my jsp is "transactions not
supported".
please advice me on how i can use commit - rollback on
mysql database tables.
thank you in advance.
regards,
nirmal
(04 jan 03)

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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: Hiding the password

2003-01-04 Thread wcb
Hi!

Perhaps gurus can comment on what I'm suggesting here - if the database is
set up so that only "localhost" can access it, then you can use a php or
PERL script to allow people from elsewhere to cruise in and make queries as
your script allows.  As long as your script is set up to be secure (for
example, not to allow special characters like ~ or &^$, etc.) then unless
they break into your server they can't do anything you don't want them to.

In other words, it doesn't matter if the id and password for the database
are known (and you can't really hide it on the Internet) because as long as
the server's identity is different from the domains cruising in, they are
constrained by your php script (or PERL script).

It may be helpful to do something like this:


include($DOCUMENT_ROOT.'/include/database.php');

so that the id and password are stored in another folder.  However,
sophisticated users will still be able to track the id and password down. .
.

Certainly I'd appreciate comments on this by people in the know, because it
is an issue that so many people face . . .

Cheers!

-warren




- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: "Benjamin Pflugmann" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 8:47 AM
Subject: Re: Hiding the password


> Well, I guess the best solution would be to use a Windows server.
>
> Teddy,
> Teddy's Center: http://teddy.fcc.ro/
> Email: [EMAIL PROTECTED]
>
> - Original Message -
> From: "Benjamin Pflugmann" <[EMAIL PROTECTED]>
> To: "Octavian Rasnita" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 25, 2002 8:39 PM
> Subject: Re: Hiding the password
>
>
> Hello.
>
> On Wed 2002-12-25 at 13:15:58 +0200, [EMAIL PROTECTED] wrote:
> > Hi all,
> >
> > I want to make a CGI program in Perl that queries a MySQL database, and
> the
> > problem is that I need to write the password for the database in the
> program
> > and this password can be seen by any user that has an account on that
> > server.
> >
> > I need to gave 755 permissions to CGI scripts because they need to be
> > executed by the web server account, and not by my account.
> >
> > Do you have any tips for hiding the password,
>
> Not really. Whereever you put it, the web server account has be able
> to access it, so the problem stays. Even if you could arrange that
> only the web server account can read it (e.g. by changing the owner of
> a file containing the password), every user with permission to create
> CGI scripts can still write a script to read the data.
>
> > or accessing MySQL from CGI scripts is not secure at all?
>
> Well, it is as secure as the server is set up. E.g. one can set up
> Apache so that it executes CGIs as the user to whom the script
> belongs. I know this has its own problems... it was only intended as
> example that it is a question of the server configuration.
>
> The "best" way is always a compromise and depends on how the server is
> used. If the server configuration is not in your hands, I don't there
> is much you can do, except asking the admin which way she suggests.
>
> HTH,
>
> Benjamin.
>
> --
> [EMAIL PROTECTED]
>
>
>
> -
> 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: Hiding the password

2003-01-04 Thread Mark
- Original Message -
From: "wcb" <[EMAIL PROTECTED]>
To: "MySQL" <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 6:41 PM
Subject: Re: Hiding the password

> Perhaps gurus can comment on what I'm suggesting here - if the database is
> set up so that only "localhost" can access it, then you can use a php or
> PERL script to allow people from elsewhere to cruise in and make queries
> as your script allows.

Why is this so difficult to grasp? As I, and many others, have pointed out,
repeatedly, it does not matter how many layers you wrap around your
password-retrieval code, as soon as you make the end-result
accessible/readable by your web-CGI, you have done just that: made the
user/password accessible by your web-daemon -- hence, made it accessible to
everyone with access to your web-server.

And no, adding some sort of access-control within your CGI is equally
useless: as a user being hosted on your web-server I would not bother to run
your CGI, but simply copy it for ocular inspection. :)

> Certainly I'd appreciate comments on this by people in the know, because
> it is an issue that so many people face...

Perhaps those people should do what I do: create special MySQL users
(@localhost), unprivileged to the max, with only very narrow SELECT
privileges to the databases they are supposed to read data from, and use
those users to access the MySQL server in your CGI.

- Mark


-
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: Hiding the password

2003-01-04 Thread wcb
It isn't at all difficult to grasp.  Please carefully (and exercising a
certain amount of patience) read my post and the previous post upon which my
post was based.  We are acknowledging that EVERYONE can find out your id and
password.  The question reformulated is:

"Given that one's MySql environment may not be accessible in terms of privs
(which is the case for a lot of people, who are paying for hosting by a
third party) and given that we CAN'T hide the id/password combination, is
the standard arrangement that hosts use (which is to ensure that only
localhost can access the database) adequate to prevent people from doing
unwanted things in your database?  NOTE that I'm assuming that one has a
script on localhost, and all users are from another domain, and also
assuming that the script is properly set up to constrain the activities of
users, does it even matter that people can determine the id/password
combination??"

Thanks for patient responses.

Cheers!

-warren



>
> > Perhaps gurus can comment on what I'm suggesting here - if the database
is
> > set up so that only "localhost" can access it, then you can use a php or
> > PERL script to allow people from elsewhere to cruise in and make queries
> > as your script allows.
>
> Why is this so difficult to grasp? As I, and many others, have pointed
out,
> repeatedly, it does not matter how many layers you wrap around your
> password-retrieval code, as soon as you make the end-result
> accessible/readable by your web-CGI, you have done just that: made the
> user/password accessible by your web-daemon -- hence, made it accessible
to
> everyone with access to your web-server.
>
> And no, adding some sort of access-control within your CGI is equally
> useless: as a user being hosted on your web-server I would not bother to
run
> your CGI, but simply copy it for ocular inspection. :)
>
> > Certainly I'd appreciate comments on this by people in the know, because
> > it is an issue that so many people face...
>
> Perhaps those people should do what I do: create special MySQL users
> (@localhost), unprivileged to the max, with only very narrow SELECT
> privileges to the databases they are supposed to read data from, and use
> those users to access the MySQL server in your CGI.
>
> - Mark
>
>
> -
> 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: is it a bug?

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Luca,

> the result was: ",1,2,.,n".
> but today doesn't works anymore
> now the result is ".n" where n is the last max(id) value in the result
set.

I did a similar query on this table;

mysql> DESCRIBE gehalt;
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
| id| smallint(5) unsigned |  | | 0   |   |
| hoehe | int(11)  | YES  | | NULL|   |
+---+--+--+-+-+---+

And I get this, with MySQL 4.0.7:

mysql> SELECT @ID := CONCAT(@ID,',',MAX(id)) FROM gehalt GROUP BY hoehe;
++
| @ID := CONCAT(@ID,',',MAX(id)) |
++
| ,3,1   |
| ,3,2   |
| ,3,3   |
++

Isn't that what it's supposed to be?

Is it maybe something simple & stupid like different data in your table?

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Luca Burlizzi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 5:35 PM
Subject: is it a bug?


> hello,
>
> I have a problem in mysql 4.0.7
>
> this piece of code worked until version 4.0.4
> SELECT @ID:='';
> SELECT @ID:=CONCAT(@ID,',',MAX(ID)) FROM WF_Users GROUP BY GUID;
> SELECT @ID;
>
> the result was: ",1,2,.,n".
>
> but today doesn't works anymore
> now the result is ".n" where n is the last max(id) value in the result
set.
>
>
> -
> 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: aide

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Demba,

the list language is English, so please don't post in French. I will try
to answer your question, anyway.

> Que dois je faire pour lancer MYSQL afain de
> l'utiliser sans problème sous Windows 98.

Did you make sure that the MySQL _server_ is up and running?

The error you're reporting is exactly what I get under Windows when the
server is down.

To start the server: c:\mysql\bin\winmysqladmin.exe

You can also try: c:\mysql\bin\mysqld.exe

Then start c:\mysql\bin\mysql.exe, and you should get a connection.

À bientôt,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Demba COULIBALY" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 5:49 PM
Subject: aide


> Bonjour Messieurs,
>
> J'ai téléchargé MYSQL a partir d'Internet et j'ai
> installé sous Windows 98 en monoposte (pas de réseau).
>
> Quand je lance C:\MYSQL\BIN\MYSQL.EXE, j'obtiens
> l'erreur suivante :
> ERROR 2003: Can't connect to Mysql server on
> 'localhost' (10061).
>
> Que dois je faire pour lancer MYSQL afain de
> l'utiliser sans problème sous Windows 98.
>
> =
> Demba COULIBALY
> MCP
> Administrateur réseau
> de l'Université de Bamako
> Tél. : 223 222 33 25
> Cél. : 223 672 89 17
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.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

>


-
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




Russian in MySQL ?

2003-01-04 Thread Paul Reilly

I have a website which gets data from MySQL. The website is in several
languages. I'm now working on Russian, and we have the translations, but
I can't seem to get it into  MySQL.

I have a few questions which I hope someone can help with:

1) I see from research I must run another instance of MySQL
   to be able to work in russian. Is this correct?

2) What is the best character set to use?
   Will UTF-8 work?

3) How to best enter russian text strings using an english locale?


Any tips, references would be much appreciated.
Thanks
Paul



-
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: Russian in MySQL ?

2003-01-04 Thread Anton Zavrin
I don't know about UTF-8, but most Russian web sites run Cyrillic
Windows encoding or KOI8-R

If you need some help with translation or writing on Russian using
English characters let me know...

Best Regards, Anton


-Original Message-
From: Paul Reilly [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, January 04, 2003 11:07 AM
To: [EMAIL PROTECTED]
Subject: Russian in MySQL ? 


I have a website which gets data from MySQL. The website is in several
languages. I'm now working on Russian, and we have the translations, but
I can't seem to get it into  MySQL.

I have a few questions which I hope someone can help with:

1) I see from research I must run another instance of MySQL
   to be able to work in russian. Is this correct?

2) What is the best character set to use?
   Will UTF-8 work?

3) How to best enter russian text strings using an english locale?


Any tips, references would be much appreciated.
Thanks
Paul



-
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




root is missing after RPM installation

2003-01-04 Thread Bruno Costacurta
MySQL 3.23.54a
RedHat 7.3

Hi All,

the RPM installation script indicates that the password for 'root' should be setup via 
'mysqladmin -h root password 'new_password_here''
but I cannot connect with user 'root'.
It's look like 'root' is not created by the installation. 'test' works fine, ie mysql 
-u test.

How to obtain / create the user 'root' ?
Which user to use to be able to query users table ?

Cheers,
Bruno


-
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: Hiding the password

2003-01-04 Thread JamesD
In perl,

a. setup dsn in a separate module (sep.pm) with a method "connect(parameters
to setup db...)"
make sure the directory is not under the webserver doc path

sub connect {
return (DBI->connect ($dsn, "$user","$pass",
  {PrintError => 0, RaiseError => 1}));
}


b. in the main script add the non-standard library to @INC with
"use lib qw(path-to-sep.pm);"

c. bring the package in to main script with
"use sep;"

d. connect to db with
"my $dbh = sep::connect();"

e. continue...

sep.pm holds user name and password and only returns the database handle to
main script'
this ensures username password is secure. the connect in sep.pm can
use a username that has been granted limited privileges, etc...

script a can call connect() with user x,
script b can call connect1() with user y, etc.

if you have access to apache webserver, you can put step b in an apache
startup script
so your scripts dont even have to add the nonstandard lib location

i would expect there are even more security enhancements that can be done...
hope that helps

Jim

-Original Message-
From: wcb [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 9:42 AM
To: MySQL
Subject: Re: Hiding the password


Hi!

Perhaps gurus can comment on what I'm suggesting here - if the database is
set up so that only "localhost" can access it, then you can use a php or
PERL script to allow people from elsewhere to cruise in and make queries as
your script allows.  As long as your script is set up to be secure (for
example, not to allow special characters like ~ or &^$, etc.) then unless
they break into your server they can't do anything you don't want them to.

In other words, it doesn't matter if the id and password for the database
are known (and you can't really hide it on the Internet) because as long as
the server's identity is different from the domains cruising in, they are
constrained by your php script (or PERL script).

It may be helpful to do something like this:


include($DOCUMENT_ROOT.'/include/database.php');

so that the id and password are stored in another folder.  However,
sophisticated users will still be able to track the id and password down. .
.

Certainly I'd appreciate comments on this by people in the know, because it
is an issue that so many people face . . .

Cheers!

-warren




- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: "Benjamin Pflugmann" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 8:47 AM
Subject: Re: Hiding the password


> Well, I guess the best solution would be to use a Windows server.
>
> Teddy,
> Teddy's Center: http://teddy.fcc.ro/
> Email: [EMAIL PROTECTED]
>
> - Original Message -
> From: "Benjamin Pflugmann" <[EMAIL PROTECTED]>
> To: "Octavian Rasnita" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 25, 2002 8:39 PM
> Subject: Re: Hiding the password
>
>
> Hello.
>
> On Wed 2002-12-25 at 13:15:58 +0200, [EMAIL PROTECTED] wrote:
> > Hi all,
> >
> > I want to make a CGI program in Perl that queries a MySQL database, and
> the
> > problem is that I need to write the password for the database in the
> program
> > and this password can be seen by any user that has an account on that
> > server.
> >
> > I need to gave 755 permissions to CGI scripts because they need to be
> > executed by the web server account, and not by my account.
> >
> > Do you have any tips for hiding the password,
>
> Not really. Whereever you put it, the web server account has be able
> to access it, so the problem stays. Even if you could arrange that
> only the web server account can read it (e.g. by changing the owner of
> a file containing the password), every user with permission to create
> CGI scripts can still write a script to read the data.
>
> > or accessing MySQL from CGI scripts is not secure at all?
>
> Well, it is as secure as the server is set up. E.g. one can set up
> Apache so that it executes CGIs as the user to whom the script
> belongs. I know this has its own problems... it was only intended as
> example that it is a question of the server configuration.
>
> The "best" way is always a compromise and depends on how the server is
> used. If the server configuration is not in your hands, I don't there
> is much you can do, except asking the admin which way she suggests.
>
> HTH,
>
> Benjamin.
>
> --
> [EMAIL PROTECTED]
>
>
>
> -
> 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:
   htt

Re: Russian in MySQL ?

2003-01-04 Thread Konstantin Sorokin
On Sat, Jan 04, 2003 at 11:17:41AM -0800, Anton Zavrin wrote:
> I don't know about UTF-8, but most Russian web sites run Cyrillic
> Windows encoding or KOI8-R
 ^   
cp1251 (aka windows-1251) you mean ? :) among MySQL charsets
it is known to be cp1251.

-- 
Konstantin Sorokin  .  *   * . * .* .
 .   *   .   .*
Mail.Ru, Moscow, Russia * .  . /\ ( .  . *
Work:8-095-725-63-57 . .  / .\   . * .
.*.  / *  \  . .
  . /*   o \ .
Happy New Year! *   '''||'''   .
**


-
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: Hiding the password

2003-01-04 Thread Mark
- Original Message -
From: "wcb" <[EMAIL PROTECTED]>
To: "Mark" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 7:51 PM
Subject: Re: Hiding the password

> It isn't at all difficult to grasp. Please carefully (and exercising a
> certain amount of patience) read my post and the previous post upon which
> my post was based. We are acknowledging that EVERYONE can find out your id
> and password. The question reformulated is:
>
> "Given that one's MySql environment may not be accessible in terms of
> privs (which is the case for a lot of people, who are paying for hosting
> by a third party) and given that we CAN'T hide the id/password
> combination, is the standard arrangement that hosts use (which is to
> ensure that only localhost can access the database) adequate to prevent
> people from doing unwanted things in your database?

After having read your reply very carefully, really, I still found problems
with your setup:

Assuming that your ISP creates user(s) for you, and has them default to
localhost only, then your problem still remains, and is perhaps even larger.
Because when the entire localhost can access your database, then every user
with shell access on your box (or with web-pages on your system!) has access
to your databases.

> NOTE that I'm assuming that one has a script on localhost, and all users
> are from another domain ...

If you are really the ONLY user on your system, and you have not given
web-access to anyone else, and you trust your DNS, then I suppose you are
safe.

> and also
> assuming that the script is properly set up to constrain the activities
> of users...

Of users? Earlier you had written, "As long as your script is set up to be
secure (for example, not to allow special characters like ~ or &^$, etc.),"
the ~ character you mentioned (see how carefully I read your post?) seemed
to indicate you were protecting your script from misusing users' home
directories. If you only have "visitors" on your system, and not users,
then, and only then, you are safe. Otherwise all other users on your system
will share your localhost privileges.

- Mark


-
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: Hiding the password

2003-01-04 Thread Larry Brown
First, why are we conceding that "everyone can find out your id and
password"?  Your hosting company has your site separated from other
customers' sites right?  So we are just talking about the development team
for your site being privy to this information.

Second, if you are referring to the staff of the hosting company, you can't
avoid their ability to access data via your login scripts period.  As far as
I know they can view all of your communication with the MySQL database and
can get that information.  If you want tight security hosting it yourself is
a must in my view.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: wcb [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 1:51 PM
To: Mark; MySQL
Subject: Re: Hiding the password

It isn't at all difficult to grasp.  Please carefully (and exercising a
certain amount of patience) read my post and the previous post upon which my
post was based.  We are acknowledging that EVERYONE can find out your id and
password.  The question reformulated is:

"Given that one's MySql environment may not be accessible in terms of privs
(which is the case for a lot of people, who are paying for hosting by a
third party) and given that we CAN'T hide the id/password combination, is
the standard arrangement that hosts use (which is to ensure that only
localhost can access the database) adequate to prevent people from doing
unwanted things in your database?  NOTE that I'm assuming that one has a
script on localhost, and all users are from another domain, and also
assuming that the script is properly set up to constrain the activities of
users, does it even matter that people can determine the id/password
combination??"

Thanks for patient responses.

Cheers!

-warren



>
> > Perhaps gurus can comment on what I'm suggesting here - if the database
is
> > set up so that only "localhost" can access it, then you can use a php or
> > PERL script to allow people from elsewhere to cruise in and make queries
> > as your script allows.
>
> Why is this so difficult to grasp? As I, and many others, have pointed
out,
> repeatedly, it does not matter how many layers you wrap around your
> password-retrieval code, as soon as you make the end-result
> accessible/readable by your web-CGI, you have done just that: made the
> user/password accessible by your web-daemon -- hence, made it accessible
to
> everyone with access to your web-server.
>
> And no, adding some sort of access-control within your CGI is equally
> useless: as a user being hosted on your web-server I would not bother to
run
> your CGI, but simply copy it for ocular inspection. :)
>
> > Certainly I'd appreciate comments on this by people in the know, because
> > it is an issue that so many people face...
>
> Perhaps those people should do what I do: create special MySQL users
> (@localhost), unprivileged to the max, with only very narrow SELECT
> privileges to the databases they are supposed to read data from, and use
> those users to access the MySQL server in your CGI.
>
> - Mark
>
>
> -
> 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




RE: Russian in MySQL ?

2003-01-04 Thread Anton Zavrin
Yeah, that's what I meant to say ;-)))

Best Regards, Anton


-Original Message-
From: Konstantin Sorokin [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, January 04, 2003 11:49 AM
To: [EMAIL PROTECTED]
Subject: Re: Russian in MySQL ?

On Sat, Jan 04, 2003 at 11:17:41AM -0800, Anton Zavrin wrote:
> I don't know about UTF-8, but most Russian web sites run Cyrillic
> Windows encoding or KOI8-R
 ^   
cp1251 (aka windows-1251) you mean ? :) among MySQL charsets
it is known to be cp1251.

-- 
Konstantin Sorokin  .  *   * . * .* .
 .   *   .   .*
Mail.Ru, Moscow, Russia * .  . /\ ( .  . *
Work:8-095-725-63-57 . .  / .\   . * .
.*.  / *  \  . .
  . /*   o \ .
Happy New Year! *   '''||'''   .
**


-
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: response to Larry Brown copied for general info. . .

2003-01-04 Thread wcb
Hi!

(MySql, sql, queries for filter)

I may be misunderstanding some things.  Here is what I am thinking and
doing.

I believe that people can find out my id and password because I use scripts
to permit people to enter information or delete information.  I have a
little housing registry and also a learning/testing site, for example.  So I
have (in these cases) php scripts allowing people to log in and then
allowing them to access the applications.  The scripts always have to be the
"localhost" connection to the database, so they have to log in and all users
have access to my scripts.  So (as I see it) everyone could potentially see
the id and password.On the other hand that doesn't seem to be a huge
worry because unless they can connect as localhost using their
own scripts or application, then they have to use my scripts and they can't
do anything especially evil (not that they want to . . .).

I would definitely agree that if you want airtight security you have to do
your own hosting. . .  However, at the moment I'm busy with other things so
that just isn't a possibility.  I'd love to have full access to the user
privileges, etc. but that will be maybe a year from now. . .

Also, I seem to be doing what JamesD suggested in an earlier post.  His
example uses Perl but I do the same thing using php.  This approach so far
has been working well.

Thanks for all your input!  This feedback is very, very helpful.

-warren





-
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: Hiding the password

2003-01-04 Thread Larry Brown
When someone hits a php page the server runs the script executing the login
and password and just sends results to the users.  (unless I'm mistaken)  So
the user can't see that login name and password.  If they view the source it
just shows the html the script generated.  So is the application you are
giving them access to one that allows them to view and modify scripts on
that site?  Let's say to access the database the script logs in with user
"root" pass "password".  The script would log into the db with those
credentials and then prompt the user for their login and password.  Their
login and password would be stored on a table within the database that is
open.  Their response would be checked and they would be granted access to
the next page.  The next page would the log back into the database still not
viewed by the client and then pull data as your script executes or publish
data all in the background while the client is just seeing the html that the
script generates.  I don't see how they could see what is written on the
script unless they are logged in to the server or the application you are
talking about them accessing is one that allows them to view scripts etc.
If I'm wrong or if there is something I'm missing here please let me know.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: wcb [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 2:55 PM
To: Larry Brown
Subject: Re: Hiding the password

Hi!

I may be misunderstanding some things.  However, as best I can here is what
I am thinking.

I believe that people can find out my id and password because I use scripts
to permit people to enter information or delete information.  I have been
setting up a little housing registry and also a learning/testing site for
example.  So I have (in these cases) php scripts allowing people to log in
and then allowing them to access the applications.  The scripts always have
to be the "localhost" connection to the database, so they have to log in and
all users have access to my scripts.  So (as I see it) everyone could
potentially see the id and password.On the other hand that doesn't seem
to be a huge worry because unless they can connect as localhost using their
own scripts or application, then they have to use my scripts and they can't
do anything especially evil (not that they want to . . .).

I would definitely agree that if you want airtight security you have to do
your own hosting. . .  However, at the moment I'm busy with other things so
that just isn't a possibility.  I'd love to have full access to the user
privileges, etc. but that will be maybe a year from now. . .

Thanks!

-warren




> First, why are we conceding that "everyone can find out your id and
> password"?  Your hosting company has your site separated from other
> customers' sites right?  So we are just talking about the development team
> for your site being privy to this information.
>
> Second, if you are referring to the staff of the hosting company, you
can't
> avoid their ability to access data via your login scripts period.  As far
as
> I know they can view all of your communication with the MySQL database and
> can get that information.  If you want tight security hosting it yourself
is
> a must in my view.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>



-
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 + ASP Getting Started

2003-01-04 Thread Bill Lovett
If you're asking what I think you're asking, no. You can't store your 
MySQL queries the way you can with Access or SQLServer (views/stored 
procedures). Your ASP scripts have to build the queries they need by 
themselves.

-bill

John Berman wrote:
Hi

I have on line access databases and I query them using ASP - I often
create the initial in the access dbase and then use asp on the query and
again this method works well.

I have recently upgrade the database format to mysql but am still using
ASP which I assume is ok ?

Can I create queries within the MYSQL dbase and then use ASP to query
them (hope this makes sense)

Im using mySQL Front to interface with the dbase (is this the best
graphical interface) and I can create queries on the fly but cant save
them  - well only locally in text files I had hoped to save them in a
similar way to views in SQL

Regards

John 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




second response to Larry Brown's second post for general perusal andcomment

2003-01-04 Thread wcb
Hi!

(for filter: Mysql queries query longint)

Oh no, the people who log in cannot modify scripts.  That would be suicide.
. .   They log via something I made that maintains an md5 hash (quite a long
one) which is their "log-in flag" maintained via a cookie while they are
logged in.  It also requires the user's personal password (which has nothing
to do with the database).  Then they can access the database via scripts (as
long as they are logged in).  This looks like


if (user_isloggedin()) {
include($DOCUMENT_ROOT.'/include/SomeScriptNameHere.php');  //this include
has database id and password
. . .  a bunch of code here (current script)
}
else {//some error message advising user to log in}

So the database id and password are buried in an "include" script.  The
scripts just do some inserting and updating on tables that "belong" to the
person in question, so they can (in the case of the learning/testing
application for instance) enter test questions and post tests that their
students can access.

I'm hoping that people can't get access to the id and password but I have
always assumed that someone with ability may be able to extract the script
itself and examine it.  However, since they can't log in to the server (but
only to my "log in" facility, which allows them access to a folder
containing a script which they cannot modify) they are not "localhost" users
or visitors.  The scripts they can access reside on localhost, but nobody
can touch the scripts. . .

Thanks again!  I'm feeling somewhat better!

Cheers!

-warren



-
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 Help Needed Please

2003-01-04 Thread Anton Zavrin
Did:
ps -ef | grep mysqld

got nothing
Though I can do:
# mysql -u root -p
Enter password: 
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (61)
#

Anything else I should try :( ?

Best Regards, Anton


-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, January 04, 2003 8:01 AM
To: Anton Zavrin; 'Thomas Spahni'
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL Help Needed Please

Anton,

first thing, try:

ps [whatever options] | grep mysqld

The daemon (database server) is called mysqld, not mysql.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Anton Zavrin" <[EMAIL PROTECTED]>
To: "'Thomas Spahni'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 9:01 AM
Subject: RE: MySQL Help Needed Please


> I have this file:
> srwxrwxrwx  1 mysql  wheel0 Jan  2 16:45 mysql.sock
>
> I have two of .err files and non of the log files
>
> I also can't find my *.cnf file(s)
>
> Did: ps -ef | grep mysql
> Got nothing
>
> What should I do?
>
> Best Regards, Anton
>
>
> -Original Message-
> From: Thomas Spahni [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 7:01 AM
> To: Anton Zavrin
> Cc: [EMAIL PROTECTED]
> Subject: Re: MySQL Help Needed Please
>
> Anton,
>
> check the .err and .log files in your data
> directory.
> Then check permissions. My sock file looks like:
>
> srwxrwxrwx1 mysqldaemon  0 Dez 30 19:12 mysql.sock
>
> and finally check for your
>
> socket= /tmp/mysql.sock
>
> entries in /etc/my.cnf and ~/.my.cnf
>
> Thomas Spahni
>
> On Fri, 3 Jan 2003, Anton Zavrin wrote:
>
> > Hi guys,
> > I'm new here and need help.
> > I'm installing MySQL on FreeBSD 4.7. I actually had/have MySQL
> installed
> > but when I'm trying to run it says:
> > error: 'Can't connect to local MySQL server through socket
> > '/tmp/mysql.sock' (61)' Check that mysqld is running and that the
> > socket: '/tmp/mysql.sock' exists!
> >
> > I checked /tmp/mysql.sock' and the file exists.
> > But I don't see any process that would show me mysqld is running.
> >
> > Then I tried to re-install it from the ports and it says:
> > You appear to already have a mysql database directory in
> /var/db/mysql.
> >
> > In order to preserve your existing data, you should:
> > - dump all your databases
> > - kill mysql if it is running
> > - delete the /var/db/mysql directory
> > - run 'make install'
> > - start up mysql
> > - re-create all of your database
> > - re-load your data
> >
> > If you understand the consequences of this upgrade, please re-build
> this
> > port with the environment variable OVERWRITE_DB defined.
> > *** Error code 1
> >
> > Stop in /usr/ports/databases/mysql323-server.
> >
> > Please help, what should I do?
> >
> > Best Regards, Anton
>
>
> -
> 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: Hiding the password

2003-01-04 Thread Larry Brown
Unless someone else knows differently I don't think any amount of know-how
from a visitor to the site will allow them to view the script itself unless
some mishap happened to the web server and it stopped parsing the script and
just diplayed the contents or if it didn't recognize the tags for some
reason.  If someone knows differently please let me know.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: wcb [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 3:52 PM
To: Larry Brown
Subject: Re: Hiding the password

Hi!

Oh no, the people who log in cannot modify scripts.  That would be suicide.
. .   They log via something I made that maintains an md5 hash (quite a long
one) which is their "log-in flag" maintained via a cookie while they are
logged in.  It also requires the user's personal password (which has nothing
to do with the database).  Then they can access the database via scripts.
The database id and password are buried in an "include" script.  The scripts
just do some inserting and updating on tables that "belong" to the person in
question, so they can (in the case of the learning/testing application for
instance) enter test questions and post tests that their students can
access.

I'm hoping that people can't get access to the id and password but I have
always assumed that someone with ability may be able to extract the script
itself and examine it.  However, since they can't log in to the server (but
only to my "log in" facility, which allows them access to a folder
containing a script which they cannot modify) they are not "localhost" users
or visitors.  The scripts they can access reside on localhost, but nobody
can touch the scripts. . .

Thanks again!  I'm feeling somewhat better!

Cheers!

-warren




- Original Message -
From: "Larry Brown" <[EMAIL PROTECTED]>
To: "wcb" <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 12:33 PM
Subject: RE: Hiding the password


> When someone hits a php page the server runs the script executing the
login
> and password and just sends results to the users.  (unless I'm mistaken)
So
> the user can't see that login name and password.  If they view the source
it
> just shows the html the script generated.  So is the application you are
> giving them access to one that allows them to view and modify scripts on
> that site?  Let's say to access the database the script logs in with user
> "root" pass "password".  The script would log into the db with those
> credentials and then prompt the user for their login and password.  Their
> login and password would be stored on a table within the database that is
> open.  Their response would be checked and they would be granted access to
> the next page.  The next page would the log back into the database still
not
> viewed by the client and then pull data as your script executes or publish
> data all in the background while the client is just seeing the html that
the
> script generates.  I don't see how they could see what is written on the
> script unless they are logged in to the server or the application you are
> talking about them accessing is one that allows them to view scripts etc.
> If I'm wrong or if there is something I'm missing here please let me know.
>
> Larry S. Brown
> Dimension Networks, Inc.
> (727) 723-8388
>
> -Original Message-
> From: wcb [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 04, 2003 2:55 PM
> To: Larry Brown
> Subject: Re: Hiding the password
>
> Hi!
>
> I may be misunderstanding some things.  However, as best I can here is
what
> I am thinking.
>
> I believe that people can find out my id and password because I use
scripts
> to permit people to enter information or delete information.  I have been
> setting up a little housing registry and also a learning/testing site for
> example.  So I have (in these cases) php scripts allowing people to log in
> and then allowing them to access the applications.  The scripts always
have
> to be the "localhost" connection to the database, so they have to log in
and
> all users have access to my scripts.  So (as I see it) everyone could
> potentially see the id and password.On the other hand that doesn't
seem
> to be a huge worry because unless they can connect as localhost using
their
> own scripts or application, then they have to use my scripts and they
can't
> do anything especially evil (not that they want to . . .).
>
> I would definitely agree that if you want airtight security you have to do
> your own hosting. . .  However, at the moment I'm busy with other things
so
> that just isn't a possibility.  I'd love to have full access to the user
> privileges, etc. but that will be maybe a year from now. . .
>
> Thanks!
>
> -warren
>
>
>
>
> > First, why are we conceding that "everyone can find out your id and
> > password"?  Your hosting company has your site separated from other
> > customers' sites right?  So we are just talking about the development
team
> > for yo

Re: MySQL Help Needed Please

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Anton,

>ps -ef | grep mysqld
>got nothing

Because the MySQL SERVER isn't running!

>Though I can do:
># mysql -u root -p

With this command, you start the MySQL Monitor (that's the SQL command
line CLIENT tool that comes along with MySQL) and tell it to connect to
a MySQL SERVER running on localhost, as user root and willing to enter a
password.

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

Can't connect - this means the CLIENT tool cannot connect because there
is no server running!

Start the server using the mysql_safe script (more info here:
http://www.mysql.com/doc/en/safe_mysqld.html).

For a test, you can simply start the server like this:

# mysqld &

AFTER THAT you connect to the SERVER using the CLIENT tool mysql.

Hope this gets you running,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Anton Zavrin" <[EMAIL PROTECTED]>
To: "'Stefan Hinz, iConnect (Berlin)'" <[EMAIL PROTECTED]>; "'Thomas
Spahni'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 9:59 PM
Subject: RE: MySQL Help Needed Please


Did:
ps -ef | grep mysqld

got nothing
Though I can do:
# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (61)
#

Anything else I should try :( ?

Best Regards, Anton


-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 8:01 AM
To: Anton Zavrin; 'Thomas Spahni'
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL Help Needed Please

Anton,

first thing, try:

ps [whatever options] | grep mysqld

The daemon (database server) is called mysqld, not mysql.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Anton Zavrin" <[EMAIL PROTECTED]>
To: "'Thomas Spahni'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 9:01 AM
Subject: RE: MySQL Help Needed Please


> I have this file:
> srwxrwxrwx  1 mysql  wheel0 Jan  2 16:45 mysql.sock
>
> I have two of .err files and non of the log files
>
> I also can't find my *.cnf file(s)
>
> Did: ps -ef | grep mysql
> Got nothing
>
> What should I do?
>
> Best Regards, Anton
>
>
> -Original Message-
> From: Thomas Spahni [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 7:01 AM
> To: Anton Zavrin
> Cc: [EMAIL PROTECTED]
> Subject: Re: MySQL Help Needed Please
>
> Anton,
>
> check the .err and .log files in your data
> directory.
> Then check permissions. My sock file looks like:
>
> srwxrwxrwx1 mysqldaemon  0 Dez 30 19:12 mysql.sock
>
> and finally check for your
>
> socket= /tmp/mysql.sock
>
> entries in /etc/my.cnf and ~/.my.cnf
>
> Thomas Spahni
>
> On Fri, 3 Jan 2003, Anton Zavrin wrote:
>
> > Hi guys,
> > I'm new here and need help.
> > I'm installing MySQL on FreeBSD 4.7. I actually had/have MySQL
> installed
> > but when I'm trying to run it says:
> > error: 'Can't connect to local MySQL server through socket
> > '/tmp/mysql.sock' (61)' Check that mysqld is running and that the
> > socket: '/tmp/mysql.sock' exists!
> >
> > I checked /tmp/mysql.sock' and the file exists.
> > But I don't see any process that would show me mysqld is running.
> >
> > Then I tried to re-install it from the ports and it says:
> > You appear to already have a mysql database directory in
> /var/db/mysql.
> >
> > In order to preserve your existing data, you should:
> > - dump all your databases
> > - kill mysql if it is running
> > - delete the /var/db/mysql directory
> > - run 'make install'
> > - start up mysql
> > - re-create all of your database
> > - re-load your data
> >
> > If you understand the consequences of this upgrade, please re-build
> this
> > port with the environment variable OVERWRITE_DB defined.
> > *** Error code 1
> >
> > Stop in /usr/ports/databases/mysql323-server.
> >
> > Please help, what should I do?
> >
> > Best Regards, Anton
>
>
> -
> 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 unsubscrib

Re: How to Unlock a row?

2003-01-04 Thread Heikki Tuuri
Clyde,

- Original Message -
From: ""Clyde"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Saturday, January 04, 2003 11:47 AM
Subject: How to Unlock a row?


> Hi,
>
> Using MySql with InnoDB files you can lock rows for update.
> Eg select * from customer where cusomerID=1 for update
>
> I assume these locks are release when the the records selected are
actually updated

no.

(or the connection is terminated). But how do you release these record locks
if you do not want to go ahead with the update.
>
> Scenario:
>
> User selects records to update.
> User changes mind (clicks on cancel button)
>
> Now we have locked rows that need to be unlocked.
>
> How to do this?

InnoDB only releases row locks in COMMIT and ROLLBACK. Terminating a
connection in MySQL automatically does a ROLLBACK. In your case I think a
ROLLBACK is appropriate?

There is no method to unlock an InnoDB row during the transaction. That
feature could be added rather easily:

SELECT ... FROM ... WHERE ... UNLOCK;

but since such SQL commands do not exist in most other databases, I think
there is little need for the feature.

> Thanks
> Clyde

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB




-
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




Access control lists on rows?

2003-01-04 Thread Steven Nakhla
I know I can restrict a user's access to a table with
the GRANT command.  However, is there any way to
restrict a user's access to individual rows within a
table?  For example, if I were using a SQL table to
hold binary data (utilizing it like a filesystem, for
example) could I restrict a user from reading or
writing to or from certain rows within the table?  Has
anyone implemented something like this before and
could give me some insight?  Thanks much!


Steve Nakhla

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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: Access control lists on rows?

2003-01-04 Thread Paul DuBois
At 14:39 -0800 1/4/03, Steven Nakhla wrote:

I know I can restrict a user's access to a table with
the GRANT command.  However, is there any way to
restrict a user's access to individual rows within a
table?


Not with MySQL's grant tables.  You have to control this kind
of thing through application logic.


  For example, if I were using a SQL table to
hold binary data (utilizing it like a filesystem, for
example) could I restrict a user from reading or
writing to or from certain rows within the table?  Has
anyone implemented something like this before and
could give me some insight?  Thanks much!

Steve Nakhla



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: How to Unlock a row?

2003-01-04 Thread Clyde
Clyde,

- Original Message -
From: ""Clyde"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Saturday, January 04, 2003 11:47 AM
Subject: How to Unlock a row?


> Hi,
>
> Using MySql with InnoDB files you can lock rows for update.
> Eg select * from customer where cusomerID=1 for update
>
> I assume these locks are release when the the records selected are
actually updated

>no.

Does this still hold true if MySql is running in autocommit mode?

And therefore does the query "select * from customer where cusomerID=1 for update" 
only make sense to use if autocommit is OFF? IE if Autocommit is on, and you run this 
query, are the records still locked, or has an implicit COMMIT been issued because we 
are running in autocommit mode - thus releasing the record lock.


Thanks
Clyde





-
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




[ANNOUNCE] Struts Training in NYC and DC in January

2003-01-04 Thread John Menke
Increase Your Struts Productivity - Attend the BaseBeans Public Struts
Training

We have a 11 hour public class in DC and in NYC in January.

Washington DC Class -- January 18th 2003
NYC Class  -- January 24th 2003

This class is taught by baseBeans Engineering, the company voted to have the
best hands on training class by JDJ for their "Fast Track to Struts" class.

Get your training from the #1 trainer with a money back guarantee

You will pay $50 to register and be billed the balance. Upon registration,
you will be shipped a CD that contains the tools needed for the class, such
as an IDE, App. Server, some sample working source code, Struts, etc.

Follow this link to register:  http://www.basebeans.com/do/classReservation

At the training, we will cover Struts, Java Server Faces, JDO, DAO,
JDBC,etc.

A pre-requisite for attendance is some Struts knowledge or at least Servlet
and SQL knowledge. This class is targeted at tech leads. Bring your
questions and receive practical advice from the baseBeans team.

You can FedEx a check or a PO for the balance to BaseBeans.

Prior paid students and clients are free for this class, as always, but we
need to know you are coming.

Hope to see you there,

JOHN


-
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: How to Unlock a row?

2003-01-04 Thread Paul DuBois
At 7:07 +0800 1/5/03, Clyde wrote:

Clyde,

- Original Message -
From: ""Clyde"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Saturday, January 04, 2003 11:47 AM
Subject: How to Unlock a row?



 Hi,

 Using MySql with InnoDB files you can lock rows for update.
 Eg select * from customer where cusomerID=1 for update

 I assume these locks are release when the the records selected are

actually updated


no.


Does this still hold true if MySql is running in autocommit mode?

And therefore does the query "select * from customer where 
cusomerID=1 for update" only make sense to use if autocommit is OFF? 
IE if Autocommit is on, and you run this query, are the records 
still locked, or has an implicit COMMIT been issued because we are 
running in autocommit mode - thus releasing the record lock.

The latter.  In auto-commit mode, each statement is its own transaction.




Thanks
Clyde



-
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[2]: Access control lists on rows?

2003-01-04 Thread Brian Lindner

if MySQL implemented db view objects.. then this functionality could
be done.. Could create a view as select * from table where 
 then grant a user access to the View, not the table  so they can only
 get the filtered resultset.   This is how some larger db systems,
 like Oracle do it.

 I forget if mysql is planning on having db View objects anytime but
 until then, yes, you would have to control this in application code..
 

 --
 Brian Lindner


Saturday, January 4, 2003, 5:44:19 PM, you wrote:
> At 14:39 -0800 1/4/03, Steven Nakhla wrote:
>>I know I can restrict a user's access to a table with
>>the GRANT command.  However, is there any way to
>>restrict a user's access to individual rows within a
>>table?

> Not with MySQL's grant tables.  You have to control this kind
> of thing through application logic.

>>   For example, if I were using a SQL table to
>>hold binary data (utilizing it like a filesystem, for
>>example) could I restrict a user from reading or
>>writing to or from certain rows within the table?  Has
>>anyone implemented something like this before and
>>could give me some insight?  Thanks much!
>>
>>Steve Nakhla


> 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




Question - SELECT

2003-01-04 Thread Terence Ng
How do I correct this SQL code:
 
2 tables there, 
lcopen: id, bank, unit_price_us, order_cbm
lcreceive: id, amount_us, due_date

SELECT
lcopen.bank, 
SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open,
#
SUM(lcreceive.amount_us) where lcreceive.due_date <
current_date AS receive,
#
# the above statement is not correct 
# 
FROM lcopen, lcreceive 
AND lcopen.id=lcreceive.id 
GROUP BY lcopen.bank;


#this condition :lcreceive.due_date < current_date
#only affect to : SUM(lcreceive.amount_us)
#and not :
#SUM(lcopen.unit_price_us*lcopen.order_cbm) * 7.8 AS
open

 
 
 
Terence Ng


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

-
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




Full text search

2003-01-04 Thread Steffan A. Cline
Am I missing something on mysql full text search?


I was using a simple statement like
select firstname from contacts where match(firstname,lastname) against
('steffa');

I am actually looking for "steffan" but wanted to see what it would return.
Now, if I search for the full name "steffan" it finds it ok. Is there
something I am missing for it to return any matches containing "steff" or
"steffa" or even "stef" 


Thanks

Steffan

---
T E L  6 0 2 . 5 7 9 . 4 2 3 0 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
Steffan A. Cline
[EMAIL PROTECTED] Phoenix, Az
http://www.ExecuChoice.net  USA
AIM : SteffanC  ICQ : 57234309
The Executive's Choice in Lasso driven Internet Applications
---



-
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




Unistall Source

2003-01-04 Thread Tyler
Hi.  How do I unstall a source tarball (tar.gz) of mySQL? (or any prog for
that, I need to uninstall Emacs too) I installed Mysql-3.23.51, but the
install docs dont seem to work for that, and I finally found a working src
for .54, so I wanna take out the old one.

Thanks in advance

Tyler

-
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




Optimize Table usage

2003-01-04 Thread Dan Cumpian
Hello,

I am trying to write a process to optimize several tables in a database
by using the OPTIMIZE TABLE command in a query. I have a couple of
questions that I can't get an answer to in the documentation:

1) Do I: Query.ExecSQL or Query.Open to execute the OPTIMIZE TABLE
TableName command?

2) The queries are returning instantly and when the program tries to run
OPTIMIZE TABLE on the next table, I am getting a "commands out of sync"
error. How can I tell when the optimization process is complete? (Please
note that I am using Delphi and Query objects to interface with the
tables).

3) Should I do a CHECK TABLE before I do an OPTIMIZE TABLE?

Thanks,
Dan Cumpian



-
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 ERROR 1064

2003-01-04 Thread David & Angela Ehmer
Hi

I am having problems generating the mysqldump file.  I have tried a range of
options and carefully studied several tutorials I have on using this
command.  Each time I get the following errror.

ERROR 1064 you have an error in your SQL syntax near 'mysqldump -u root -p
adrienne netno_db >sql.dump' at line 1.

I appear to have other problems with some commands. For example if I type;

mysqladmin --help

at the command line I get the 1064 ERROR

Appreciate any suggestions about what may be the problem here

David




-
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: Full text search

2003-01-04 Thread Qunfeng Dong
full text search is different than pattern match. If
you want to return stef, you have to use pattern
match. 

Qunfeng

--- "Steffan A. Cline" <[EMAIL PROTECTED]> wrote:
> Am I missing something on mysql full text search?
> 
> 
> I was using a simple statement like
> select firstname from contacts where
> match(firstname,lastname) against
> ('steffa');
> 
> I am actually looking for "steffan" but wanted to
> see what it would return.
> Now, if I search for the full name "steffan" it
> finds it ok. Is there
> something I am missing for it to return any matches
> containing "steff" or
> "steffa" or even "stef" 
> 
> 
> Thanks
> 
> Steffan
> 
>
---
> T E L  6 0 2 . 5 7 9 . 4 2 3 0 | F A X  6 0 2 . 9 7
> 1 . 1 6 9 4
> Steffan A. Cline
> [EMAIL PROTECTED]
> Phoenix, Az
> http://www.ExecuChoice.net  
>USA
> AIM : SteffanC  ICQ : 57234309
> The Executive's Choice in Lasso driven Internet
> Applications
>
---
> 
> 
> 
>
-
> 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!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.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: mysqldump ERROR 1064

2003-01-04 Thread John Coder
On Sun, 2003-01-05 at 00:00, David & Angela Ehmer wrote:
> Hi
> 
> I am having problems generating the mysqldump file.  I have tried a range of
> options and carefully studied several tutorials I have on using this
> command.  Each time I get the following errror.
> 
> ERROR 1064 you have an error in your SQL syntax near 'mysqldump -u root -p
> adrienne netno_db >sql.dump' at line 1.
> 
 Don't have a space between p and password it should be as :
mysqldump -u root -padrienne netno-db > sql.dump



-
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 Help Needed Please

2003-01-04 Thread Anton Zavrin
Well, I read, played around and updated it (I guess)
Now, when I try to start mysql with this command (same as before), it
gives me that:
# /usr/local/bin/safe_mysqld --user=mysql &
[1] 71491
# Starting mysqld daemon with databases from /usr/local/var
030104 23:01:55  mysqld ended


[1]Done  /usr/local/bin/safe_mysqld
--user=mysql

How do I re-point mysql to look for my old database, I guess that's the
problem right?

Thank you Stefan

Best Regards, Anton


-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, January 04, 2003 2:14 PM
To: Anton Zavrin; 'Thomas Spahni'
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL Help Needed Please

Anton,

>ps -ef | grep mysqld
>got nothing

Because the MySQL SERVER isn't running!

>Though I can do:
># mysql -u root -p

With this command, you start the MySQL Monitor (that's the SQL command
line CLIENT tool that comes along with MySQL) and tell it to connect to
a MySQL SERVER running on localhost, as user root and willing to enter a
password.

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

Can't connect - this means the CLIENT tool cannot connect because there
is no server running!

Start the server using the mysql_safe script (more info here:
http://www.mysql.com/doc/en/safe_mysqld.html).

For a test, you can simply start the server like this:

# mysqld &

AFTER THAT you connect to the SERVER using the CLIENT tool mysql.

Hope this gets you running,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Anton Zavrin" <[EMAIL PROTECTED]>
To: "'Stefan Hinz, iConnect (Berlin)'" <[EMAIL PROTECTED]>; "'Thomas
Spahni'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 9:59 PM
Subject: RE: MySQL Help Needed Please


Did:
ps -ef | grep mysqld

got nothing
Though I can do:
# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (61)
#

Anything else I should try :( ?

Best Regards, Anton


-Original Message-
From: Stefan Hinz, iConnect (Berlin) [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 8:01 AM
To: Anton Zavrin; 'Thomas Spahni'
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL Help Needed Please

Anton,

first thing, try:

ps [whatever options] | grep mysqld

The daemon (database server) is called mysqld, not mysql.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH 
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: "Anton Zavrin" <[EMAIL PROTECTED]>
To: "'Thomas Spahni'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, January 04, 2003 9:01 AM
Subject: RE: MySQL Help Needed Please


> I have this file:
> srwxrwxrwx  1 mysql  wheel0 Jan  2 16:45 mysql.sock
>
> I have two of .err files and non of the log files
>
> I also can't find my *.cnf file(s)
>
> Did: ps -ef | grep mysql
> Got nothing
>
> What should I do?
>
> Best Regards, Anton
>
>
> -Original Message-
> From: Thomas Spahni [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 03, 2003 7:01 AM
> To: Anton Zavrin
> Cc: [EMAIL PROTECTED]
> Subject: Re: MySQL Help Needed Please
>
> Anton,
>
> check the .err and .log files in your data
> directory.
> Then check permissions. My sock file looks like:
>
> srwxrwxrwx1 mysqldaemon  0 Dez 30 19:12 mysql.sock
>
> and finally check for your
>
> socket= /tmp/mysql.sock
>
> entries in /etc/my.cnf and ~/.my.cnf
>
> Thomas Spahni
>
> On Fri, 3 Jan 2003, Anton Zavrin wrote:
>
> > Hi guys,
> > I'm new here and need help.
> > I'm installing MySQL on FreeBSD 4.7. I actually had/have MySQL
> installed
> > but when I'm trying to run it says:
> > error: 'Can't connect to local MySQL server through socket
> > '/tmp/mysql.sock' (61)' Check that mysqld is running and that the
> > socket: '/tmp/mysql.sock' exists!
> >
> > I checked /tmp/mysql.sock' and the file exists.
> > But I don't see any process that would show me mysqld is running.
> >
> > Then I tried to re-install it from the ports and it says:
> > You appear to already have a mysql database directory in
> /var/db/mysql.
> >
> > In order to preserve your existing data, you should:
> > - dump all your databases
> > - kill mysql if it is running
> > - delete the /var/db/mysql directory
> > - run 'make install'
> > - start up mysql
> > - re-create all of your database
> > - re-load your data
> >
> > If you understand the consequences of this upgrade, please re-build
> this
> > port with the environment variable OVERWRITE_DB defined.
> > *** Error code 1
> >
> > Stop in /usr/ports/databases/mysql323-server.
> >
> > Please h