backup question: INSERT statements

2004-09-28 Thread Neil Zanella

Hello,

I need to backup a mysql database in such a way that the output is
simply a bunch of insert statements. I do not want the database
schema as output as well: just the insert statements. This is
because I already have a script with CREATE statements and
would like to rebuild the database from scratch: since I
need to modify the schema and table structure I prefer
this approach than using ALTER TABLE, given that the
database data size is small and rebuilding from
scratch could add some efficiency.

So how do I get this with myqldump. I just want the
insert statements and the data.

Thanks!!!

Neil


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



UTF8 columns and MySQL

2004-09-28 Thread Neil Zanella

Hello,

I have a table with the following column among others:

text VARCHAR(120) CHARACTER SET utf8

The provider I am using however only offers MySQL version 3.23.58,
so I cannot use this statement. At first I thought I was not going
to be able to store UTF8. So I changed the column to the following:

text VARCHAR(120)

However, when I submit data from a web interface, much to my 
surprise, I was able to store some Chinese characters, which
no doubt take up two bytes in UTF8.

Great!!!

Can anyone explain why this is and what
exactly is going on under the hood?

Just curious,

Thanks,

Neil


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



making all tables MyISAM

2003-07-11 Thread Neil Zanella

Hello,

Is there a way to specify MyISAM for all tables in a given file rather 
than having to specify it at the end of each table declaration. I think
this would make porting databases back and forth to MySQL somewhat easier
since including MyISAM as part of the table declaration is not compatible
with standard SQL syntax, so I would like to keep MySQL-specific stuff 
separate from the rest of the SQL DDL file.

Thanks,

Neil


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



MySQL: standard SQL compliancy: primary keys: default: should be NOT NULL

2003-06-04 Thread Neil Zanella

Hello,

I believe that MySQL is in error in reporting the following message just
because I did not specify that the PRIMARY KEY should not be NULL. These
days there are standards and SQL92, AFAIK, specifies that if the primary
key is not explicitly set to NOT NULL then the RDBMS should automatically
and silently assume the user means NOT NULL. After all, any half decent
book on relational databases out there will tell you that primary keys
cannot be null. So why does MySQL do it this way. By doing this MySQL is
breaking the portability of my standard SQL code which works so well with
postgreSQL and Oracle 9i. So why donesn't MySQL play nice and abide to
the standard? Is this fixed in MySQL 4? I am running MySQL 3.23.54a as
distributed with Red Hat 9, which, for some reason has not decided to
update their mysql RPMS to MySQL 4 for that release but I am interesting
in knowing if this has been fixed in MySQL. I think one of MySQL's goals
should be to support standards such as SQL92 (if not SQL99). Even if
internally some things don't work as expected, at a minimum, the
parsers should be compatible as much as possible, including
standard data types and assuming primary keys are not null
by default.

ERROR 1171: All parts of a PRIMARY KEY must be NOT NULL;  If you need NULL 
in a key, use UNIQUE instead

BTW, for those willing to check it out, Part 1 (as well as other parts) of
the SQL standard are available from http://webstore.ansi.org/ for 18 bucks
as standard INCITS/ISO/IEC 9075-1-1999. The older standard is also 
available as ANSI INCITS 135-1992 (R1998) at the same price.

Regards,

Neil


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



Re: advanced statement

2003-06-03 Thread Neil Zanella

On Mon, 2 Jun 2003, Frank Nørvig wrote:

 Hello,
 
 I was wondering if the following could be done with an advanced
 sql-statement in MySQL 3.23:
 
 I have 5 tables with the following columns: id, name, phonenumber
 I need to check for duplicate phonenumbers in the 5 tables, that is if the
 same phonenumber exists in 3 tables or more.

Advanced? Not at all. It's just simple combinatorial enumeration
of C(5,3) combinations presented as a list of tuples and used as
the selection criterion:

SELECT T1.id, T1.name, T1.phonenumber FROM T1, T2, T3, T4, T5
WHERE
  T1.phonenumber = T2.phonenumber AND T2.phonenumber = T3.phonenumber 
OR
  T1.phonenumber = T2.phonenumber AND T2.phonenumber = T4.phonenumber
OR
  T1.phonenumber = T2.phonenumber AND T2.phonenumber = T5.phonenumber
OR
  T2.phonenumber = T3.phonenumber AND T3.phonenumber = T4.phonenumber
OR
  T2.phonenumber = T4.phonenumber AND T4.phonenumber = T5.phonenumber
OR
  T3.phonenumber = T4.phonenumber AND T4.phonenumber = T5.phonenumber

A same phone number exists in three or more tables if and only if
the result set is nonempty.

Regards,

Neil


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



foreign key and check ICs: implementation suggestion

2002-05-27 Thread Neil Zanella


Hello,

The documentation often mentions that foreign key support in mysql is
not implemented because it slows down the database server. The argument
is that since the applications built on top of mysql have to check for 
database integrity constraints (ICs) it is redundant for the database
to perform these checks as well. However it would be very convenient
to have a setting in /etc/my.cnf for enabling/disabling the checking
of foreign keys with the default being off in the interest of speed.
The reason a user would want this is that if there is a lot of data
in an existing database then the application developer does not want
the application to mess up the data due while the application is not
yet stable. Thus, in such a scenario, foreign keys are helpful. Thus
in addition to a setting in /etc/my.cnf it would be helpful to have
commands such as ENABLE FOREIGN KEYS and DISABLE FOREIGN KEYS
allowing more flexibility on multiuser systems. The same mechanism
could be use to enable/disable CHECK constraints including CHECK
constraints involvins SELECT statements. These could always be
enforced/not enforced with commands such as ENABLE CHECK IC
and DISABLE CHECK IC or something similar, with the default
set to DISABLED in the intrest of speed, but with the syntax
in the table data definition language (DDL) still being parsed
and accepted in both cases, as for foreign keys.

Thank you for mysql,

Neil Zanella
[EMAIL PROTECTED]


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

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




bug in dynamic linker?

2002-05-27 Thread Neil Zanella


Hello,

I have a script with INSERT statements. I run it quite often and
today for the first time I got the following message while inserting
from the mysql client:

BUG IN DYNAMIC LINKER ld.so: rtld.c: 621: dl_main: Assertion 
`_dl_rtld_map.l_libname' failed!

I simply reran the script and it worked fine.
Any ideas of what the problem was here?
Just thought I'd report it. The version
of MySQL is 3.22.32 so that may be a
little bit old.

Thanks,

Neil


-
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




MySQL: most useful vendor specific features

2002-05-23 Thread Neil Zanella


Hello,

What are MySQL's coolest and most useful vendor specific features?
Here is a partial list of features, none of which are part of any
SQL standard but which I nevertheless find quite useful from time
to time. I would like to invite you to add to this list:

1. AUTO_INCREMENT columns
2. LIMIT keyword in for result sets in SELECT statement
3. UPDATE-like SET constructs allowed in INSERT statements
4. multiple VALUES clauses allowed in single INSERT statements

I am surprised these did not make it into the standard,

Comments welcome,

Neil


-
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: trouble with field NULL

2002-05-12 Thread Neil Zanella


I will guess that the NULL field you defined is of a numeric
type such as INT. In standard SQL the empty string '' is not
the same as the special value NULL, and this is also true in
MySQL, but not in Oracle. Probably you are inserting a ''
into the database column but MySQL correctly interprets
it as a string. The default conversion for string to
integers in MySQL is to turn the string into a 0.
This is probably what is happening.

I would suggest writing your own string function in your
application which converts instances of '' into instances
of NULL. And by the way, quoting numeric data in MySQL
as well as in PostgreSQL and Oracle is acceptable but
not required.

Bye,

Neil

On Fri, 10 May 2002, raphael k wrote:

 I created a table with a field define as NULL, however when I insert
 values NULL , Mysql puts 0 instead of nothing ,
 
 I don't understand why I have this trouble , 
 
  
 
 Thanks 
 
 
 
 -
 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: now() dates

2002-05-12 Thread Neil Zanella


On Fri, 10 May 2002, Paul DuBois wrote:

 At 12:06 +0100 5/9/02, Sandeep Murphy wrote:
 Hi,
 
 What appears to be the problem with the fwg query:
 
 select code,date from multimedia_header where rubrica=87 and  now() 
 '08-03-2002 13:10:53' and date IS NOT NULL
 
 The records returned includes those earlier than 08-03-2002 13:10:53  too..
 
 Dates in MySQL are in CCYY-MM-DD format, not MM-DD-CCYY.

How are you inserting that date value into the statement.
Are you using JDBC? If so then be careful to use java.sql.Date
instead of java.util.Date. The effect of doing this is that
java.sql.Date extends java.util.Date and overrides the
toString() method used to extract the date so that
the output is in standard SQL -MM-DD format.
This format is also known as ISO 8601. This is
what everyone ought to be using but alas some
vendors such as Oracle use an DD-MMM-
format as the default.

Bye,

Neil


-
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: password function

2002-05-12 Thread Neil Zanella


Use the PASSWORD() MySQL builtin function as follows:

INSERT INTO Table
VALUES ('0', 'username', PASSWORD('password'), 'email')

This function is not part of the SQL standard. It is
used for storing passwords in the MySQL user table in
the mysql database schema named mysql among other things.

Neil

On Sun, 12 May 2002, Jule wrote:

 Hey guys and gals,
 How do i add info to a table, and give a varchar(16) row the function of
 password, so that it is encrypted? my query now is: 
 INSERT into table values('0', 'username', 'password', 'email')
 
  thanks
 
  Jule
 


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

2002-05-12 Thread Neil Zanella


Only table field names are allowed after the ORDER BY clause in 
standard SQL. The answer to your question is that SQL is not designed to 
do that kind of thing. Rather, I would suggest computing a random 
permutation of the numbers 1, 2, 3, and 4 in the PHP application prior to
constructing your SQL statement and passing it to MySQL.

Furthermore, if your application does not support the generation of
random numbers (although I am pretty sure it does), you could always
retrieve random numbers from the MySQL built in function RAND() by
issuing SELECT RAND() statements (although this approach is more
inefficient as it consumes bandwidth).

Neil

On Sun, 12 May 2002, John Holmes wrote:

 I don't know if this will work or not, but try
 
 SELECT * FROM table ORDER BY id, RAND();
 
 That should keep all of the questions and answers together, but give a
 random order for the answers.. ?? Like I said, not exactly sure on it
 though.
 
 Best option, like someone else said, is to split this up into two
 tables. 
 
 ---John Holmes...
 
  -Original Message-
  From: Jule [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, May 12, 2002 1:28 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
  [EMAIL PROTECTED]
  Subject: Re: [PHP] random order
  
  hmm it got a little more complicated now,
  i have a table with: id title question answer1 answer2 answer3
 answer4.
  how can i use all of those in a php page but only randomize the
 answers?
  
  so i get
  
  title   title
  
  questionquestion
  
  answer3 answer4
  answer2 answer1
  answer4 answer3
  answer1 answer2
  
  any ideas?
  thanks,
  
  Jule
  On Sunday 12 May 2002 17:30, you wrote:
   Add on a LIMIT to restrict it to return a certain number of rows.
  
   If you had a table of say, 100 rows, and you wanted four random ones
 out
   of the 100, then you'd use this:
  
   SELECT * FROM table ORDER BY RAND() LIMIT 4;
  
   ---John Holmes...
  
-Original Message-
From: Jule [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 12, 2002 11:22 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] random order
   
Thanks John,
I thought that that command only selected a random row..
must've read wrong.
thanks.
   
Jule
   
On Sunday 12 May 2002 17:21, you wrote:
 Nothing to do with PHP...

 SELECT * FROM table ORDER BY RAND();

 ---John Holmes...

  -Original Message-
  From: Jule [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, May 12, 2002 9:49 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] random order
 
  Hey guys and gals,
  I have a problem:
  I have a mysql databse with 4 rows, and each row (row1, row2,
  
   row3,
  
 and

  row4)
  contains a sentence. now i want these sentences to appear in
  
   random
  
 order:
  instance: 1 2etc.
   row2  row4
   row4  row2
   row1  row1
   row3  row3
 
  how do i go about that??
  any ideas apreciated.
  thanks
 
  Jule
  --
 
  |\/\__/\/|
  |   Jule Slootbeek   |
  |   [EMAIL PROTECTED]|
  |   http://blindtheory.cjb.net   |
  |   __   |
  |/\/  \/\|
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
   
--
   
|\/\__/\/|
|   Jule Slootbeek   |
|   [EMAIL PROTECTED]|
|   http://blindtheory.cjb.net   |
|   __   |
|/\/  \/\|
  
  --
  |\/\__/\/|
  |   Jule Slootbeek   |
  |   [EMAIL PROTECTED]|
  |   http://blindtheory.cjb.net   |
  |   __   |
  |/\/  \/\|
 
 
 -
 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: Newbie Question

2002-05-12 Thread Neil Zanella


Hint:

The user and host combinations for allowed MySQL connections are stored
in a table called mysql. You can access this table by issuing:
$ mysql -u root
mysql use mysql;
mysql SELECT user, host, password FROM user;

If you have set up a root password then issue:

$ mysql -u root -ppassword

where password is the required password, or better issue:

$ mysql -u root -p

and enter the password. That way other users cannot sniff it with a 
command like ps aux.

One thing you might find useful is that the mysql user table can accept
wildcard character such as %. So entering a '%' in the user and host 
fields allows connections from any user from host. This behavior is
disabled by default for security reasons.

Neil

from which MySQL is allowed

On Mon, 13 May 2002, Kevin Queen wrote:

 OK, I just finally got MySQL installed and I can't make ANYTHING work.  when
 I try to run mysqladmin -u root -h Death -p password 'somepassword' I get
 an Enter Password prompt, I have never told it a root password and it won't
 accept the system root password.  Then if I try to connect to the server
 from another machine I get host ip_address is not allowed to connect to
 this MySQL server.  Any help on these issues and pointers to
 administration/configuration help would be appreciated.  I do have the
 manual pdf, but 700+ pages is a lot to read and I can't find these issues in
 the manual by searching.
 
 Thanks,
 Kevin Q.
 
 
 -
 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: how to get a back up?

2002-03-30 Thread Neil Zanella


Check out the mysqldump command line utility.
It also has its own man page.

Bye,

Neil

On Sun, 31 Mar 2002, kaps wrote:

 hi guys
 
 how can i get a backup of the database using the mySQL Server terminal
 access with my mySQL Sever?
 
 any help?
 
 cheers
 
 kaps
 
 
 -
 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




CHECK constraints

2002-02-20 Thread Neil Zanella


Hello,

I searched the manual but it seems like MySQL does not support ANSI SQL
CHECK constraints. These are often used to check that rows inserted into
tables meet specified criteria. For example table T created as follows

CREATE TABLE T (
  X INT,
  CHECK (X = 10)
);

has a check constraint so that if the user tried to insert a row with
the following statement:

INSERT INTO T VALUES (11);

then the DBMS reports an error but if on the other hand the user enters

INSERT INTO T VALUES (6);

then 6 = 10 so the insertion works fine.

It would be nice if mysql supported this feature, but thanks for mysql.

Have a nice day,

Neil


-
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: JDBC Driver for MySQL3.23.47-1

2002-01-24 Thread Neil Zanella


http://mmmysql.sourceforge.net/

On Thu, 24 Jan 2002, Rahadul Kabir wrote:

 hi,
 I recently installed MySQL3.23.47 and now I need the JDBC drivers for
 it. Does anyone know where can I find a Free JDBC driver that would work
 with MySQL 3.23.47-1?
 thanks so much

 --rahad


 -
 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: Select statement help...

2002-01-12 Thread Neil Zanella


On Sat, 12 Jan 2002, Tom Jones wrote:

 Table: flights
 Fields: depart, depart_time, arrive, arrive_time, flight_no, flight_group

 I'm trying to do a search on depart and arrive and show only the records
 which have matching flight_group

SELECT depart, arrive
FROM   flights
WHERE  flight_group = 'foo'

assuming that depart and arrive hold the names of locations and that you
want to show all those departure and arrival locations for flights where
group foo has travelled.

If you want all fields then you can also use the following shorthand
notation but if you are using Oracle 8 and JDBC then don't do this
because there is a bug in that driver which causes it not to understand
the * notation in SELECT statements but I think this would work with
the MySQL JDBC driver (mmmysql.sourceforge.net) if you were to use it.

SELECT *
FROM   flights
WHERE  flight_group = 'foo'

After all if you are going to build a database you will most likely
want to build an interface for it. If you want to build a web interface
then PHP is probably your best choice but first you need to get
comfortable with the mysql client.

Bye,

Neil


-
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: Quick update...

2002-01-05 Thread Neil Zanella


Good try but under Red Hat 7.2 the scripts /usr/share/mysql/mysql.server
and /etc/init.d/mysql differ in some respects. Try the latter script
instead.

Bye,

Neil

On Sat, 5 Jan 2002, Alexander Trauzzi wrote:

 Here's a quick update to the problem I posted (which I'll include just for 
convinience sake).

 I went into /usr/share and I ran mysql.server start and it returned just this:

 020105 18:22:20  mysqld ended

 Any more thoughts?


 -=-=-=-Previous message-=-=-=-


 I have a RedHat 7.2 machine going, and I'm getting the following error when I run 
mysqltest after starting the MySQL Daemon...

 Snip

 mysqltest: Failed in mysql_real_connect(): Can't connect to local MySQL server 
through socket '/var/lib/mysql/mysql.sock' (111)

 Snip

 First of all, I've relocated the data directory to /OmegaNET/DataCore which is a 
seperate, larger hard drive in my system.  Also, I've checked the permissions of the 
/var/lib/mysql/mysql.sock file AND it's directory, and they both have the correct 
user/group/permissions.
 I've tried the /tmp/mysql.sock symlink fix, and that hasn't yielded any results.

 I've consulted every article I could find in http://groups.google.com and have been 
unable to find a solution to this problem.  I'm uncertain as to what is causing it, 
and if someone could help me out, I'd be ETERNALLY greatful!  Send me an e-mail at 
[EMAIL PROTECTED]

 Thanks in advance!

 -Alexander Trauzzi





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

2001-12-08 Thread Neil Zanella


Before you proceed I would advise you to revise your relational model.
For instance why do you have both id and artistid in both tables?
Can more than one artist sing or participate in the production
of the same song? If yes then your database should probably look like:

Artists(artist_id, artist_name) PRIMARY KEY artist_id AUTO_INCREMENT
Sings(artist_id, song_id) PRIMARY KEY (artist_id, song_id)
  FOREIGN KEY artist_id REFERENCES Artists
  FOREIGN KEY song_id REFERENCES Songs
Songs(song_id, song_name) PRIMARY KEY song_id AUTO_INCREMENT

Then to search for all songs by all artists named Joe Doe you would do:

SELECT song_name
FROM Artists, Sings, Songs
WHERE Artists.artist_id = Sings.artist_id
  AND
  Sings.song_id = Songs.song_id
  AND
  artist_name = 'Joe Doe';

I leave it as an exercise for you to modify this model to account for
a group of Artists being part of a particular Band with the band names
also stored in the database.

Bye,

Neil

On Sun, 9 Dec 2001, Barry.J.Rumsey wrote:

 I have a database with two tables:
 table1 id, artistid, artist
 table2 id, artistid, songtitle
 What I would like to know is how do I join these two. artistid in both
 of them have the same value. What I'm after in the end is to be able to
 search by artist and return a list of songtitles from that artist. I'm
 using Roxen as my server on win32 system.


-
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: please help me

2001-11-29 Thread Neil Zanella


On Thu, 29 Nov 2001, anandakkumar araskumar wrote:

 Hi all
 Iam new to php and iam learning that from scratch.I
 came across a problem in connecting mysql from php
 script.I run php in windows2000 under IIS configured
 to personal web server.I have installed mysql
 with server and client and both are running in the
 same machine(ofcourse, i can you use the ipaddress of
 localhost).I didn't set any username or password with
 mysql.

 This is my php script:
 $link=mysql_connect(localhost);
 if($link)
 die(Couldn't connect to mysql.mysql_error() );

Perhaps you meant if(!$link) ...
Notice the not ! operand. If a link is established then the $link PHP
variable will no longer hold the empty string. In PHP all varaibles
are automatically initialized to hold an empty string which can also
be used interchangeably with the boolean false value.

The standard way of connecting is:

   $link = mysql_connect($db_host, $db_user, $db_pass)
  OR die(Could not connect to database server.);

Here the stuff after OR is executed only if mysql_connect returns false
which is the way the C || operator works.

Regards,

Neil


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

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




Re: MySQL, Red Hat Linux and php

2001-11-29 Thread Neil Zanella


If I were you I would simply upgrade to Red Hat 7.1 or better 7.2.
It probably takes just as much time to install a whole distro
than having to worry about installing apache, then mysql, then
php, all over again, and most likely getting something wrong
and having to go back. Also there may be problems with
compatibility etc... I remember having some problem
compiling php with mysql support when mysql was
not installed under /usr/local (something like
the php configure option did not allow to
specify a directory for the mysql
installation). But perhaps this
has changed in php 4.0.6.

Regards,

Neil

On Thu, 29 Nov 2001 [EMAIL PROTECTED] wrote:

 Hello,

 Which version of MySQL ( RPM packages ) is good for work with php 4.0.6
 and Linux Red Hat 6.2 ?
 Thank for your help !

 Edward.




 -
 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: Please redo this horrible web page

2001-11-28 Thread Neil Zanella


Dear mysql developers,

Personally, I think your web pages are very nice
and also user friendly. I have no idea about
what this fuss is all about.

Regards,

Neil


-
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: opinion - voating

2001-11-26 Thread Neil Zanella


On Mon, 26 Nov 2001, Ken Kinder wrote:

 Oracle is certainly more full-featured, but if you know very little about
 databases, Oracle is not the right choice.

I agree. First of all the system requirements are high. For instance the
Oracle Universal Installer took something like three hours on a fairly
high end PIII with 133MHz FSB! I have heared it takes for ages (up to a
whole day) on other machines. This is not the worse part either. Have
you ever used the sqlplus command line utility (which is the equivalent
of the mysql command line tool or PostgreSQL's psql command line client).
Well, sqlplus assumes your terminal is 24x80 even after you resize it.
At least this is so with Oracle8i. I can tell you this: you won't learn
much with a crappy tool like that cause as soon as you have more than
two columns you won't be able to see the output in human readable form.
Now my other point: Oracle8i is highly non-SQL compliant (although
Oracle9i seems to be a little bit better). My last point about Oracle
is that it is based on Java (see that JServer stuff when you start
sqlplus?) and that is perhaps one of the reason it needs so much RAM.
With a bit of bias we could conclude that if it were not for its
disk and address space requirements then Oracle would be a fairly
sluggish beast.

 Only use Oracle if you have a
 full-time fix-figure-salary Oracle expert AND you actually need Oracle's
 features.

 If you don't specifically know you need Oracle, you don't.

Exactly. If I had the choice I would stay away from Oracle. Plus Oracle
does not have good enough documentation either compared to most Open
source products.

Now there is one thing that we must be aware of. There are things that
mysql does not support (yet). These include foreign keys, views,
subselects, triggers, and procedural SQL, and I can't remember
if mySQL supports transaction processing either, perhaps someone
can confirm. However, mysql is much faster than other database
system so you may still want to use it depending on the
complexity of your database. If your database is not
complex or if you do not need subselects then go
with mysql. Most of the time you can get around
all of this by recoding some things here and there.
But if you are just learning go with postgresql, which
will be slower, but will support all this stuff you
need to know about databases. Once you have tested
your application under postgresql and are certain
that your code does not violate the database's
foreign key constraint, simply run it under mysql
after the testing phase. Then your code will run
faster and at the same time free of errors.
This is just my own personal recommendation
for relatively small applications.

Bye,

Neil


 On Wednesday 21 November 2001 09:45 pm, Mamun Murtaza Sheriff wrote:
  Dear All
 
  You all are working on Database for Long time. In your opinion Which one is
  best 1. MySql or 2. Oracle
 
 
  Mamun
 
 
  -
  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: AW: opinion - voating

2001-11-26 Thread Neil Zanella


On Mon, 26 Nov 2001, Christian Sage wrote:

 Neil,

 I'm not going to argue against your view, because for a discussion on
 Oracle this is clearly the wrong place. However, I would like to correct
 your facts in one respect: while SQL plus has a standard line size of 80
 characters and a standard page size of 24, you can very easily set your
 linesize to any value you want (within reason, but I know I have used 512
 successfully, and that is certainly wider than any terminal size I would
 set), and pagesize could traditionally go up to 32767 or be set to 0,
 which means no page breaks, no headers, etc.

I would certainly be interested in knowing how this is done. In any case
even if there is a way sqlplus does not do it properly. Smart terminal
application know how to catch a SIGWINCH and act accordingly. For example
when you resize an exterm and do an echo $LINES; echo $COLUMNS you will
see that the values have changed.

 You can also have it pause
 for you after each page and set the prompt it will give you whenever it so
 pauses.

Interesting. How is this done? Is there a way to do this in mysql.
In either case xterm has a -sb option which you can set to any
value allowing you to scroll down (and up) as far as you please.

 There are numerous other things you can set on the fly or via a
 configuration scripts.

Perhaps the Oracle folks could have been kind enough to include an
installation script as well, rather than that deadbeat universal
installer. How about something called install.sh 

 It takes some effort to get familiar with SQL plus, but once you have done
 that, it is a very powerful and versatile tool indeed. Which has no
 bearing at all on MySQL, but I think a measure of fairness towards
 competitors is always indicated.

 Cheers,
 Christian

  -Ursprungliche Nachricht-
  Von: Neil Zanella [mailto:[EMAIL PROTECTED]]
  Gesendet: Montag, 26. November 2001 21:00
  An: Ken Kinder
  Cc: Mamun Murtaza Sheriff; MySQL Mailing List
  Betreff: Re: opinion - voating
 
 
 
  On Mon, 26 Nov 2001, Ken Kinder wrote:
 
   Oracle is certainly more full-featured, but if you know very
  little about
   databases, Oracle is not the right choice.
 
  I agree. First of all the system requirements are high. For instance the
  Oracle Universal Installer took something like three hours on a fairly
  high end PIII with 133MHz FSB! I have heared it takes for ages (up to a
  whole day) on other machines. This is not the worse part either. Have
  you ever used the sqlplus command line utility (which is the equivalent
  of the mysql command line tool or PostgreSQL's psql command line
 client).
  Well, sqlplus assumes your terminal is 24x80 even after you resize it.
  At least this is so with Oracle8i. I can tell you this: you won't learn
  much with a crappy tool like that cause as soon as you have more than
  two columns you won't be able to see the output in human readable form.
  Now my other point: Oracle8i is highly non-SQL compliant (although
  Oracle9i seems to be a little bit better). My last point about Oracle
  is that it is based on Java (see that JServer stuff when you start
  sqlplus?) and that is perhaps one of the reason it needs so much RAM.
  With a bit of bias we could conclude that if it were not for its
  disk and address space requirements then Oracle would be a fairly
  sluggish beast.
 
   Only use Oracle if you have a
   full-time fix-figure-salary Oracle expert AND you actually need
 Oracle's
   features.
  
   If you don't specifically know you need Oracle, you don't.
 
  Exactly. If I had the choice I would stay away from Oracle. Plus Oracle
  does not have good enough documentation either compared to most Open
  source products.
 
  Now there is one thing that we must be aware of. There are things that
  mysql does not support (yet). These include foreign keys, views,
  subselects, triggers, and procedural SQL, and I can't remember
  if mySQL supports transaction processing either, perhaps someone
  can confirm. However, mysql is much faster than other database
  system so you may still want to use it depending on the
  complexity of your database. If your database is not
  complex or if you do not need subselects then go
  with mysql. Most of the time you can get around
  all of this by recoding some things here and there.
  But if you are just learning go with postgresql, which
  will be slower, but will support all this stuff you
  need to know about databases. Once you have tested
  your application under postgresql and are certain
  that your code does not violate the database's
  foreign key constraint, simply run it under mysql
  after the testing phase. Then your code will run
  faster and at the same time free of errors.
  This is just my own personal recommendation
  for relatively small applications.
 
  Bye,
 
  Neil
 
 
   On Wednesday 21 November 2001 09:45 pm, Mamun Murtaza Sheriff wrote:
Dear All
   
You all are working on Database for Long time. In your

Re: query

2001-11-22 Thread Neil Zanella


I think you want to do the following (notice the parentheses next to the
mysql function named now):

SELECT * FROM Table WHERE col1 = now() AND col2 = now();

Bye,

Neil

On Wed, 21 Nov 2001, Auri Net SAC wrote:

  Hi
 
  it is possible
 
  select * from table where col1 = now and col2=now
 
  where col1 and col2 are date type
 
  thnaks
 
 
  -
  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




mysql CLI: executing SQL from a file

2001-10-22 Thread Neil Zanella


Hello,

I would like to know if it is possible to issue a command from the
mysql command line interface which will read SQL commands contained
in a file and execute them immediately without having to cut and
paste them one gpm buffer size at a time.

Thanks,

Neil


-
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: Expect Script accessing MySQL

2001-09-23 Thread Neil Zanella


It is possible and not very hard at all.
But why would you need expect? Why not
just use a shell script?

Neil

On Mon, 24 Sep 2001, Chris Aitken wrote:

 Hi,

 Just a quick query. I haven't been able to locate any documentation on it,
 but has anyone ever used an expect script to connect to a MySQL database
 and pull out a bunch of data for use further in the expect script ?

 Any directions would be appreciated.



 Cheers



 Chris
 --

  Chris Aitken - Administration/Database Designer - IDEAL Internet
   email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
   __-__
*** Big Brother ***
 It just shows that the dull will rule the world. And we will be watching it.


 -
 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: command line open source ARRRGGGGGG!!!!!!

2001-09-06 Thread Neil Zanella


On Thu, 6 Sep 2001, Chadrick Mahaffey wrote:

 I realize that I'm going to be in the minority here but I have to say it.
 Open source would go much farther if they had self explanatory GUIs and had
 basic pre-setup apps that were ready for the average user to use.

Perhaps your company should be paying these mysql programmers to develop
such an installation program. Personally I found that the windows
installation was just as easy the last time I tried it but you
should really be posting the output of the error messages
if you are having trouble so we can see what kind of
problems you are having.


-
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: On Redhat 7.1

2001-09-04 Thread Neil Zanella


On Tue, 4 Sep 2001, Sinisa Milivojevic wrote:

 Trond Eivind Glomsrød writes:
  Tony Bibbs [EMAIL PROTECTED] writes:
 
   7.1 doesn't install php with mysql support enabled.
 
  Yes, we did.

Red Hat 7.1 has a very nice apache + mysql + php installation and invoking
mysql function calls from the php interface works very well. The only
aspect that puzzles me a little bit is that when I look at the output of
phpinfo(); I see a --without-mysql flag as a configure switch.
How is this possible?

Thanks,

Neil


-
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




MySQL and GPL license: questions and discussion

2001-08-27 Thread Neil Zanella



I would like to discuss the MYSQL licensing policy.
Please do not take anything personally. I do think
that MySQL is one of best database management
systems out there.

Pertaining to the FAQ on the mysql.com site:

--- begin snip 
Q:Does MySQL AB develop non-open source products?

A:No. All the software we develop is open source / free software. The core
  MySQL[tm] server is under GPL.
--- end snip --

I would like to know some more details here. In particular:

1. What was the name of the first GPL file release of MySQL?
2. Which portions are not distributed by mysql.com as part of MySQL?
3. Which portions of the Windows MySQL release
   are not released under the GPL if any? For instance is the
   windows installer program (is there one?) released under the GPL?
4. Are the Linux versions shipped with Red Hat 7 and 7.1 entirely
   distributed under the GPL?
5. Do PHP web applications that use PHP and MySQL require a MySQL license?
   Such applications are not derivative works as they are merely interfaces.
   Thus they do not require a license. Correct?

References: 1. http://www.mysql.com/news/article-36.html (announces GLP release of 
source code)
2. http://www.mysql.com/news/article-75.html (some FAQs including the 
above)

A:Forks are perfectly legal derivatives of GPL'd code as long as the GPL
  terms are followed. But please note that forking does not give the forker
  any rights to use the trademarks of others.

The most ambiguous aspect of the GPL is that it does not seem to clearly
specify what and what not comprises a derivative work. Does a web application
which uses MySQL comprise a derivative work. I don't think so.
Do such web applications have to be placed under the GPL.
I don't see anything in the GPL that states this.

Thanks for the clarification,

Neil


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

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




Re: MySQL and GPL license: questions and discussion

2001-08-27 Thread Neil Zanella


On 27 Aug 2001, Trond Eivind Glomsrød wrote:

 Neil Zanella [EMAIL PROTECTED] writes:

  4. Are the Linux versions shipped with Red Hat 7 and 7.1 entirely
 distributed under the GPL?

 Yes.

This appears to be true after noticing the following file
under Red Hat 7.1: /usr/share/doc/mysql-3.23.36/COPYING

I wonder whether the windows version of mysql is also
distributed under the GNU GPL in full or whether it
is only distributed under the GPL in part.

Thanks,

Neil


-
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: Can't run the mysql deamon on linux

2001-08-27 Thread Neil Zanella


RedHat 7.1 users:

The command used to start mysqld on this platform is simply (as root):

# /etc/init.d/mysqld start

This is _all_ that is required.

Once that works you can set
the mysql root user's password
with mysqladmin if you are
concerned about security
on your intranet.

Neil



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

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




Re: mysql -h hostname error

2001-06-13 Thread Neil Zanella


In order for this to work you must have privileged access
to the mysqld server on which you must be able to execute
a GRANT statement to allow access from your host. If
you do not have this privilege then you're out of luck.
Connecting from other hosts then the server host is
considered to be a security risk which is why it is
disabled by default.

Neil

On Wed, 13 Jun 2001, Nancy Yang wrote:

 Hi,

 when I try the following command, I got hostname is not allowed to connect to
 this mysql server.

 Any clue?

 Nancy


 -
 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: GRANT annoyance...

2001-06-12 Thread Neil Zanella

On Tue, 12 Jun 2001, David Simcik wrote:

 Trying to grant super-user level permissions on my root account, but I keep
 getting back an error:

 mysql GRANT ALL PRIVILEGES ON *.* TO root@% IDENTIFIED BY 'user' WITH GRANT
 OPTION;
 ERROR 1064: You have an error in your SQL syntax near '% IDENTIFIED BY
 'user' WITH GRANT OPTION' at line 1

You may want to do the following instead:

GRANT ALL ON 'database'.'table' TO 'user'@'host' IDENTIFIED BY 'password'

- the PRIVILEGES keyword is redundant.
- database can be * for all databases.
- table can be * for all tables
- user is the user to pass to mysql after the -u option when connecting
- host is the host to pss to mysql after the -h option if the database is
  on a different computer than the one on which you run mysql
- password is what goes after the -p option (-p'password')
- WITH GRANT OPTION means that this user can create other users with this
  GRANT command.

This must surely help,

Enjoy,

Neil


-
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: startup help

2001-06-12 Thread Neil Zanella


On Tue, 12 Jun 2001, Martin Scherer wrote:

 I am told that mysqladmin is not an understood command.

Looks like you need to update your PATH variable.

Neil


-
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: Setting up users!

2001-06-11 Thread Neil Zanella

On Mon, 11 Jun 2001, h3rb wrote:

 Ok.  I have read the manual =)  But one thing I am not clear on.  Is if I can
 create a user who can create their own database's..modify them..and drop them
 if need be.  But they wouldn't have access to any database on the server.  I
 am asking because I host 4 different sites and 3 of them want mysql access.
 And I would not want to have to go and create a new database for these guys
 anytime they wanted.  Or are there other ways around this?  Thanks,

 h3rb

I suggest you take an approach similar to sourceforge:

- set up one or more mysql servers
- on these servers set up a MySQL user for each Unix user
- give user USER access to a database USER only

All of this is done by executing the GRANT SQL command
as a privileged user.

Neil


-
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: Cant connect

2001-06-08 Thread Neil Zanella


Did you add user  to your database with the SQL GRANT statement?

Neil

On Thu, 7 Jun 2001, Martin wrote:

 Warning: MySQL Connection Failed: Access denied for user: 
'[EMAIL PROTECTED]' (Using password: YES) in setup.php on line 92

 I am sure that all information is correct as far DB name user name and password any 
ideals



-
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/mysql question

2001-06-08 Thread Neil Zanella


On Fri, 8 Jun 2001, Rolf Hopkins wrote:

 What you wrote here and what you wrote below are not the same

 update vusers set name=Adrian D'Costa where id=3;

 update vusers set name='Adrian D\'Costa' where id=3;

 will both work.  Look up the section on escaping special characters in the
 mysql manual.

If you want to safeguard yourself in future PHP scripts use te PHP
htmlentities() command with the special flag to translate quotes.
The outcome of this is effectively what is described above.

Neil


-
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: Pound (£) Symbol and MySQL

2001-06-08 Thread Neil Zanella

On Fri, 8 Jun 2001, technical Support wrote:

 Hello All,

 I have tried the settings as suggested in this FORUM like using htmlentities
 etc... however, my pound sign in the database is displayed as: ú

Are you seeing this stuff from the standard Windows telnet client?
If so get yourself a better terminal emulator such as the free
version of QVT/Term or the cygwin stuff. The standard Windows telnet
perform pathetically with ISO 8859 rendition.

 Any more tips help etc...

  -Original Message-
  From: technical Support [mailto:[EMAIL PROTECTED]]
  Sent: 07 June 2001 21:53
  To: [EMAIL PROTECTED]
  Subject: Pound (£) Symbol and MySQL
 
 
  Hello All,
 
  When I insert data submitted via a web page into mySQL, the pound (£)
  symbol gets converted to something like 8916.
 
  I am using PHP and Apache on the Server side.
 
  Has anyone else encountered this strange problem?
 
  *
  * Visit http://www.computerstaff.net - Computer Jobs at all LEVELS *
  *
 
 
  -
  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: What am I missing?

2001-06-08 Thread Neil Zanella


Perhaps you need the MySQL-DBI-perl-bin RPM (?).
Is there such a thing?

On Fri, 8 Jun 2001, Mike Jimenez wrote:

 Perl is already installed installed on the server.
 Mike

 You don't need MySQL-bench-3.23.38-1.i386.rpm to run mysql but if you
 still want to use it, you need to install perl first.


-
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: running multiple mysqld's

2001-06-08 Thread Neil Zanella


Sorry about this questions but why would you want to run two copies of
mysqld when it is capable of hosting as many different databases as
you need? Even if you needed two databases with the same name you
could still just create two different MySQL users for it.

Thanks,

Neil

On Sat, 9 Jun 2001, Rohit Peyyeti wrote:


 Hello All:

 I have two mysqld runnning in ports: 3307  3308 respectively. I started the
 second one by using 'mysqld_multi start 2'. whereas mysqld running on
 port 3307 is the default mysqld started at the boot time.

 when i issue command such as:
 mysql -u root -p (it connects to my new mysqld running on 3307). Why is
 that it won't connect to mysqld running on port 3308. I also tried giving in
 port / socket options to mysql but to no luck!

 I cannot connect to mysqld running on port 3307 (default mysqld which
 is started at boot time)

 Can any one help here?

 ...Rohit






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

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




Re: MySQL Port numbe r

2001-06-06 Thread Neil Zanella


telnet your.mysql.server 3306

On Tue, 5 Jun 2001, sanborn wrote:

 How is MySQL used over a network?  I assume there is a port involved, and
 some kind of transaction server built into mysql?  How do I configure, test
 this?  In the several documents I have read so far, I haven't found much on
 the subject.  Thanks for your input.

 Gene Sanborn



-
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: Need help on mysql/php

2001-06-06 Thread Neil Zanella


On Tue, 5 Jun 2001, Don Read wrote:

 Better yet, put the file outside the $DOCUMENT_ROOT, in case your server is
 poorly configured.

 include($DOCUMENT_ROOT/../config.php);

This is a very good idea. One day if the system administrator decides to
back up all the user data and upgrade the web server and forgets to
include support for PHP then all the PHP files become readable as plain
text and casual web surfers could sniff your password. Another scenario
where this could happen is if there are two web servers and your home
directory is mounted on both via NFS or AFS and you may not be aware that
the other web server does not have PHP support.

If you are serving from /home/httpd/html then store your database access
information including passwords in some directory like /home/httpd/secret
and set the right ownerships for that directory and files therein. It is
also a good idea to control extraneous access to the database by
firewalling your site.

Neil


-
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: Telnet to MySQL (Was port number)

2001-06-06 Thread Neil Zanella


If you really want to connect from the windows client computer then you
must execute the grant statement on the server but this may expose you
to security risks. In this case it would be best to have both computers
behind a firewall.

Neil

On Wed, 6 Jun 2001, sanborn wrote:

 Thanks for your many answers.  (mysql port default = 3306) .  I can't seem
 to telnet to port 3306 however, I get a message saying '... not allowed to
 connect to this mysql server'.  I am telneting from a windows machine if
 this makes a difference.

 Gene Sanborn



-
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: Telnet to MySQL (Was port number)

2001-06-06 Thread Neil Zanella


On Wed, 6 Jun 2001, Dibo Chen wrote:

 use 'mysql -h server_machine -u user_name -p ' to connect/query your
 MySQL server. You don't need telnet.

My apologies for introducing some confusion here. You can use telnet to test
whether mysqld accepts incoming connections from the host on which you
are running telnet in case you do not have mysql already installed on the
client computer. If however the mysql client is already installed on the
client host you may just as well use it directly. If the telnet connection
was successful you should see the mysql version and some other garbage.
If the site is firewalled then telnet and mysql client should hang.

Bye,

Neil


-
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: Need help on mysql/php

2001-06-06 Thread Neil Zanella


On Wed, 6 Jun 2001, Ian Ford wrote:

 Name your config file config.inc and if any of the below situations
 happen your password and username will not show up in plain text for the
 casual browser.
 (EXAMPLE:

   CONFIG.INC
   ?
   $DBname = 'test';
   $DBuser = 'imatest';
   $DBpass = 'Whatever';
   $DBhost = 'localhost';
   ?

   INDEX.PHP
   ?
   require(config.inc);
   $conn = mysql_connect($DBhost,$DBuser,$DBpass);
 mysql_select_db($DBname);
   ?

 END EXAMPLE)
 You can place the config.inc any where you want. My preference is in a
 includes folder...

The config.inc file should still be placed outside of the document root
to guard against the security risks I described. If not then there is
nothing preventing the user from entering the full URL to config.inc.

Neil


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

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




PHP with MySQL and RPM files

2001-06-05 Thread Neil Zanella


$ MYSQL=/usr/local/mysql
$ ./configure --with-mysql=$MYSQL

Then PHP finds the following files in $MYSQL/lib:

$ ls  $MYSQL/lib
libdbug.a  libmygcc.a  libmysqlclient.a  libmystrings.a  libmysys.a

With the RPM files one finds:

$ ls /usr/lib/mysql
libdbug.a  libmerge.a   libmyisammrg.alibmysqlclient.la  libmysys.a
libheap.a  libmyisam.a  libmysqlclient.a  libmystrings.a libnisam.a

and the file libmygcc.a seems to be missing.

It appears to me that it is impossible to specify the following when
compiling PHP because configure will look in /usr/lib/mysql/lib which
will not exist:

./configure --with-mysql=/usr/lib/mysql

This is wrong but it is quite unfortunate that it is wrong because this
makes the RPM installation virtually unusable with PHP. Perhaps the
configure script in PHP should be patched (?).

Other than that it is important to compile --with-zlib when using
--with-mysql or the programs will compile fine but when starting
apache you will get an error about uncompress. Also make sure that
/usr/src/linux is a symbolic link to the kernel source tree or make
will not find some .h files and compilation will not be possible.

The easiest way to recompile PHP with MySQL support is probably to
add --with-mysql=/usr/local/mysql to the php.spec file and run
rpm -ba php.spec and then install the RPM files.

Any feedback is welcome,

Neil


-
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: install apache, php + mysql on linux redhat 6.2

2001-06-04 Thread Neil Zanella


 php nothing error: when make and make install
 ./configure --with-mysql=/usr/local/mysql \
 --with-apache=/usr/src/apache \
 --enable-track-vars

I have a question. What should go after --with-mysql for RPM installtions?
I cannot find the answer to this question anywhere.

Thanks,

Neil


-
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: Problematic RPMs and Source locations

2001-06-03 Thread Neil Zanella


If you are uncomfortable with RPM try
the following:

rpm -qa | grep mysql
rpm -qa | grep MySQL
rpm -ql MySQL-client*
Also red the maximum rpm manual:
slocate RPM; slocate rpm | grep pdf
I think mysqladmin might be under /usr/sbin.
And to find out where a file came from do
rpm -qf path-to-file.

Now pertaining to the fact that mysql
stuff is instlled all over the place
by the RPMs that is good but when you
try to install PHP it is impossible
to specify a single directory to
--with-mysql=dir. How then is it
possible to install mysql support
into PHP when everything is all
over the place? I red the PHP README
but found no answer and also found
that when given the --with-mysql flag
php 4.0.5 was not compiling on RHL6.2
due to missing files. Any feedback is
welcome. (soory about the text formatting.
MY console is currently 10x40!)


Thanks!

On Sat, 2 Jun 2001, Mike Loiterman wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Background:
 I'm trying to install the full complement of mysql software...share,
 development, client, and server.  I have installed the source for
 3.23.38 server and it has worked flawlessly.  Nonetheless, I now need
 all of the above pieces of software on my new box.

 Problem:
 I can only find:
 1. Source for ONLY 3.23.38 server
 2. RPMs for share, development, client and server for 3.23.37

 I have no problem using the 3.23.37 stuff, but when I install the
 rpms the installation seems incomplete and just...wrong for lack of a
 better word.  I was under the impression that the default location
 was /usr/local/mysql.  It is for the source.  But things seem spread
 ALL over the place when I install from the RPMs.  For example there
 is no /usr/local/mysql.  Another example, after the server is done
 installing, I am instructed to cahnge the password via
 /usr/bin/mysqladmin, but mysqladmin is no where to be found.  This
 happened on installs from both my RedHat 7.1 distro and from the
 tarball I downloaded from mysql.com.  Am I missing something?  I
 thought I hated RPMs before, but now I REALLY can't stand them.

 Is there anywhere to get the latest versions of the source for all
 the components of mysql?

 I have installed and reinstalled countless times...i can't stand it
 anymore.  I would be extremely greatful if someone could explain
 these confusing issues to me.  Thank you.

 -BEGIN PGP SIGNATURE-
 Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com

 iQA/AwUBOxm+H3J6B0BI4qMYEQIajQCeOHI1LuKmyNlMKe2UvEktb/hA2fwAn3gO
 W5p+za6iKAUiTlPlvwGsQLnw
 =IB5U
 -END PGP SIGNATURE-


 -
 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: mysql php connection errors

2001-06-02 Thread Neil Zanella


Did you manage to compile PHP with mysql support?
I think by default red hat disables it.

Neil


-
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




MySQL RPM file: message suggestion

2001-05-30 Thread Neil Zanella


Hello,

I just reinstalled Red Hat 6.2 and reinstalled MySQL 3.23.38 and got the
following message as usual:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root -p password 'new-password'
/usr/bin/mysqladmin -u root -h tulip.math.ualberta.ca -p password 'new-password'
See the manual for more instructions.

But I think the message is still not right because the right message is:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h tulip.math.ualberta.ca password 'new-password'
See the manual for more instructions.

The -p really should be taken out of there.
If the mysql developers would like I can send them a fixed RPM spec file.

Thanks!

Neil



-
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