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:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 1:50 PM
To: Barnali
Cc: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]]
> Sent: Monday, July 22, 2002 12:08 PM
> To: [EMAIL PROTECTED]
> 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 <[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
>
--
People don't usually make the same mistake twice -- they make it three
times, four time, five times...
Regards,
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php