mysql privilage problem
From: Jorntk (jorntk_at_yahoo.com)
Date: 05/29/04
- Previous message: Weyoun the Dancing Borg: "Re: paypal shopping cart"
- Next in thread: Arkascha: "Re: mysql privilage problem"
- Reply: Arkascha: "Re: mysql privilage problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 May 2004 18:51:36 +0800
i created a user with select, insert, update to user on database db
grant select, insert, update, delete on db.* to user@localhost identified by
'password';
the user in not able to drop table but when i try it with my php script
below it can drop the package_hotel table. Why does the user can drop table
when it have permission to do so?
$host='locahost';
$username='user';
$password='password';
function db_connect()
{
$result = mysql_pconnect($host, $username, $password);
if (!$result)
return false;
if (!mysql_select_db('db'))
return false;
return $result;
}
$conn = db_connect();
if (!$conn)
return 'Could not connect to database server - please try later.';
$result = mysql_query("drop table package_hotel");
if (!$result)
print 'cannot select from package';
-- Thanks and Regards Jorn
- Previous message: Weyoun the Dancing Borg: "Re: paypal shopping cart"
- Next in thread: Arkascha: "Re: mysql privilage problem"
- Reply: Arkascha: "Re: mysql privilage problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|