select records to send to another table in another database

2008-04-10 Thread Larry Brown
I have a slew of records that went to the wrong database.  The tables
have the same names and now I want to copy those records over to the
correct database.  Is there such a mechanism using the cli mysql
application in Linux?

Larry



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



Re: select records to send to another table in another database

2008-04-10 Thread Larry Brown


On Thu, 2008-04-10 at 11:43 -0500, Paul DuBois wrote:

 
 For each corresponding table:
 
 INSERT INTO db1.mytable SELECT * FROM db2.mytable;
 
 -- 
 Paul DuBois, MySQL Documentation Team
 Madison, Wisconsin, USA
 MySQL AB, www.mysql.com
 

That is exactly what I was looking for.  Thank you all very much.  

Larry

-- 
Larry Brown [EMAIL PROTECTED]


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



c api and creating looped queries

2004-08-27 Thread Larry Brown
I know this is more along the lines of a c question; however, I am
trying to write a loop to iterate insertions into a mysql database and
was hoping someone would have a quick fix for this.

I am used to using php with the luxury of the following syntax

 some loop giving values $column1 and $column2 usually from some array 
or parsing of a file

$query = mysql_query( insert into my_table values ( null, '$column1',
'some description $column2' );

 next iteration 

Can anyone just show a one liner of how to do this in c where the values
are column1 and column2?  I know there is a string concatenation
function, it just seems so clumsey to write it out, get the string
length of each of the two variables and create a new longer line.  I
won't be suprised if that is what I have to do though.  ( being new to c
and finding out how much more work it entails:-) ).

Hope this make since at nearly 1 am.  Been a long day...


 


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



Re: c api and creating looped queries

2004-08-27 Thread Larry Brown
On Sat, 2004-08-28 at 00:48, I wrote:
 I know this is more along the lines of a c question; however, I am
 trying to write a loop to iterate insertions into a mysql database and
 was hoping someone would have a quick fix for this.
 
 I am used to using php with the luxury of the following syntax
 
  some loop giving values $column1 and $column2 usually from some array 
 or parsing of a file
 
 $query = mysql_query( insert into my_table values ( null, '$column1',
 'some description $column2' );
 
  next iteration 
 
 Can anyone just show a one liner of how to do this in c where the values
 are column1 and column2?  I know there is a string concatenation
 function, it just seems so clumsey to write it out, get the string
 length of each of the two variables and create a new longer line.  I
 won't be suprised if that is what I have to do though.  ( being new to c
 and finding out how much more work it entails:-) ).
 
 Hope this make since at nearly 1 am.  Been a long day...
 
 

OK, hate to answer my own question but sprintf is what I was looking
for.  It is hard to switch languages!  Especially in this direction. ;-)


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



command line escape for apostrophe

2004-02-25 Thread Larry Brown
I usually use php for most of my work, but I  have to run a fair percentage
of maintenance etc from the mysql shell program.  I have a record that has
an apostrophe and so was inserted using php by escaping the ' with \ so that
it was put in as \' and it shows up in the record as O'Brien as it should.
I am trying to run a select statement from the shell program and it will not
accept \ or double '' for escaping it.  Pretty simple problem, but I can't
find anything via google for it.  (Or the manual for that matter. )

TIA

Larry



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



RE: command line escape for apostrophe

2004-02-25 Thread Larry Brown
My bad people.  The error was elsewhere in the query, but the error
happenned to describe the query as failing near where the apostrophe was.
Sorry to waste anyone's time.

Larry

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 2:25 PM
To: MySQL List
Subject: command line escape for apostrophe


I usually use php for most of my work, but I  have to run a fair percentage
of maintenance etc from the mysql shell program.  I have a record that has
an apostrophe and so was inserted using php by escaping the ' with \ so that
it was put in as \' and it shows up in the record as O'Brien as it should.
I am trying to run a select statement from the shell program and it will not
accept \ or double '' for escaping it.  Pretty simple problem, but I can't
find anything via google for it.  (Or the manual for that matter. )

TIA

Larry



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





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



RE: order of elements in where clause

2004-01-26 Thread Larry Brown
ok, I have a table with 100,000+ records. 98% of these records are jobs that
have been completed.  I have created an index for status.  Status=4 is one
of 4 different states a job can be in prior to completion so we aren't
talking about a lot of records that meet that status level.

query = SELECT field1,field2,field3,field4 FROM table WHERE status=4 and del
 1 and level = 1

now I don't see a need for creating an index for level since most records
are level 1 nor del since most records are del=0.  However, in order to have
mysql use the status index, do I have to create indexes for those as well?
I did as you suggested with explain and got back...

table   typepossible_keys   key key_len ref rowsextra
mainall nullnullnullnull174620  whereused; 
using filesort

Being new to this I don't know for sure, but isn't this saying that the
index is not being used?

Larry


-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 24, 2004 8:14 PM
To: Larry Brown; MySQL List
Subject: Re: order of elements in where clause


At 8:34 -0500 1/24/04, Larry Brown wrote:
in a select statement, is the order of elements in the where clause the
determining factor on what records are chosen first, second etc?

No.  The optimizer examines the query to determine the most efficient
way to execute the query. You can get information about how the optimizer
views a SELECT statement by issuing it with the word EXPLAIN prepended:

EXPLAIN select fname from maintable where status=1 and dob  '2001-03-10';


for instance...

select fname from maintable where status=1 and dob  '2001-03-10';

does that mean that the records will first be checked for status creating a
pool of records with status=1 to then check for dob out of that pool or if
one of the fields is an index will it automatically use the index first or
does it use some other ordering methodology?

TIA

Larry



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

MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/




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



RE: order of elements in where clause

2004-01-26 Thread Larry Brown
My bad... I was sure I had created a status index, however, after inspection
it appears I had not.  I created it and presto!  Performance is as good if
not better than when I had +- 20,000 records last week.

Thanks to anyone who concidered commenting,

Larry

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Monday, January 26, 2004 10:27 AM
To: Paul DuBois; MySQL List
Subject: RE: order of elements in where clause


ok, I have a table with 100,000+ records. 98% of these records are jobs that
have been completed.  I have created an index for status.  Status=4 is one
of 4 different states a job can be in prior to completion so we aren't
talking about a lot of records that meet that status level.

query = SELECT field1,field2,field3,field4 FROM table WHERE status=4 and del
 1 and level = 1

now I don't see a need for creating an index for level since most records
are level 1 nor del since most records are del=0.  However, in order to have
mysql use the status index, do I have to create indexes for those as well?
I did as you suggested with explain and got back...

table   typepossible_keys   key key_len ref rowsextra
mainall nullnullnullnull174620  whereused; 
using filesort

Being new to this I don't know for sure, but isn't this saying that the
index is not being used?

Larry


-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 24, 2004 8:14 PM
To: Larry Brown; MySQL List
Subject: Re: order of elements in where clause


At 8:34 -0500 1/24/04, Larry Brown wrote:
in a select statement, is the order of elements in the where clause the
determining factor on what records are chosen first, second etc?

No.  The optimizer examines the query to determine the most efficient
way to execute the query. You can get information about how the optimizer
views a SELECT statement by issuing it with the word EXPLAIN prepended:

EXPLAIN select fname from maintable where status=1 and dob  '2001-03-10';


for instance...

select fname from maintable where status=1 and dob  '2001-03-10';

does that mean that the records will first be checked for status creating a
pool of records with status=1 to then check for dob out of that pool or if
one of the fields is an index will it automatically use the index first or
does it use some other ordering methodology?

TIA

Larry



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

MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/




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





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



order of elements in where clause

2004-01-24 Thread Larry Brown
in a select statement, is the order of elements in the where clause the
determining factor on what records are chosen first, second etc?

for instance...

select fname from maintable where status=1 and dob  '2001-03-10';

does that mean that the records will first be checked for status creating a
pool of records with status=1 to then check for dob out of that pool or if
one of the fields is an index will it automatically use the index first or
does it use some other ordering methodology?

TIA

Larry



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



query performance

2004-01-23 Thread Larry Brown
I have a db that had some 20,000 records or so in it.  I have a query to
find out how many jobs have been input during the current day.  To add them
I ran the following query...

select count(idnumber) from maintable where inputdatetime  '$date
00:00:00' and client='smith'

$date is the current date in CCYY-MM-DD fashion and the query runs.  However
it seems fairly slow.  I have now added some 100,000+ records from a merge I
performed and now it takes a really long time.  Is there a better way to
query this that will take a load off the machine?  The only key in the table
is the idnumber.  I don't really know anything about how keys help or when
to/not to use them other than their being a necessity for an auto_increment
field.

TIA

Larry



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



RE: struggling newbie - datetime or timestamp problem

2004-01-05 Thread Larry Brown
Use your code to do this with.  Create the table as listed, then on your app
have your insert code reflect...

$query = insert into all_articles values (null,now(),now(),'$text');

and update the table as listed ...

$updateQuery = update all_articles set updateddate=now(),article='$text'
where id=$id;

just adjust your app's syntax as needed.  But this should get your result.

Larry


-Original Message-
From: Matthew Stuart [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 7:49 AM
To: MySQL email support
Subject: struggling newbie - datetime or timestamp problem


I have been sent a url for datetime explanations in the MySQL manual. I
have learnt a few things, but I am also more confused than ever.

I am trying to create a couple of columns (one createddate and one
updateddate) in a MySQL table that are DATETIME or TIMESTAMP values,
but I am having trouble understanding how it works. I want both columns
to auto add a date and time when a record is first inserted, but only
the updateddate column to update when the record is updated.

Could someone give me the code for these two columns please? This is
what I have:

CREATE TABLE all_articles (
id SMALLINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
createddate DATETIME DEFAULT -00-00 00:00:00
updateddate DATETIME DEFAULT -00-00 00:00:00
article TEXT
);

Obviously these aren't going to auto add/update because I am not
stating a NOW() or NULL value anywhere, but I thought this would be the
cleanest way to give it to you. The way the zeros, hyphens and colons
are typed is how I would like to store my dates if at all possible.

TIA

Mat


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





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



RE: insert: auto increment field

2004-01-04 Thread Larry Brown
I like naming the fields...

insert into product (
NumUsers,DataConnect,Type,NumRouters,NumSwitches,AvgServiceCallsWk ) values
( '456789','t1','new',2,2,10 )

I use php on a large web app that from time to time I have to add a field to
a table.  If I use the above syntax instead of w/o field names, by adding a
field to the db it breaks my insert pages.  So if I have 15 pages that
insert into that table I have to go to each one and change the code.  By
referencing the names as above, when you add a new field to the table, you
get no errors.  Of course this is only helpfull when the new field isn't
something that those 15 php pages needs to add, but that happens all the
time and saves me a bit of work.

Hope that helps..

Larry

-Original Message-
From: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 10:09 AM
To: [EMAIL PROTECTED]
Subject: insert: auto increment field


I have table with 7 fields. First field is id (auto increment). As I
understand the value should start from 0 and  next value will auto
increment.

And I shouldn't add insert the value. So the insert
statemens below gives me an error. ERROR 1136:Column count doesn't match
value count at row 1

insert into product values('456789','t1', 'new', 2, 2, 10);

_
Have fun customizing MSN Messenger — learn how here!
http://www.msnmessenger-download.com/tracking/reach_customize


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





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



RE: Help:)

2004-01-04 Thread Larry Brown
try...

update user set password=PASSWORD('xx') where user='root' and
host='localhost';

(replacing the x's with the password)

Larry

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 11:32 AM
To: [EMAIL PROTECTED]
Subject: RE: Help:)


Thank you very much for the prompt reply.
Yes you were correct, it was the fact that the password had not been
entered at all...I did the
mysql -u root -p
when prompted for the password I just hit enter and was able to get in.

Now I have to figure out why its not accepting the password.  I type the
following command as root in mysql:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 3.23.49-log

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

mysql SET PASSWORD FOR 'root'@'localhost' = PASSWORD 'xx'

This is exactly how I typed it in...(just copied and pasted)
When I hit enter with that password...I just get a prompt...no
confirmation the password was accepted or anything.
Did I type in the command for the pass wrong?
Don

-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 2:40 AM
To: robert_rowe
Cc: [EMAIL PROTECTED]; Don Matlock
Subject: Re: Help:)


robert_rowe wrote:
 Issuing this command:


mysqlSET PASSWORD FOR 'root'@'localhost' = PASSWORD xx

 set your password to xx

I'm not so sure.  PASSWORD is a function which expects a string.  The
correct syntax is

   SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password')

so I don't believe this worked unless Don is misquoting what he did.

 You will need to use

 mysql -u root -p xx

This will not work.  You may not put a space between the -p and the
password.  The space indicates that xx is the db to use.  If you

want to provide the password on the command line (not really a good
idea), the syntax is

   mysql -u root -pxx

See, no space between the -p and the password.

 from the local machine to get access with the root user.

 This:

 mysql -u root -p

 is specifying a blank password.

No, it is not.  The -p indicates you want to give a password to
authenticate.  Since you didn't provide the password on the command
line, mysql will prompt you for it.


 I believe that this:

 mysql -u root

 will prompt you for the password without echoing it to the screen.

No.  This will try to authenticate without a password, which will only
work if the specified user (root, in this case) has no password.

Don,

I expect that when you enter `mysql -u root -p`, you get prompted for a
password and then get an error message.  It would help if you would
please post the exact text of the error message.  In the meantime, try
your old password (or no password, `mysql -u root`, if root didn't have
one before), in case the SET PASSWORD failed.

Alternatively, take a look at How to Reset a Forgotten Root Password
http://www.mysql.com/doc/en/Resetting_permissions.html in the manual
for the directions on how to use --skip-grant-tables to recover your
root mysql password.

Michael




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





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



RE: connecion error

2004-01-04 Thread Larry Brown
what command are you using to connect to the server?

-Original Message-
From: Cres Justado [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 3:43 PM
To: [EMAIL PROTECTED]
Subject: connecion error


Hi!


I am new in using mysql database server. I have installed MySQL Database
server on redhat advance server. But when I try to access the database
server using a the mysql client software for windows it gives an error Host
my IP Address is not allowed to connect to this MySQL Server.. How will I
solve this problem?




Thanks,

Cres

_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


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





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



RE: MYsql wont start

2004-01-04 Thread Larry Brown
The error is just telling you the server isn't there.  Is this RH?
If it is run..

#service mysqld restart

and see what messages you get if any and also check /var/log/mysqld.log and
see what messages it is giving.  If it shows it started correctly, connect
from the command line before doing anything with phpBB and make sure you can
get around.  Otherwise you won't be able to tell if the problem is from
phpBB or from mysqld.

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:01 PM
To: [EMAIL PROTECTED]
Subject: MYsql wont start


Hi all,
I was able to get mysql up and running and installed phpBB to boot.
Upons reboot I noticed that the mysql daemon was timing out...when I log
into it this is the error I get:

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

(p.s. x's are me hiding my ip address)

Any thoughts?

Don



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





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



RE: insert: auto increment field

2004-01-04 Thread Larry Brown
Is this a test db?  If so go ahead and drop your records so there are none
in there and start entering them and checking their id as you do.  After
dropping all records it should start back at 1 and increment forward.  I
don't know how the index went up to max for that field.  Perhaps something
during previous tests.  If you can't drop the current records document that
in your reply and maybe someone else can give another suggestion.

-Original Message-
From: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 6:53 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: insert: auto increment field


I use both metods and they works  But when I make another insert I receive a
message
ERROR: 1062 Duplicate entry '2147483647' for key 1.

Why id (primaty , and auto_increment) start from 2147483647 and not from 0
or 1

Thanks


From: Donald Henson [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Subject: Re: insert: auto increment field
Date: Sun, 04 Jan 2004 08:44:56 -0700

On Sun, 2004-01-04 at 08:09, Mike Mapsnac wrote:
  I have table with 7 fields. First field is id (auto increment). As I
  understand the value should start from 0 and  next value will auto
  increment.
 
  And I shouldn't add insert the value. So the insert
  statemens below gives me an error. ERROR 1136:Column count doesn't match
  value count at row 1
 
  insert into product values('456789','t1', 'new', 2, 2, 10);

Try using NULL for the id field, thusly:

insert into product values (NULL,'456789','t1','new',2,2,10);

I didn't actually try this but it should work.

Don Henson



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


_
Get reliable dial-up Internet access now with our limited-time introductory
offer.  http://join.msn.com/?page=dept/dialup


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





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



RE: MYsql wont start

2004-01-04 Thread Larry Brown
If you are using a myisam type which is default that log message isn't a
problem.  By switching to run level 5 does it work again?  I switch between
run levels on a regular basis so it shouldn't be the runlevel itself.  Did
you add or remove any files from the rc3.d folder manually?

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:24 PM
To: 'Larry Brown'; [EMAIL PROTECTED]
Subject: RE: MYsql wont start


Hi,
Thanx for the prompt reply.
What I did is I told X not to start on boot, so I went into
/etc/inittab and told it to run at run level 3...thats when mysql
stopped all together.  When I put it back to 5, mysql was running again,
but in the boot up sequence it says it timed out while starting...heres
the output from the command you mentioned:

[EMAIL PROTECTED] root]# service mysqld restart
Stopping MySQL:[  OK  ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:[FAILED]
[EMAIL PROTECTED] root]#


Heres a quote from the log:


040104 16:11:05  mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
/usr/libexec/mysqld: ready for connections
040104 16:12:06  /usr/libexec/mysqld: Normal shutdown

040104 16:12:06  /usr/libexec/mysqld: Shutdown Complete

040104 16:12:06  mysqld ended

040104 16:16:04  mysqld started


I have done just what the log says and it still fails.

Don


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 6:06 PM
To: Don Matlock; MySQL List
Subject: RE: MYsql wont start



The error is just telling you the server isn't there.  Is this RH?
If it is run..

#service mysqld restart

and see what messages you get if any and also check /var/log/mysqld.log
and
see what messages it is giving.  If it shows it started correctly,
connect
from the command line before doing anything with phpBB and make sure you
can
get around.  Otherwise you won't be able to tell if the problem is from
phpBB or from mysqld.

-Original Message-
From: Don Matlock [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:01 PM
To: [EMAIL PROTECTED]
Subject: MYsql wont start


Hi all,
I was able to get mysql up and running and installed phpBB to boot.
Upons reboot I noticed that the mysql daemon was timing out...when I log
into it this is the error I get:

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

(p.s. x's are me hiding my ip address)

Any thoughts?

Don



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










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



RE: Remote access FROM a secure server

2004-01-01 Thread Larry Brown
Have you tried to telnet to port 3306 on the server from your local machine
to the foreign server?  It should give you some feedback as to why your
connection is refused.  If it times out, the server probably had 3306
blocked.  I've not used remote servers other than inside a secure facility
so I haven't messed with SSL for mysql, so for instance it may use a
different port number etc.

Just my 2 cents worth...

Larry

-Original Message-
From: Amer Neely [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 01, 2004 2:07 PM
To: MySQL
Subject: Remote access FROM a secure server


I have a Perl script running on a secure server (https) and am trying to
access the mysql server on a different (unsecure) server. My ISP
administrator has done the following:

GRANT ALL ON database_name.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password'

Then he restarted the server. But I'm still not getting access. Is the
'FLUSH PRIVILEGES' still necessary, or is the restart sufficient? I can
access the db from a local phpMyAdmin and am using the same parameters
in my script, so I know it is accessible. We're both stumped.

Anyone shed some light on this please?
--
sigAll outgoing email scanned by AVG Antivirus
Amer Neely, Softouch Information Services | Home of Spam Catcher 
Research Central.
W: www.softouch.on.ca
E: [EMAIL PROTECTED]
Perl | PHP | MySQL | CGI programming for all data entry forms.
We make web sites work!/sig


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





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



union?

2003-12-23 Thread Larry Brown
I'm trying to figure out how to combine these two tables.  I have..

t1
date accidentInfo cost


t2
date upgradeInfo whereUpgraded Salesman cost


I want to combine the two in a way to reference each piece of data such as
t1.accidentInfo,t2upgradeInfo and so on, but I need the resultset to be
ordered by the combined dates.

If I do order by t1,t2 I get the t1 in order by date then the t2 so I don't
see how to combine them.

I understand that a union would put the dates under the same column but it
looks like it also puts accidentInfo and upgradeInfo under the same column
too.

Can someone help me see the light here?

Larry



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



union?

2003-12-23 Thread Larry Brown
I'm trying to figure out how to combine these two tables.  I have..

t1
date accidentInfo cost


t2
date upgradeInfo whereUpgraded Salesman cost


I want to combine the two in a way to reference each piece of data such as
t1.accidentInfo,t2upgradeInfo and so on, but I need the resultset to be
ordered by the combined dates.

If I do order by t1,t2 I get the t1 in order by date then the t2 so I don't
see how to combine them.

I understand that a union would put the dates under the same column but it
looks like it also puts accidentInfo and upgradeInfo under the same column
too.

Can someone help me see the light here?

Larry



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



RE: load data in file

2003-12-20 Thread Larry Brown
If the servers are on the same local subnet, why not just map a network
drive so both servers have access to the file locally.

-Original Message-
From: Hans Kind [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 8:22 AM
To: [EMAIL PROTECTED]
Subject: load data in file


Hi,

We have a 2 server setup. 1 server runs the web server with a PHP
application, the second server is the mysql database server.

The php application needs to connect to the mysql server, to import data
from a text file. For this we use Load Data Infile.

While everything else in the application works with regard to connecting to
tge mysql database, when we try to import data we are getting the following
error:

Can't get stat of '/upload/wachtbak_cu.txt' (Errcode: 2)

We have checked, and the file is indeed uploaded to the /upload directory
on the web server. However, after the connection is established with mysql
database, mysql tries to find the file on the mysql server.

Question is this. Is it possible to import a file into mysql, using Load
Data Infile, when you have 1 web server that runs the php apllication that
imports the data, and 1 mysql database server?

If that's not possible, is there a way to achieve this?

rgds

Hans Kind



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





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



mysql load_file retreival

2003-12-20 Thread Larry Brown
I have set up a script to recieve a pdf file and store it in a mysql db
using update db set field=load_file('fileIncludingFile') where id=$id.
Afterwards I can see the file has been uploaded into the blob field
successfully and without errors.  Now I want to get the file back out.  I
set up a script with select field from db where id=$id and used
mysql_query followed by mysql_fetch_row and did echo header(Content-type:
application/pdf); and then echo result[0]; where result was the row
fetched.  I get the prompt to open with pdf but pdf fails.  I have
magicquotes on but I understand that the load_file() function within mysql
does the escaping etc.  How can I un-escape the data?  The only thing I
saw on the mysql manual is on how to use load_file_infile/load_file_outfile
which does not apply to this.  Can someone lend a hand here?



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



if function?

2003-12-08 Thread Larry Brown
Is there a way to write an if statement in mysql to affect the following?...

if field a=0,b=0,c=0 then update d='complete' 

where the table consists of...

a int(1),
b int(1),
c int(1),
d char(8)


|a  |b  |c  |d |

|1  |0  |0  |null  |
|1  |1  |0  |null  |
|0  |0  |0  |null  |


resulting with the third recode updated to show 'complete'?

TIA

Larry


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



unexpected results from query between tables

2003-10-27 Thread Larry Brown
I apparently am misunderstanding how the select works by referencing data in
two different tables.  I have used a similar statement to the one that
follows with success, but there must be something different here that
reveals a lack of fundamental understanding as to how it works.  If someone
could help, please check the following...

I have two tables.  One table has entries
controlnum,referencenum,fname,lname,inputtime,outputtime the second table
has controlnum,referencenum.

In table one referencenum can have and does have duplicates.  The second
table is populated with a subset of data from the first table but
referencenum is unique. For instance...

1234677 'bob'   'smith' '10:00:00'  '11:00:00'  1234677
1235677 'mike'  'williams'  '10:00:00'  '11:00:00'  12365554447
12365554447 'debra' 'stone' '10:30:00'  '11:30:00'  1237446
1237446 'ken'   'marwood'   '11:00:00'  '12:00:00'  12385585888
12385585888 'bill'  'shireton'  '11:15:00'  '11:15:00'
12395585888 'laura' 'acree' '11:15:00'  '12:15:00'
12405585888 'dora'  'lindsey'   '11:15:00'  '12:15:00'

ok, now I want to run a query that results in all of the controlnum's in
table one that are not in table two.  The query I ran was select
f.controlnum,f.referencenum,f.fname,f.lname from first f,second s where
f.controlnum != s.controlnum and f.inputtime  '07:00:00'

the results I get back are such as...

1234677 'bob'   'smith'
1234677 'bob'   'smith'
1235677 'mike'  'williams'
1235677 'mike'  'williams'
1235677 'mike'  'williams'
1235677 'mike'  'williams'
12365554447 'debra' 'stone'
 and so on...

I apparently, ignorantly, thought I would get only those records to which
the controlnum was not in both tables and which had an inputtime that is
greater than 7 which would not filter any more out in this example.  Also,
this is for explination purposes.  The actual tables are much larger, the
only fields that actually exist on the first table to the actual table are
control,ref,lname,fname and the second table has quite a few other fields
that do not exist in the first table.  I just simplified things to find out
where my understanding fails for the logic behind the query.

Thanks for any help.


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




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



RE: unexpected results from query between tables

2003-10-27 Thread Larry Brown
Thank you all.  The world makes sense again. :)

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

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 10:54 AM
To:
[EMAIL PROTECTED]
Cc: MySQL List
Subject: Re: unexpected results from query between tables


The simple JOIN (which is what you have requested with the A, B syntax)
builds a conceptual table in which every row in A is paired with every row
in B, then passes the result on to the WHERE filter. Of course, it doesn't
actually do that, because it would take an enormous time, but it mimics
that behaviour.  Therefore, in the simple join there will be a massive
number of rows, but none where the second is null. To get an entry where
the second is null is the province of the LEFT JOIN, which forces an entry
for every row in the first (left) table even if there is no entry in the
second (right) table. You can then use the null-ness of the second table in
the WHERE field.

Try something on the lines of

SELECT f.controlnum, f.referencenum, f.fname, f.lname
FROM first f LEFT JOIN ON f.controlnum = s.controlnum
WHERE s.controlnum IS NULL AND f.inputtime  '07:00:00'




|-+---
| |   Larry Brown   |
| |   [EMAIL PROTECTED]|
| |   tworks.com |
| |   |
| |   27/10/2003 15:24|
| |   |
|-+---

---
---|
  |
|
  |   To:   MySQL List [EMAIL PROTECTED]
|
  |   cc:
|
  |   Subject:  unexpected results from query between tables
|

---
---|




I apparently am misunderstanding how the select works by referencing data
in
two different tables.  I have used a similar statement to the one that
follows with success, but there must be something different here that
reveals a lack of fundamental understanding as to how it works.  If someone
could help, please check the following...

I have two tables.  One table has entries
controlnum,referencenum,fname,lname,inputtime,outputtime the second table
has controlnum,referencenum.

In table one referencenum can have and does have duplicates.  The second
table is populated with a subset of data from the first table but
referencenum is unique. For instance...

1234 677   'bob' 'smith'
'10:00:00' '11:00:00'1234677
1235 677   'mike''williams'
'10:00:00' '11:00:00'12365554447
1236 5554447   'debra'   'stone'
'10:30:00' '11:30:00'1237446
1237 446   'ken' 'marwood'
'11:00:00' '12:00:00'12385585888
1238 5585888   'bill''shireton'
'11:15:00' '11:15:00'
1239 5585888   'laura'   'acree'
'11:15:00' '12:15:00'
1240 5585888   'dora''lindsey'
'11:15:00' '12:15:00'

ok, now I want to run a query that results in all of the controlnum's in
table one that are not in table two.  The query I ran was select
f.controlnum,f.referencenum,f.fname,f.lname from first f,second s where
f.controlnum != s.controlnum and f.inputtime  '07:00:00'

the results I get back are such as...

1234 677   'bob' 'smith'
1234 677   'bob' 'smith'
1235 677   'mike''williams'
1235 677   'mike''williams'
1235 677   'mike''williams'
1235 677   'mike''williams'
1236 5554447   'debra'   'stone'
 and so on...

I apparently, ignorantly, thought I would get only those records to which
the controlnum was not in both tables and which had an inputtime that is
greater than 7 which would not filter any more out in this example.  Also,
this is for explination purposes.  The actual tables are much larger, the
only fields that actually exist on the first table to the actual table are
control,ref,lname,fname and the second table has quite a few other fields
that do not exist in the first table.  I just simplified things to find out
where my understanding fails for the logic behind the query.

Thanks for any help.


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




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







--
MySQL General Mailing List
For list archives: http

illusive query

2003-10-27 Thread Larry Brown
Earlier I was given help understanding the need for using a left join.  This
was a precursory query to arrive at my final solution which I had not
touched on since I believed that by getting the join correct I could get the
result.  It seems to be evading me though.  Still using the following
example table..

I have two tables.  One table has entries
controlnum,referencenum,fname,lname,inputtime,outputtime the second table
has controlnum,referencenum.

In table one referencenum can have and does have duplicates.  The second
table is populated with a subset of data from the first table but
referencenum is unique. For instance...

1234677 'bob'   'smith' '10:00:00'  '11:00:00'  1234
677
1235677 'mike'  'williams'  '10:00:00'  '11:00:00'  1236
5554447
12365554447 'debra' 'stone' '10:30:00'  '11:30:00'  1238
5585888
1237446 'ken'   'marwood'   '11:00:00'  '12:00:00'
12385585888 'bill'  'shireton'  '11:15:00'  '11:15:00'
12395585888 'laura' 'acree' '11:15:00'  '12:15:00'
12405585888 'dora'  'lindsey'   '11:15:00'  '12:15:00'

ok, now I want to run a query that results in all of the controlnum's whose
reference numbers do not match the reference numbers that are linked with
the controlnum's from table two together with all of the records in table
two.  I can't follow that description and I wrote it!  Maybe an example...
This is the result I want...

1234677 'bob'   'smith'
12365554447 'debra' 'stone'
1237446 'ken'   'marwood'
12385585888 'bill'  'shireton'

So the result set does not include a record such as 1235 because it's
reference number matches a reference number from a record from the same
table referenced by table two.  It includes all other records.



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



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



php temp table question

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will
allow a temp table created by a script to linger around and cause a problem
with the next execution of the script when it tries to create the temp table
again?  Also if it does present a problem with the next script execution
trying to create the temp table again, if I drop the temp table at the end
of the script will I still have problems if the script is run by two client
in tandem?  For instance two people connect, both hit the script at about
the same time.  One script creates the temp table and before it can drop the
table the second script tries to create the table.  Will it see the table
created by the other script?  Again the use of persistent connections would
be a the heart of this I would think.



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



php temp table question (for mysql)

2003-10-27 Thread Larry Brown
Does anyone know whether the use of persistent connections with php will
allow a temp table created by a script to linger around and cause a problem
with the next execution of the script when it tries to create the temp table
again?  Also if it does present a problem with the next script execution
trying to create the temp table again, if I drop the temp table at the end
of the script will I still have problems if the script is run by two client
in tandem?  For instance two people connect, both hit the script at about
the same time.  One script creates the temp table and before it can drop the
table the second script tries to create the table.  Will it see the table
created by the other script?  Again the use of persistent connections would
be a the heart of this I would think.



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



RE: php temp table question

2003-10-27 Thread Larry Brown
Thanks, I got the answer from a php developer.  In case anyone is wondering,
according to him the table is dropped at the end of the script execution
regardless of whether you use persistent connections or not.

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 4:04 PM
To: MySQL List
Subject: php temp table question


Does anyone know whether the use of persistent connections with php will
allow a temp table created by a script to linger around and cause a problem
with the next execution of the script when it tries to create the temp table
again?  Also if it does present a problem with the next script execution
trying to create the temp table again, if I drop the temp table at the end
of the script will I still have problems if the script is run by two client
in tandem?  For instance two people connect, both hit the script at about
the same time.  One script creates the temp table and before it can drop the
table the second script tries to create the table.  Will it see the table
created by the other script?  Again the use of persistent connections would
be a the heart of this I would think.



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





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



RE: I can't figure out what I thought would be a simple query..

2003-10-27 Thread Larry Brown
I'm interested to see what kind of solution is offered for this as I could
use it myself.  I'm having to do this programatically on an expternal script
that selects distinct non_unique_id and the takes the result and loops
through each one with sort by endtime desc limit 1 and then either do
something with the result during the loop or simply create a seperate temp
table to store them in.  Not the most efficient if there is a way to get it
as a query though.

-Original Message-
From: Jim Matzdorff [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: I can't figure out what I thought would be a simple query..


All;

I am having tremendous trouble attempting to do the following query; and any
help would be appreciated.

I am using Mysql 4.0.15a; and I cannot upgrade.

Given the following TEMPORARY table (it's a table I have created from a
whole
host of sources):

table: endtime_table
+-+-+---+
| endtime | need_id | non_unique_id |
+-+-+---+
| 2003-08-17 00:46:59 |   18724 |  6646 |
| 2003-08-17 00:46:59 |   18724 |  6647 |
| 2003-08-17 00:46:59 |   18724 |  6648 |
| 2003-08-17 00:46:59 |   18724 |  6649 |
| 2003-08-17 00:46:59 |   18724 |  6650 |
| 2003-08-17 00:46:59 |   18724 |  6651 |
| 2003-08-17 00:46:59 |   18724 |  6652 |
| 2003-08-17 00:46:59 |   18724 |  6653 |
| 2003-08-18 00:20:10 |   19143 |  6646 |
| 2003-08-18 00:20:10 |   19143 |  6647 |
| 2003-08-18 00:20:10 |   19143 |  6648 |
| 2003-08-18 00:20:10 |   19143 |  6649 |
| 2003-08-18 00:20:10 |   19143 |  6650 |
| 2003-08-18 00:20:10 |   19143 |  6651 |
| 2003-08-22 00:02:10 |   17512 |  6646 |
| 2003-08-18 00:20:10 |   19143 |  6652 |
| 2003-08-18 00:20:10 |   19143 |  6653 |
| 2003-08-23 00:11:10 |   14443 |  6650 |


I would like, for each UNIQUE non_unique_id; to get the latest endtime
for that unique ID.  for instance; the result set I am looking for above
would be:

| 2003-08-22 00:02:10 |   17512 |  6646 |
| 2003-08-18 00:20:10 |   19143 |  6647 |
| 2003-08-18 00:20:10 |   19143 |  6648 |
| 2003-08-18 00:20:10 |   19143 |  6649 |
| 2003-08-23 00:11:10 |   14443 |  6650 |
| 2003-08-18 00:20:10 |   19143 |  6651 |
| 2003-08-18 00:20:10 |   19143 |  6652 |
| 2003-08-18 00:20:10 |   19143 |  6653 |

as you can see, there are 3 records for 6646 non_unique_id column; but the
latest one is the date 2003-08-22 00:02:10 which has the need_id of
17512.  and so forth.

For the life of me, i can't figure out how to do this.  i've tried various
max(), group_by's, and such, but nothing has worked so far.  either it can't
be done (doubtful) or my brain can't figure it out (probable).  short of
doing something rediculous like invividual selects for each unique
non_unique_id; is there a way i am missing?

I hope?

Thanks,
--jim

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





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



query challanged newbie

2003-07-22 Thread Larry Brown
I am having some weird problem figuring this seemingly simple query out.
Here are the two tables from which I have to run the query

Table alpha:

id int(3) not null auto_increment,
name char(12) not null,
primary key(id)

example data

1 fred
2 bob
3 sam
4 rita
5 george
6 laura
7 nancy

Table bravo:

afrom int(3) not null,
ato int(3) not null,
Primary key(afrom)

Example data

1 5
5 7
6 3



in the php variable coming in I have fred and need to run a query to get
george.  Right now since I'm having so mental problem, I have resorted to
running 3 queries. 1 to find the id for fred, one to find the matching id
from the bravo table and one to get the name that matches the bravo table
result.


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




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



mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
How do you determine whether or not it is faster/more efficient to run a
complicated query or to run multiple simple queries and join / manipulate
the results with PHP?

sql

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: My new forum

2003-01-09 Thread Larry Brown
I appreciate that the guy wants to build traffic on his list, but I have to
say that I enjoy having this list as busy as it is.  People are pretty much
always there to chime in.  I'm on a javascript list that I get maybe 4
e-mails a day.  Asking a question there result in a nice long wait.  Here's
where it is at and I'd hate to see a portion of this list move.

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

-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:27 PM
To: Lennart Stevens
Cc: [EMAIL PROTECTED]
Subject: Re: My new forum

On Wed, Jan 08, 2003 at 01:31:44PM -0800, Lennart Stevens wrote:


 I created a new forum for all of you who do not like to dig throught tons
of
 a-mail to find one that really matters.You can talk about Linux, mysql and
 pretty much whatever else is computer realted. Check it out here
 http://www.linuxforum.hopto.org

Did you already announce this several days ago?
--
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 24 days, processed 837,801,371 queries (389/sec. avg)

-
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: converting text to hypertext

2003-01-08 Thread Larry Brown
Try...

while ($row = mysql_fetch_row($resultID))

{
print tr;
foreach ($row as $field)
{
print td align=centera href=$field$field/a/td;
}
print /tr;
}
print /table;
mysql_close ($linkID);

I don't use print so I'm not sure about that, I use echo.

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

-Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 1:58 PM
To: Larry Brown
Cc: [EMAIL PROTECTED]
Subject: RE: converting text to hypertext

Larry,

This is the code I'm using.  I'm pretty new to PHP, so there may be a simple
solution within PHP of which I'm unaware.  I just thought it could be done
from the MySQL side of things.


$resultID = mysql_query(SELECT * FROM ports, $linkID);

print tabletrthPort #/th;
print thTransport/thth align=centerApplication/thth
align=centerRFC/Vendor's URL/MS KB article/th;

while ($row = mysql_fetch_row($resultID))

{
print tr;
foreach ($row as $field)
{
print td align=center$field/td;
}
print /tr;
}
print /table;
mysql_close ($linkID);



Thanks,

rick


-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:13 AM
To: Rick Tucker
Subject: RE: converting text to hypertext


The question seems to me how are you outputting to html?

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

-Original Message-
From: Rick Tucker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 11:34 AM
To: [EMAIL PROTECTED]
Subject: converting text to hypertext

I just imported a .csv file and one of the columns of data was websites
addresses.  Those addresses aren't being recognized as links when I output
an html table from my queries.  I'm scratching me head on how to make the
conversion.  I figured there would by a hypertext datatype of some sort, but
I can't find any information regarding this issue. If someone could point me
in the right direction, I would appreciate it.

Thanks,

rick


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

2003-01-07 Thread Larry Brown
Since nobody is jumping in to say it is some simple configuration/setting
personally my next step would be to shut down all services on the box that
aren't absolutely necessary and stop everything in the registry under run
and stop anything in the start folder of the start menu and run the same
tests.  If no positive results I would uninstall php completely and clean
any reference in the registry of it and then install with everything still
shut down.  Retest, if no progress do the same with mysql.  These are
radical and time-consuming methods, but it seems as though it is broken.  If
you absolutely need this fixed fast you might resort to paying the
developers to give you a solution, although it may end up being what I just
listed, or it could be some simple fix that we aren't aware of.

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

-Original Message-
From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 4:31 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Re: PHP and MySQL bug

I have the latest version of PHP (4.3.0) as module in apache 2.0.43 and
mysql 3.23.49.
Everything is working fine, except this.
With pconnect the error is the same!


- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 6:28 PM
Subject: RE: [PHP] Re: PHP and MySQL bug


 This definitely sounds like a buggy installation or there may be some
 problem with the communication between the web server and the mysqld.  Is
 the db on a different machine?  Try using mysql_pconnect instead of
connect
 just to see what result you get.  I have read some unfavorable statements
 about using pconnect with a large number of hits so if it works you should
 read the comments about it on php.net.  Do a search for mysql_pconnect.

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

 -Original Message-
 From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 06, 2003 1:09 PM
 To: MySQL List; [EMAIL PROTECTED]
 Subject: [PHP] Re: PHP and MySQL bug

 The problem is if I close the connection and reopen it the query is done,
 but if I remain with the same connection has the previous query, mysql
 returns an error.


 - Original Message -
 From: Larry Brown [EMAIL PROTECTED]
 To: MySQL List [EMAIL PROTECTED]
 Sent: Sunday, January 05, 2003 4:16 PM
 Subject: Re:PHP and MySQL bug


  Try replacing the following line...
 
  @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query
doesn't
  work
 
  With...
 
  $query = UPDATE d SET h='$h' WERE id='$id';
  $queryr = mysql_query($query) or die(The sql statement does not
 execute);
 
  if(mysql_affected_rows() !== 1)
  {
 die(The sql statement is successfully run however either h did not
  change or there is an internal error.  Try executing the sql from the
  command line to make sure it otherwise works.);
  }
 
  and see which is coming back.
 
 
  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



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

2003-01-07 Thread Larry Brown
* Try add to /etc/hosts the name and ip of DB is located

 I'm using Windows 2000.

In Windows2000 make the same changes in winnt/system32/drivers/etc/hosts.
If it connects the first time and every time thereafter that you recreate
the connection it should not be anything to do with resolving the name of
the computer with the db.  If the db is on a system other than the one with
the web server than you should check the network/network cards for errors.
The connection may be dropping because of communication.  If it is on the
same box then some other memory resident program etc may be causing the
connection to drop.  Refer to my previous post in re. to stopping services
etc.

* MySQL
*
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: What MySQL is

2003-01-07 Thread Larry Brown
How about?


MySQL is an Open Source data storage program that runs quietly in the
background of your computer (a Database).  It stores data for your
programs and allows you to interface with that data using SQL commands (see
reference manual).  It is also quit scallable to run as simple a program as
a personal address book and as large as a corporate filing system.   MySQL
has a command-line interface program (CLI) called 'mysql' [ed. Note: source
of confusion?] that allows commands to be typed in directly and executed
immediately.  If you are only familiar with visual database tools like
Access, Paradox, etc. then you might find a graphical tool to fit your
tastes (see downloads / links page) that come in both Open Source and
proprietary and can run on a multitude of operating systems.


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

-Original Message-
From: JamesD [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 12:20 PM
To: Michael T. Babcock; [EMAIL PROTECTED]
Subject: RE: What MySQL is

take out the last two sentences.
scares people away.

suggest last sentence:

MySql's CLI tools give you full access and control
to all the the power of MySQL. If you prefer a visual tool
to manage your data in MySQL, like Access  Paradox tools see the
downloads/links
page, as you learn MySQL's capabilities.

suggest first sentence

MySQL is a data storage program that runs quietly in the
background of your computer (a Database). It stores

Jim

-Original Message-
From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 7:48 AM
To: [EMAIL PROTECTED]
Subject: What MySQL is


Suggestion page: What MySQL is; layman style (unless one exists I
haven't seen).

Something like:
MySQL is a back-end database program.  It stores data for your programs
and allows you to interface with that data using SQL commands (see
reference manual).  MySQL has a command-line interface program (CLI)
called 'mysql' [ed. note: source of confusion?] that allows commands to
be typed in directly and executed immediately.  If you are only familiar
with visual database tools like Access, Paradox, etc. then you may find
MySQL daunting.  Consider downloading a visual front end program (see
downloads / links page) as you learn SQL.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



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

2003-01-06 Thread Larry Brown
Which client are you using?  The MySQL client that comes with the server is
not GUI based so there are no menus.

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

-Original Message-
From: Aleksandar Mitrakovic [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 5:53 AM
To: '[EMAIL PROTECTED]'
Subject: question

I em working In  application MySql Client
When I click on menu Commands on submenu Tables command Edit Table or Create
Table nothing happened.
Tell me what to do.

Thank you

-
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-06 Thread Larry Brown
This is your problem.  Change hosting companies.  There should be multiple
accounts.  At least one for each site and nobody from any other site should
be able to log in and view your files.  It's called chroot and is the most
common method of separating customers of a hosting company.  If your
description is correct and there is only one account that all of the
customers use you will have no security what so ever.

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

-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 1:34 AM
To: Larry Brown; MySQL List
Subject: Re: Hiding the password

No, we are not talking about the staff of the hosting company.

The hosting company runs a single Apache server on a single account on that
server for all sites that are sitting on that computer.
If the user that runs the web server has access to your files, this means
that everyone has access.


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

- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Saturday, January 04, 2003 9:50 PM
Subject: RE: Hiding the password


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

RE: [PHP] Re: PHP and MySQL bug

2003-01-06 Thread Larry Brown
This definitely sounds like a buggy installation or there may be some
problem with the communication between the web server and the mysqld.  Is
the db on a different machine?  Try using mysql_pconnect instead of connect
just to see what result you get.  I have read some unfavorable statements
about using pconnect with a large number of hits so if it works you should
read the comments about it on php.net.  Do a search for mysql_pconnect.

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

-Original Message-
From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 1:09 PM
To: MySQL List; [EMAIL PROTECTED]
Subject: [PHP] Re: PHP and MySQL bug

The problem is if I close the connection and reopen it the query is done,
but if I remain with the same connection has the previous query, mysql
returns an error.


- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 4:16 PM
Subject: Re:PHP and MySQL bug


 Try replacing the following line...

 @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't
 work

 With...

 $query = UPDATE d SET h='$h' WERE id='$id';
 $queryr = mysql_query($query) or die(The sql statement does not
execute);

 if(mysql_affected_rows() !== 1)
 {
die(The sql statement is successfully run however either h did not
 change or there is an internal error.  Try executing the sql from the
 command line to make sure it otherwise works.);
 }

 and see which is coming back.


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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.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-06 Thread Larry Brown
Check out the explination of chroot from the following url..

http://www.tcu-inc.com/Articles/23/chroot.html

This is an article about doing more than an apache solution but it explains
chroot.  This is the best model I know of.  I read that it is being used
less often than in the past so there may be some other methods that are more
prevalent now but this is one definite working solution.

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

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 4:48 PM
To: William R. Mussatto; Octavian Rasnita
Cc: Larry Brown; MySQL List
Subject: Re: Hiding the password

- Original Message -
From: William R. Mussatto [EMAIL PROTECTED]
To: Octavian Rasnita [EMAIL PROTECTED]
Cc: Larry Brown [EMAIL PROTECTED]; MySQL List
[EMAIL PROTECTED]
Sent: Monday, January 06, 2003 7:07 PM
Subject: Re: Hiding the password


 Its possible to configure a single virtual host to run as a
 different user and group.

Oh?? This is entirely new to me. :) Please, enlighten me.

- 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-06 Thread Larry Brown
One other thing about that is that on the section it describes apache it is
chrooting the web server separate from other processes on the server.  You
can chroot the sites handled by apache as well, I just don't have a good
example link to offer you.

MySQL

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

2003-01-06 Thread Larry Brown
It's not as easy as that unless there is something I'm unfamiliar with.
There are scripts that will help chroot but it isn't just making an entry in
httpd.conf.  It does keep everyone totally separate though.  As a shell user
your / is actually some subfolder on the server.  Your folders under / are
yours and only yours.  The sys admin can give or take away ls from your bin
and so on.

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

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 5:39 PM
To: Larry Brown; MySQL List
Subject: Re: Hiding the password

I think we must be at cross-purposes. I thought you were talking about
individual VirtualHost/VirtualHost sections. That would have been a
wonderful thing. Feasible too, perhaps. The Apache parent (root), could
prefork its children, one for each VirtualHost/VirtualHost running as
its own user (to which all requests for that vhost are handled).

It would certainly take care of a whole lot of security issues.

- Mark


- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 11:07 PM
Subject: RE: Hiding the password


 Check out the explination of chroot from the following url..

 http://www.tcu-inc.com/Articles/23/chroot.html

 This is an article about doing more than an apache solution but it
 explains chroot. This is the best model I know of. I read that it is being
 used less often than in the past so there may be some other methods
 that are more prevalent now but this is one definite working solution.

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

 -Original Message-
 From: Mark [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 06, 2003 4:48 PM
 To: William R. Mussatto; Octavian Rasnita
 Cc: Larry Brown; MySQL List
 Subject: Re: Hiding the password

 - Original Message -
 From: William R. Mussatto [EMAIL PROTECTED]
 To: Octavian Rasnita [EMAIL PROTECTED]
 Cc: Larry Brown [EMAIL PROTECTED]; MySQL List
 [EMAIL PROTECTED]
 Sent: Monday, January 06, 2003 7:07 PM
 Subject: Re: Hiding the password


  Its possible to configure a single virtual host to run as a
  different user and group.

 Oh?? This is entirely new to me. :) Please, enlighten me.

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

2003-01-05 Thread Larry Brown
Try replacing the following line...

@MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't
work

With...

$query = UPDATE d SET h='$h' WERE id='$id';
$queryr = mysql_query($query) or die(The sql statement does not execute);

if(mysql_affected_rows() !== 1)
{
   die(The sql statement is successfully run however either h did not
change or there is an internal error.  Try executing the sql from the
command line to make sure it otherwise works.);
}

and see which is coming back.


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: 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: 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: 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: 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 your site being privy to this information.
 
  Second, if you are referring to the staff

RE: Starting of MySQL with redhat 8

2002-12-24 Thread Larry Brown
To start the server run the following...

service mysqld start

once it is started you can check to see if it running by using...

ps aux

which will show the processes running and look for mysql

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

-Original Message-
From: Scott Pippin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 24, 2002 1:10 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Starting of MySQL with redhat 8


 I'm a beginner with mysql and i installed it with linux.
 I'm getting this message when i tried to be connected :
 Error 2002 : can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (111).

 Can you help me by finding how to be connected to the database ?

Make sure the files does exist in the directorey listed above.
If it does not, make sure you have socket=directory location in your
config file.
(mysql, 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




lost field changes

2002-12-23 Thread Larry Brown
Is there any explination as to how this could happen.  I had two fields that
somehow showed up as tinyint when they must have started out as char or
varchar.  I changed them to char and tested it by adding data which worked.
I was able to then pull the characters back out of the database
successfully.  Subsequently I had someone complaining that it isn't holding
data again.  I went back in and it was set back to tinyint.  Does anyone
have any idea what could cause this.  I'm the only one with access to change
the database.  The only other access comes from php which I am the only one
who has access to add php pages. sql

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




console freezes when starting mysqld

2002-01-18 Thread Larry Brown

I am running two different servers, one with the tarball distro and the
other with an rpm.  Both are on Redhat 7.1.  Upon executing mysql.server or
safe_mysqld the console executes the command but does not return to a
prompt.  I can change to another console and see the server started ok.  I
can log on etc.  However, it locks the console I execute it on every time.
This causes a problem when booting, as I run these commands from rc.local
and it stops the boot process there.  Using the built in script from the rpm
that gets installed into init.d is not an option in these particular cases
(long story) so I'm hoping to find out what I can do to get the prompt back.

Larry S. Brown
President/CEO
Dimension Networks, Inc.
Member ICCA
(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




console hang.

2002-01-18 Thread Larry Brown

I am running MySQL on Redhat and when I use the script that comes with MySQL
(mysql.server) or safe_mysqld the command runs and starts the server.
However; the prompt does not return.  I have to switch consoles.  (bash)
Does anyone have any idea how I can avoid this?  (the script from the rpm is
not an option in this particular case).


-
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