Re: Security Question

2001-02-27 Thread Donald Korth

LOAD DATA [LOW_PRIORITY] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE]
INTO TABLE tbl_name
[FIELDS
[TERMINATED BY '\t']
[OPTIONALLY] ENCLOSED BY '']
[ESCAPED BY '\\' ]]
[LINES TERMINATED BY '\n']
[IGNORE number LINES]
[(col_name,...)]

The LOAD DATA INFILE statement reads rows from a text file into a table at a very high 
speed. If the LOCAL keyword is specified, the file is read from the client host. If 
LOCAL is not specified, the file must be located on the server. (LOCAL is available in 
MySQL 3.22.6 or later.) 

Moreover u r missing the escape char "\" in the path 

so jsut type the foll and tell me it works .

load data local inifile "c:\\text.txt" into table dbname.tblname fields .

Additionally u could use "c:/text.txt" . Notice the forward slash 

cheers

Sajan

 

  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 27, 2001 4:30 PM
  Subject: Security Question


  Hi,

  I am typing the following sequence of commands and running into an access
  denied message.

  mysql -uusername -ppassword -hwww.myhost.com dbname

  the bit above works and takes me to my mysql prompt and i am logged into my
  server/database.

  then i try the following and i get the error message.

  load data local inifile "c:\text.txt" into table dbname.tblname fields
  terminated by ',' ;


  I have also tried ... infile "text.txt" and placed a copy of the text file
  in c:\mysql and c:\mysql\bin with no success.



  please could you let me know if you can see  I am doing something wrong or
  if there is a way I can check to see if I have relevant access before I
  contact my ISP.

  Many thanks

  Sean Browne.


  -
  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 access rights

2001-02-26 Thread Donald Korth

The "%" in the first command to User table spoils it all. It means logging from ffrom 
any host is valid .
Remove that command. It'll work
Cheers
Donald 
  - Original Message - 
  From: David Hulka 
  To: [EMAIL PROTECTED] 
  Sent: Monday, February 26, 2001 1:28 AM
  Subject: Setting access rights


  Hi everyone, 
  I have problem with Database inteded for setting access rights.  
  The problem is that IP addresses set in table 'db' dont affect access rights. 
  With no problem I accessed database from IP 147.229.177.57.

  Dumping data for this database are as follows:

  # DATABASE mysql

  #
  # Dumping data for table 'user'
  #
  INSERT INTO user VALUES 
  ('%','YYY','passwd','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
  INSERT INTO user VALUES 
  ('localhost','root','passwd','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'
  ,'Y');


  #
  # Dumping data for table 'db'
  #
  INSERT INTO db VALUES 
  ('localhost','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.193','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.194','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.195','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.196','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.197','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.198','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');


  Server Configuration is:
  RedHat v7.0 + Apache 1.3.14 + PHP 4.0.4pl1(patched zend_list.c) + MySQL v 
  3.23.33.

  Can somebody help me? What is wrong?

  Best regards
  Dave.


  -
  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



Foxes Me ???

2001-02-23 Thread Donald Korth

Hello All !!!

I 'm in a rather strange position . I've a servlet that fetches data from a MySql DB . 
If the database is without a password it works perfectly fine . Ironically if i assign 
a user name and passwd to the DB the servlet doessn't seem to like it and throws up 
the foll :

"SQLState: 08S01 Message: Communication link failure: Bad handshake Vendor: 1043 " on 
the browser


java.sql.SQLException: Communication link failure: Bad handshake
at org.gjt.mm.mysql.MysqlIO.init(Compiled Code)
at org.gjt.mm.mysql.Connection.init(Connection.java:230)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:159)
at Shopper.init(Shopper.java:21)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Compiled Code)
at com.sun.web.core.ServletWrapper.loadServlet(ServletWrapper.java:90)
at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:109
)
at com.sun.web.core.InvokerServlet.service(InvokerServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:140
)
at com.sun.web.core.Context.handleRequest(Context.java:375)
at com.sun.web.server.ConnectionHandler.run(Compiled Code)
Shopper: init

My servlet code is as follows :

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;

public class Shopper extends HttpServlet 
  {
 Connection con;
 PreparedStatement stmt, stmt1;
 ResultSet rs,rs1;
 ResultSetMetaData rsmd;
 int numcol;

 public Shopper() 
   {
  try
 {
   Class.forName("org.gjt.mm.mysql.Driver").newInstance();
   String url="jdbc:mysql://localhost:3306/project?user=Donaldpassword=Donald";  
  
 // If no password assigned to DB
 // String url="jdbc:mysql://localhost:3306/project";  
 
   con=DriverManager.getConnection(url);
   stmt=con.prepareStatement("select * from productregister");
   stmt1 = con.prepareStatement("select * from productregister where code=?");
 }
 catch(java.lang.Exception ex)
 {
   ex.printStackTrace();
  }

 } 

 public void doGet(HttpServletRequest req, HttpServletResponse res)
  throws ServletException, IOException
  {
..
   ...
  }

Any help would be deeply appreciated
Regards
Donald 

--
God  gimme patience er ... but hurry up !!
--
 




Re: Antwort: [Fwd: storing files in database]

2001-02-17 Thread Donald Korth

Some  guys  here lurk around only to get  their problems solved and chuck off the 
minute any kindred list memeber solves it . For them it just feels so smart thinking 
that the  list is the best place to get their work done without paying a dime . 

So all u guys intending to only take and not give  from the list  think twice . It 
doesn't really hurt to help others . So keep the wheel of this List moving 
! 
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: [EMAIL PROTECTED] 
  Cc: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
  Sent: Friday, February 16, 2001 3:23 PM
  Subject: Antwort: [Fwd: storing files in database]




  On 16.02.2001 10:08:26 I.SivaramaKrishnan wrote:

   NOTE: Since iam not a member of this group, please reply by cc`ing to my mail
   id.

  That's a behavior I never quite understood - you come to list seeking for
  advice.  Fine.  Next you say that you do not care at all about the list.  Geez,
  if you want answers, it's *YOUR* responsibility to obtain them!




  -
  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



Shell Shocking

2001-02-12 Thread Donald Korth

Hello 

The hosting company has given me a user name and passwd . When i log into my own site 
thro' a telnet session i 'm able to view all the databases created in the server that 
includes DBs not created by me  . I also did a "USE DB" command to connect to a DB 
that wasn't mine . Also "Show tables" faithfully listed all the tables in the DB . I 
even  was able to run a "SELECT " on a login table table to list all the user names 
and passeords listed with the company . 
What do i make of it  An admin lapse or a inherent limitation of MySQL as the 
support guy makes it out . But the latter is hard to believe.
Any suggestions on  how to make my DB invisible on other Logins ?
Any help will be deeply appreciated .
Regards
Donald 



Re: cant connect to local mysql server

2001-02-06 Thread Donald Korth

Start the deamon First
shellmysqld-XXX
To find out what X means go to the bin directory below and find out . d
stands for daemon
then key
shellmysql

Cheers
Donald

- Original Message -
From: "soon chee keong" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 06, 2001 7:09 PM
Subject: cant connect to local mysql server


 hi..could someone pls help me

 i had created mysql server before in my pc but this morning i discovered
 that i cant access my mysql server.this is what i typed:

 shell mysql

 this is what i got:

 ERROR 2002:Can't connect to local MySQL Server through socket
 '/tmp/mysql.sock'(111)

 what is it trying to say???
 by the way, i wasn't logged on to the internet at that moment. Is that the
 reason why it fails to connect
 _
 Get Your Private, Free E-mail from MSN Hotmail at 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




Help :- To Upload a local Database.

2001-02-03 Thread Donald Korth

Hello !!
I'm trying to upload my database that's build locally on Win ME machine to a remote 
Linux server . I'm using Ace-Ftp to upload my normal files. But i couldn't seem to 
find the data files to which i can upload my database thro' Ace-Ftp . I've heard that 
uploading the database needs to done thro' Telnet . I'm least aware of this 
application .
Could anyone  pls throw light on any applications which allows to upload the database 
in GUI format ? Or the method using Telnet ? Preferably the former .
Any help would be greatly appreciated . 
Thank You 
Regards
Donald