Re: Waiting for the solution..

2002-06-08 Thread bvyas3

In MySql execute the GRANT command to give the necessary permissions to
user@nthost, something like as follows (change the command per your needs,
for different options, look up documentation on mysql.com )
GRANT all on *.* to 'username'@'hostname' identified by 'password'.
You can use IP too, instead of a hostname
Generally, you would want just select, update, insert, delete instead of all
 DSN.* instead of *.*, but it depends on you requirements.
once you have done that, on the NT end, you will need to configure VB to
connect via MyODBC, I am not familiar with VB much, but I have been able to
get this done via MS Access so VB should be the same. You will need to
configure MyODBC (under system DSN, maybe) to use the correct database name,
username and password.

Regards,
Bhavin.

Regards,
Bhavin.
- Original Message -
From: Subhash [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 08, 2002 1:48 AM
Subject: Waiting for the solution..


 Dear there,

 I'm Subhash from Bangalore(India).
 Can we retrieve the data stored in mySQL database installed on
 Linux platform using VB forms installed on WIN-NT. If so
 how?
 Kindly help me about this in the earliest.

 I've also installed the required odbc drivers (MYODBC 3.51) for
 Windows by downloading from mysql.com portal.
 Still i could'nt connect to it.

 Waiting for your solutions.
 Regards.
 subhash (my email id: [EMAIL PROTECTED])
 _
 Click below to visit monsterindia.com and review jobs in India or
 Abroad
 http://monsterindia.rediff.com/jobs


 -
 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: Not using indexes???

2002-06-07 Thread bvyas3

* Mysql, after reading the query, decides wether using an index would be
better than just a table row scan. Hence,   it's MySql's decision
* You can force MySql to use indexes using the 'using index' option with the
select query.(MySql 'might' still reject the force, not sure of the
circumstances).
* The first 2 queries pretty much won't use index because it is not a
specific value that you are asking MySql to search for but just a NOT NULL,
very different for '=' or even ranges.
* The final query is a Group By and hence it will need to use the index to
group by the Values that it is going to show you.
* The third query is a bit confusing. I don't think it should be using
indexes, just as the second one but it is due to some reason, can't answer
that one but instead I would also suggest that you try this:
explain Select sum(actual_revenue) From Click where sequence_log_id =
specifysomevalue;
That should use indexes since you are searching for something specific. You
can also try ranges and it should still use indexes ( a rule of thumb is
that if the return result is more than 30% of the total number of records,
it's faster to do just a full table scan so it still might not use it if you
specify a very big range)


Regards,
Bhavin Vyas.


- Original Message -
From: Jon Frisby [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 6:07 PM
Subject: Not using indexes???


 Please excuse me if this is something blindingly obvious, but having now
 encountered this in several circumstances, but I have been unable to find
a
 resolution in the docs (perhaps I just missed it?).

 In actuality we encountered the problem when doing some nasty joins, but
the
 problem seems really to be more fundamental as we've reproduced the
problem
 without a join...

 We're using MySQL 4.0.1 on Linux (from the RPM).  We have an InnoDB table,
 'click' with 6 or so indexes on it.  Notably:
 -`id` is the PRIMARY KEY.
 -`sequence_log_id` has a non-unique index.

 The problem is when we do queries that involve columns *not* available
 directly from the index, MySQL absolutely refuses to use an index for
 looking up rows.  See the output from EXPLAIN for each of these queries:

 SELECT COUNT(*) FROM click WHERE sequence_log_id IS NOT NULL;

+---+---+-+-+-+--+--
 --+-+
 | table | type  | possible_keys   | key | key_len | ref  |
rows
 | Extra   |

+---+---+-+-+-+--+--
 --+-+
 | click | index | sequence_log_id | sequence_log_id |   5 | NULL |
 939470 | where used; Using index |

+---+---+-+-+-+--+--
 --+-+


 SELECT COUNT(*), SUM(actual_revenue) FROM click WHERE sequence_log_id IS
NOT
 NULL;

+---+--+-+--+-+--++-
 ---+
 | table | type | possible_keys   | key  | key_len | ref  | rows   | Extra
 |

+---+--+-+--+-+--++-
 ---+
 | click | ALL  | sequence_log_id | NULL |NULL | NULL | 939470 | where
 used |

+---+--+-+--+-+--++-
 ---+
 (`actual_revenue` isn't part of the index.


 SELECT COUNT(*), SUM(id) FROM click WHERE sequence_log_id IS NOT NULL;

+---+---+-+-+-+--+--
 --+-+
 | table | type  | possible_keys   | key | key_len | ref  |
rows
 | Extra   |

+---+---+-+-+-+--+--
 --+-+
 | click | index | sequence_log_id | sequence_log_id |   5 | NULL |
 939470 | where used; Using index |

+---+---+-+-+-+--+--
 --+-+
 (Since it's an InnoDB table, a secondary index uses the PK as a reference
 for the index.)


 SELECT COUNT(*), SUM(actual_revenue) FROM click WHERE sequence_log_id IS
NOT
 NULL GROUP BY sequence_log_id;

+---+---+-+-+-+--+--
 --++
 | table | type  | possible_keys   | key | key_len | ref  |
rows
 | Extra  |

+---+---+-+-+-+--+--
 --++
 | click | index | sequence_log_id | sequence_log_id |   5 | NULL |
 939469 | where used |

+---+---+-+-+-+--+--
 --++
 (The key isn't actually *used* here, as demonstrated by the query taking a
 long time to run...  Of the ~970k rows in click, about 2800 have
 sequence_log_id IS NOT NULL.)



 My question is:  Is this a bug?  A feature?  What can I do to get MySQL to
 use the sequence_log_id index?

 -JF


 

Re: Error in shared libraries

2002-06-07 Thread bvyas3

Yes, regarding the $PATH my bad... putting it in /usr/lib should have
resolved it(since it's generally in LD_LIBRARY_PATH). Besides that, as Ritu
suggested, it should be in LD_LIBRARY_PATH variable in the environment  not
$PATH. Not familiar with /etc/ld.conf, that might work too.
Bhavin.
- Original Message -
From: Chris Knipe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Charitha [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, June 06, 2002 9:23 PM
Subject: Re: Error in shared libraries


 Doesn't this need to be in ld's path?  /etc/ld.conf ?

 I'm not to sure Not on *nix at the moment, but I believe the proper
way
 to add it would be through /etc/ld.conf and running ldconfig to update the
 paths.

 Kind Regards,

 Chris Knipe
 MegaLAN Corporate Networking Services
 Tel: +27 21 854 7064
 Cell: +27 72 434 7582

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Charitha [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Friday, June 07, 2002 9:14 AM
 Subject: Re: Error in shared libraries


  or aalternatively, u can also do a echo $PATH and put the library in one
 of
  those path. eg: /usr/lib or someplave OR
  do PATH=$PATH:/usr/lib/mysql, if it work, put that command in your
  '.profile' so that it loads every time you log in.
  - Original Message -
  From: Chris Knipe [EMAIL PROTECTED]
  To: Charitha [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Thursday, June 06, 2002 9:00 PM
  Subject: Re: Error in shared libraries
 
 
   It may be looking for the library in a different location, such as
   /usr/local/lib/mysql
  
   ldd application binary
  
   Should show you where exactly it is looking for the library, then you
 can
   try to symlink the library to that location.  Alternatively,
recompiling
  the
   application may also help.
  
   Kind Regards,
  
   Chris Knipe
   MegaLAN Corporate Networking Services
   Tel: +27 21 854 7064
   Cell: +27 72 434 7582
  
   - Original Message -
   From: Charitha [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, June 07, 2002 5:46 AM
   Subject: Error in shared libraries
  
  
   
   
Hello all,
   
I am having one application in which i am using mysql as database.
When i run my application it gives following error.
   
error:loading shared libraries libmysqlclient.so.10 (No such file
or
directory)
   
I am having that library in /usr/lib/mysql/
Still it gives this error.Why is it so..?
How to solve this problem?
   
   
Thanks and regards,
Charitha C.
   
   
   
   
--
   
   
   
  
 -
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
 
 



-
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 ? Load Data in MySQL

2002-06-07 Thread bvyas3

No, there is no way to trigger an insert automatically when you are doing a
LOAD DATA (bulk load). You will need another flat file with the appropriate
info and load that in as well...just as you have thought of.
- Original Message -
From: Dion Wickander [EMAIL PROTECTED]
To: MySQL Help [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 8:12 AM
Subject: newbie ? Load Data in MySQL


 I am working on a project were the customer info will be uploaded to a
MySQL
 database from multiple sources with a customer ID already assigned to them
 and this data needs to be related to other tables with related info. OK I
 have an auto increment column set up as the primary key to keep track of
the
 customer records that are being created and using it to relate the data to
 my other tables.

 here is the question

 is their a built in or automated way to load data in bulk to the customer
 table and with each record added to that table create a record in the
other
 related tables with the correct primary key? or would this need to be a
 record by record individual insert to create the corresponding records.

 - my thinking is that I may have to load data in bulk, setting a flag for
 the newly uploaded data. Then do a select that finds the flags and then
 creating the new records in the related tables based on the found set.
then
 of course removing the flags after all other tables are updated.

 I was just wondering if their is a built in mechanism for something like
 this?

 thanks in advance.


 MySQL 3.23.39

 -
 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: Error in shared libraries

2002-06-06 Thread bvyas3

or aalternatively, u can also do a echo $PATH and put the library in one of
those path. eg: /usr/lib or someplave OR
do PATH=$PATH:/usr/lib/mysql, if it work, put that command in your
'.profile' so that it loads every time you log in.
- Original Message -
From: Chris Knipe [EMAIL PROTECTED]
To: Charitha [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 06, 2002 9:00 PM
Subject: Re: Error in shared libraries


 It may be looking for the library in a different location, such as
 /usr/local/lib/mysql

 ldd application binary

 Should show you where exactly it is looking for the library, then you can
 try to symlink the library to that location.  Alternatively, recompiling
the
 application may also help.

 Kind Regards,

 Chris Knipe
 MegaLAN Corporate Networking Services
 Tel: +27 21 854 7064
 Cell: +27 72 434 7582

 - Original Message -
 From: Charitha [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, June 07, 2002 5:46 AM
 Subject: Error in shared libraries


 
 
  Hello all,
 
  I am having one application in which i am using mysql as database.
  When i run my application it gives following error.
 
  error:loading shared libraries libmysqlclient.so.10 (No such file or
  directory)
 
  I am having that library in /usr/lib/mysql/
  Still it gives this error.Why is it so..?
  How to solve this problem?
 
 
  Thanks and regards,
  Charitha C.
 
 
 
 
  --
 
 
 
  -
  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