List:General Discussion« Previous MessageNext Message »
From:Barnali Date:July 22 2002 8:34am
Subject:RE: usage of mysql command
View as plain text  
You should use the `FLUSH' command if you want to clear some of the
internal caches *MySQL* uses.  To execute `FLUSH', you must have the
*reload* privilege.

FLUSH TABLES closes all open tables.

If you want table level locks, use LOCK command.

LOCK TABLES tbl_name [AS alias] {READ | [READ LOCAL] | [LOW_PRIORITY] WRITE}
            [, tbl_name {READ | [LOW_PRIORITY] WRITE} ...]
...
UNLOCK TABLES

LOCK TABLES works as follows:

Sort all tables to be locked in a internally defined order (from the user standpoint the
order is undefined).
If a table is locked with a read and a write lock, put the write lock before the read
lock.
Lock one table at a time until the thread gets all locks.

For READ ONLY, use
LOCK TABLES <table name> WRITE

Barnali
Persistent Systems
Pune, India

-----Original Message-----
From: Charitha [mailto:charitha@stripped]
Sent: Monday, July 22, 2002 1:50 PM
To: Barnali
Cc: mysql@stripped
Subject: usage of mysql command




Actually i want to lock a db in mysql with the flush command
should i go thru CPAN for that purpose or i can do it with a single
command like
  mysql -uxxxx -pxxxx DBNAME --execute "flush tables with read only"

i have tried this but it is not working for me
that is why i put that mail
Is there anyone to correct this???????
thank you.


On Mon, 22 Jul 2002, Barnali wrote:

> download mysql module of perl from cpan.org.
>
> Barnali
>
> -----Original Message-----
> From: Charitha [mailto:charitha@stripped]
> Sent: Monday, July 22, 2002 12:08 PM
> To: mysql@stripped
> Subject: usage of mysql command
>
>
>
>
> Hello all,
>
> How to use mysql command in perl script?
> I want to lock the db thru a perl(or shell)script.
>
> Thanx in advance.
> --
> Charitha
>
>
> ---------------------------------------------------------------------
> 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 <mysql-thread115210@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-barnali_banerjee=persistent.co.in@stripped>
> 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 <mysql-thread115212@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-charitha=nmsworks.co.in@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

--
People don't usually make the same mistake twice -- they make it three
times, four time, five times...

Regards,
Charitha

Thread
Installation ProblemDexter S . Tan19 Jul
  • Re: Installation ProblemGeorg Richter19 Jul
  • Re: Installation ProblemDexter S. Tan19 Jul
    • Re: Installation ProblemGeorg Richter19 Jul
Re: Installation ProblemDexter S. Tan22 Jul
  • Re: Installation ProblemDan Nelson22 Jul
  • Re: Installation ProblemDexter S. Tan22 Jul
  • Re: Installation ProblemDexter S. Tan22 Jul
    • usage of mysql commandCharitha22 Jul
      • RE: usage of mysql commandBarnali22 Jul
        • usage of mysql commandCharitha22 Jul
          • RE: usage of mysql commandBarnali22 Jul
  • Re: Installation ProblemDexter S. Tan23 Jul