Re: making two fields primary key ????

2002-10-13 Thread Peter Goggin

This is covered in the manual for mysql . Look up primary key.

To create table with primary key the syntax will include:
PRIMARY KEY (colname1, colname2 ...)


To alter an existing table will be miore difficult, since you have to ensure
the data already in the table does not breach the new primary key rule.

The syntax will be ALTER TABLE tablename ADD PRIMARY KEY (colname1,
colname2,...)


If you havent done so I suggest you download a copy of the manual. As
computer manual go it is first class and will cover all that you need.

Regards

Peter Goggin
- Original Message -
From: toby z [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 11:26 PM
Subject: making two fields primary key 


 hi guyz

 i ve to alter my table n make two fields primary key
 (well the combination of the two to be xact)

 any idea how to do dis ?


 thnx a mill

 toby





 :S:S:S:S:S:S:S mysql query :S:S:S:S:S:S:S



 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.com


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

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




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

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




Re: where clause question

2002-10-06 Thread Peter Goggin

This requires a similar function to Oracles decode. I do not know if MySQL
provides such a function.

Regards

Peter Goggin

- Original Message -
From: Alex Shi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 07, 2002 6:47 AM
Subject: where clause question


 Hi,

 I need a where clause in following situation:

 Say I want to query two tables: A and B. In table A there is field Afn,
 while in table B there ere 3 fields: Bfn1, Bfn2 and Bfn3. I want to
 compose a query, in which the where clause can do this:

 if A.Afn=1, then check Bfn1,
 if A.Afn=2, then check Bfn2,
 if A.Afn=3, then check Bfn3.

 So how I compose a where clause to do this? Thanks in advance!

 Alex Shi



 -
 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 permanent connections

2002-09-29 Thread Peter Goggin

What are the advantages and disadvantages of permanent connections to mysql
(using php mysql_pconnect())?

I am developing a site where each users session will have a number of
interactions with the database from different web pages. Should I use
permanent connections?

How can I close a permanent connection? (Documentation says mysql_close()
does not close permanent connections)

Do permanet connections die when the internet connection is broken?

Thanks in advance for any help.

Regards

Peter Goggin


-
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 a web server wit Redhat 7.3

2002-09-26 Thread Peter Goggin


I have installed the php-mysql package and can now connect to the database.
There is however another error which I do not undertand.

Warning: No MySQL-Link resource supplied in
/usr/local/www/vantweststamps/databaselogin.php on line 15
Connected successfully
,Line 15 is
mysql_close();


If I then go on top use a page which requires the database connection I get:
Warning: Supplied argument is not a valid MySQL result resource in
/usr/local/www/vantweststamps/stampconditionlist.php on line 39
Line 39 is:
if ($row= mysql_fetch_array($result))

These pages all work without error on my win98 machine with apache, mysql
and php.

Is there any documentation which lists all of these error conditions and
suggests ways of solving them?

Regards

Peter Goggin






-
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 Error

2002-09-25 Thread Peter Goggin

I have installed the php-mysql package and can now connect to the database.
There is however another error which i do not undertand.

Warning: No MySQL-Link resource supplied in
/usr/local/www/vantweststamps/databaselogin.php on line 15
Connected successfully

These pages all work without error on my win98 machine with apache, mysql
and php.

Is there any documentation whoich lists all of these error conditions ans
suggests ways of solving them?

Regards

Peter Goggin

- Original Message -
From: Thomas Seifert [EMAIL PROTECTED]
To: Peter Goggin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 12:28 AM
Subject: Re: Mysql Error


 if I remember right, there is a php-mysql*rpm package for redhat which
corrects this problem.

 Thomas

 On Wed, 25 Sep 2002 23:23:07 +1000 Peter Goggin
[EMAIL PROTECTED] wrote:

  The php is as installed from the redhat distribution for 7.3 from the
Next
  handbooks.   Do I need to down load a later version of PHP or cn I
modify
  what is already installed?
 
  Regards
 
  Peter Goggin
 
 
  - Original Message -
  From: Iikka Meriläinen [EMAIL PROTECTED]
  To: Peter Goggin [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Wednesday, September 25, 2002 10:30 PM
  Subject: Re: Mysql Error
 
 
  Hello,
 
  Your Apache is OK, but you've got a PHP version that's not configured
with
  the
  --with-mysql option. You need to recompile PHP if you've installed from
the
  source.
 
  Regards,
  Iikka
 
  On Wed, 25 Sep 2002, Peter Goggin wrote:
 
   I have got apache and mysql running on my linux server. When
connecting to
   my web site I get the following error:
  
   Fatal error: Call to undefined function: mysql_close() in
   /usr/local/www/vantweststamps/databaselogin.php on line 15
  
   Does this mena the apache server has not been linked to the mysql
  functions?
  
   Regards
  
   Peter Goggin
  
  
   -
   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
  
 
  **
  * Iikka Meriläinen   *
  * E-mail: [EMAIL PROTECTED] *
  * Vaala, Finland *
  **
 
 
 
 
  -
  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 Error

2002-09-25 Thread Peter Goggin

I have got apache and mysql running on my linux server. When connecting to
my web site I get the following error:

Fatal error: Call to undefined function: mysql_close() in
/usr/local/www/vantweststamps/databaselogin.php on line 15

Does this mena the apache server has not been linked to the mysql functions?

Regards

Peter Goggin


-
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 Error

2002-09-25 Thread Peter Goggin

The php is as installed from the redhat distribution for 7.3 from the Next
handbooks.   Do I need to down load a later version of PHP or cn I modify
what is already installed?

Regards

Peter Goggin


- Original Message -
From: Iikka Meriläinen [EMAIL PROTECTED]
To: Peter Goggin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, September 25, 2002 10:30 PM
Subject: Re: Mysql Error


Hello,

Your Apache is OK, but you've got a PHP version that's not configured with
the
--with-mysql option. You need to recompile PHP if you've installed from the
source.

Regards,
Iikka

On Wed, 25 Sep 2002, Peter Goggin wrote:

 I have got apache and mysql running on my linux server. When connecting to
 my web site I get the following error:

 Fatal error: Call to undefined function: mysql_close() in
 /usr/local/www/vantweststamps/databaselogin.php on line 15

 Does this mena the apache server has not been linked to the mysql
functions?

 Regards

 Peter Goggin


 -
 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


**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**




-
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 users in mysql

2002-09-23 Thread Peter Goggin

I have set up mysql under redhat 7.3 and imported the database from mysql
running on windows.

I have the root user running using passwords, but i cannot get the other
users to log on even thogh the passwords shoudl have been carrid across with
the import.

I have tried to reset the user passwords but still cannot get a logon.

For exmple if i log on and change a user password with:

GRANT INSERT ON stamps.customers TO reguser@'%'
IDENTIFIED BY 'regpassword';
 should let me log on as

mysql -D stamps -u reguser -pregpassword

I get the error message:
ERROR 1045 Access denied for user 'reguser@localhost' (Using password = YES)

I have tried changing the password with
update mysql.user set password = PASSWORD('regpassword')  and this does not
help

Can anyone suggest what I need todo?

Do I need to drop the users and run the full set of grant scripts again?

Regards

Peter Goggin


-
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: Oracle to Mysql

2002-09-19 Thread Peter Goggin

There are several major differences that you will need to consider.

1. So far as I know MySQL does not allow you to assign tables and indexes to
table spaces, hence load spreading is much more difficult. You cannot split
tables and indexes so that they reside on differentt disks.

2. There are no stored procedures and triggers available in MySQL.

3. You will need to use the Innodb or equivalent extensions to get
transaction processing.

4. The table and index creation syntax is different with MySQL. (Personally
I found MySQL somewhat more logical).

If you want to discuss the issues in more detail please e-mail me directly.

Regards

Peter Goggin

- Original Message -
From: RP C987342 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 19, 2002 4:29 PM
Subject: Oracle to Mysql


 hello

 I want to move my database from Oracle to MySql, I am new to MySql.

 Is there any documentation listing the important issues involved
 in the migration?

 thanks,



 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx


 -
 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: Installing mysql in redhat linux 7.1

2002-09-19 Thread Peter Goggin

I am having some problems in getting mysql to initaiate the inodb option.

The relevant section of my.cnf is:
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /
innodb_data_file_path =
data1/ibdata1:100M:autoextend;data2/ibdata2:100M:autoextend;data3/ibdata3:10
0M:autoextend
innodb_log_group_home_dir =index1/
innodb_log_arch_dir = index1/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
set-variable = innodb_buffer_pool_size=256M
set-variable = innodb_additional_mem_pool_size=20M
# Set .._log_file_size to 25 % of buffer pool size
set-variable = innodb_log_file_size=64M
set-variable = innodb_log_buffer_size=8M
set-variable = innodb_log_files_in_group=4
innodb_flush_log_at_trx_commit=1
set-variable = innodb_lock_wait_timeout=50
set-variable = innodb_file_io_threads=4


My system has the following mount points for database files.
/data1, /data2, /data3, /index1, /index2

mysql user can create files in all of these mount points.

The errors from starting mysql are;
020920 14:28:56  mysqld started
020920 14:28:56  InnoDB: syntax error in innodb_data_file_path
020920 14:28:56  Can't init databases
020920 14:28:56  mysqld ended

020920 14:39:45  mysqld started
020920 14:39:45  InnoDB: syntax error in innodb_data_file_path
020920 14:39:45  Can't init databases
020920 14:39:45  mysqld ended

020920 14:55:31  mysqld started
020920 14:55:31  InnoDB: syntax error in innodb_data_file_path
020920 14:55:31  Can't init databases
020920 14:55:31  mysqld ended


Can anyone tell me what the problem is?




Regards

Peter Goggin


-
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 on Redhat 7.3

2002-09-18 Thread Peter Goggin

I followed the advice given but get these errors:
If I use rpm -Uvh MySQL-3-23-52-1.i386 I get;
error failed dependencies
MySQL-server conflicts with mysql-server-3.23.49-3
followed by a list of dependencies on libmysqlclient.so.10


If I use rpm -Uvh MySQL*.rpm I get:
error failed dependencies
MySQL-server conflicts with mysql-server-3.23.49-3
MySQL-DBI-Perl-bin is needed by MySQL-bench-3.23.52-1

Do I need to deinstall all of the old rpms first or is there some form of
force command I should use?

Regards

Peter Goggin


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

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




Re: Re MySQL on Redhat 7.3

2002-09-17 Thread Peter Goggin

I have got the msql server running and now need to configure it. In
particular I want to set it up to use innodb tables.  When I set up mysql on
win98 I used the mysql-max release which comes with  built in Innodb support
and provides sample my.cnf files with the instructions for setting up Innodb
table spaces.  I cannot find anything similar from the RedHat installation.
The rpms installed are:
mysql-3.23.49-3
mysql-devel-3.23.49-3
mysql-client9-3.23.22-6
mysql-server3.23.49-3

On looking at the mysql site, it looks as though I need another rpm,
mysql-max-3.23.49-3 which should be installed after the others. Is this
correct and if so where can I down load it. (the current version is 3.23.52)

Regards

Peter Goggin




-
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 with innodb support

2002-09-11 Thread Peter Goggin

I am setting up a web site with Linux (redhat 7.1), apache, php and mysql.

I need the version of mysql with innodb support.
Can anyone indicate to me what file or files I need to obtain to install
thecorrect version of mysql and where I can down load them?

Thanks in advance
Regards

Peter Goggin


-
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 a web server wit Redhat 7.3

2002-09-11 Thread Peter Goggin



So far as I can tell the mysql files included in the CD set are:
mysql-3.23.49-3.i386.rpm
mysqlclient9-3.23.22-6.i386.rpm
mysql-devil-3.23.49-3.i386.rpm
mysql-server-3.23.49-3.i386.rpm

Do these files include Innodb support?
Are they sufficient to install mysql?

I would be grateful for any advice and information.


Regards

Peter Goggin



-
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: Problem with ALTER query

2002-09-03 Thread Peter Goggin

I have just installed redhat linux 7.1 and now need to install Mysql. with
innodb support.

I downloaded the rpm (3.23.51) from the mysql site and tried to install it.

The process appeared to stop mysql and then complained it could not find a
file:
/etc/rc.d/mysql
A query on rpm -qa | grep mysql showed no changes had taken place.
How do I install the latest version of mysql?

Should I be using the rpm ?

Regards

Peter Goggin



-
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




Installing mysql in redhat linux 7.1

2002-09-03 Thread Peter Goggin

I have just installed redhat linux 7.1 and now need to install Mysql. with
innodb support.

I downloaded the rpm (3.23.51) from the mysql site and tried to install it.

The process appeared to stop mysql and then complained it could not find a
file:
/etc/rc.d/mysql
A query on rpm -qa | grep mysql showed no changes had taken place.
How do I install the latest version of mysql?

Should I be using the rpm ?

Regards

Peter Goggin


Regards

Peter Goggin


-
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