Re: SSH tunnel for Mysql

2005-11-20 Thread Daniel Walker
Well, off the top of my head, to achieve a local-forwarding, you'd do  
something like:


ssh [EMAIL PROTECTED] -L arbitrary high port no:localhost:3306 -N 

Remember, localhost is resolved after the tunnel is established, so  
refers, actually, to the remote machine :) (The -N option simply  
obviates the need to perform some useless execution at the remote  
end, like sleep  or somesuch nonesense).


An example:

ssh [EMAIL PROTECTED] -L 3776:localhost:3306 -N 



On 20 Nov 2005, at 19:38, Rhino wrote:

I use PuTTY (and WinSCP3) to attach my Windows machine to the Linux  
server holding my MySQL database. PuTTY is used to get the command  
line and WinSCP3 is the GUI I can use to do file transfers between  
the two machines.


In PuTTY, there is a place where you can create SSH tunnels; it is  
located in the Connection/SSH/Tunnels page of the settings tree.  
You just use the bottom half of the Port Forwarding section of that  
screen to add new forwarded ports, specifying the source port,  
the destination, and choosing one of local, remote, or dynamic;  
then click Add and you should be ready to go.


WinSCP3 also has an SSH section in its settings tree but I've never  
touched the defaults or set up a tunnel for it and it works fine.


Rhino

- Original Message - From: Jerry Swanson [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Sunday, November 20, 2005 10:00 AM
Subject: SSH tunnel for Mysql


How to create ssh tunnel for Mysql?
TH



-- 
--



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.4/176 - Release Date:  
20/11/2005




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.4/176 - Release Date:  
20/11/2005



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





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



Re: not a rpm package?

2005-05-19 Thread Daniel Walker
On Wednesday 18 May 2005 21:27, Bing Du wrote:
 I downloaded MySQL-server-5.0.4-0.i386.rpm.  When I did 'rpm -i
 MySQL-server-5.0.4-0.i386.rpm', the following message returned:

 MySQL-server-5.0.4-0.i386.rpm: not an rpm package (or package manifest):

 What's the problem?

 Bing

The problem is exactly as the problem says, you're trying to install something 
that isn't an RPM package. Try:

file MySQL-server-5.0.4-0.i386.rpm

It'll tell you what the file you've downloaded actually is. Either it's a 
corrupted rpm, or you've downloaded a link to the package, instead of the 
package itself.

HTH
Daniel

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



Re: Single vs Multiple primary keys

2005-05-16 Thread Daniel Walker
On Sunday 15 May 2005 20:31, Dan Bolser wrote:
 You must mean a multipart primary key with three parts :)

 or multiple-column indexes

 That is what I would do (use a multiple-column index (primary key)  - its
 kinda based on opinion, but I think you should let the real data be the
 primary key where appropriate, and avoid artificial 'auto_increment'
 unless they are specifically useful or necessary in your situation.

 I.e build the database around the data, not the other way round :)

 That is just my design preference though.

 Not sure about performance problems, but you get two 'indexes' for free
 with one multipart primary key with three parts (so the order of the
 parts is significant (depending on your application)).


I would advocate quite the opposite. The data is the data: primary/foreign 
keys are data about the database. You should always separate the two. For 
instance, the foreign key values used in a junction table, used to manage 
many-to-many relationships, are _simply_ foreign keys; the need for their 
presence in that particular table has more to do with normalisation and good 
database design than anything about the actual data in the real world. By all 
means, build the database AROUND the data, but don't actually USE the data to 
build the database.

You can never really guarantee the uniqueness (or availability) of the data 
that you select for your primary key when you use _real_ data. A classic 
example, is where someone is using National Insurance numbers for employees 
an Employee database as the primary key for each employee - what happens if 
you suddenly start hiring foreign contractors, where no such data exists? Do 
you start inventing false data, just to satisfy your need for a foreign key? 
If you'd used auto-increment fields, the problem wouldn't arise.

Furthermore, auto_increments are just integers: there is very little overhead 
involved in handling them. Real data is usually either more complex, or is 
apt to become so at some point in the future.

Daniel Walker

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



Re: output in text file /migration

2005-05-16 Thread Daniel Walker
As for your second question, SELECT INTO OUTFILE (making sure mysql user has 
write privileges in the directory/file you want to write to).

MySQL give the example:

SELECT a,b,a+b INTO OUTFILE '/tmp/result.text'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ''
LINES TERMINATED BY '\n'
FROM test_table;

...as producing a CSV file of lines of field-output 'a', 'b' and 'a+b'.

On Monday 16 May 2005 15:15, Seena Blace wrote:
 Hi,
 I want to migrate 1 table from MYSQL to oracle ?
 how to do that ?

 How to get output of table into text file?
 thanks
 .


 -
 Yahoo! Mail Mobile
  Take Yahoo! Mail with you! Check email on your mobile phone.

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