2 messages in com.mysql.lists.win32Re: User Privileges on MySQL 4.1.7| From | Sent On | Attachments |
|---|---|---|
| Osen Kusnadi | 29 Nov 2004 22:08 | |
| Daniel da Veiga | 30 Nov 2004 05:08 |
| Subject: | Re: User Privileges on MySQL 4.1.7![]() |
|---|---|
| From: | Daniel da Veiga (dani...@gmail.com) |
| Date: | 11/30/2004 05:08:01 AM |
| List: | com.mysql.lists.win32 |
I had trouble with permissions, so, I used the mysql_fix_privilege_tables.sql script (scripts folder), read the comments and you'll find instructions on how to use it. Really, I didn't find that many problems with privileges, all I had to do was run this script.
There are many people asking about that, I think the changes didn't make it clear that you had to run the script so your privileges will work.
Best regards,
On Tue, 30 Nov 2004 13:09:05 +0700, Osen Kusnadi <okus...@cikarang.actaris.com> wrote:
Hi,
I recently installed version 4.1.7 and I was using 4.0.22 on Windows XP Pro. I have problem with user permission on MySQL 4.1.7 but it work fine in MySQL 4.0.22
I was execute query on MySQL 4.0.22 as the follow:
D:\xampp\mysql\bin>mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 21 to server version: 4.0.22-nt-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant select on test.customers to guest@localhost identified by 'guest'; Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges; Query OK, 0 rows affected (0.06 sec)
Now, log in to mysql with guest as the user.
D:\xampp\mysql\bin>mysql -uguest -p Enter password: ***** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 27 to server version: 4.0.22-nt-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test; Database changed mysql> show tables; +----------------+ | Tables_in_test | +----------------+ | customers | +----------------+ 1 row in set (0.00 sec)
mysql> drop table customers; ERROR 1142: drop command denied to user: 'guest@localhost' for table 'customers'
Now I use MySQL 4.1.7 as database server, and run the previous query.
mysql> status;
--------------
Connection id: 4 Current database: Current user: root@localhost SSL: Not in use Using delimiter: ; Server version: 4.1.7-max Protocol version: 10 Connection: localhost via TCP/IP Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 TCP port: 3308 Uptime: 5 min 41 sec
Threads: 1 Questions: 15 Slow queries: 0 Opens: 11 Flush tables: 1 Open tables: 0 Queries per second avg: 0.044
--------------
mysql> use test; Database changed mysql> show tables; +----------------+ | Tables_in_test | +----------------+ | categories | | customers | | employees | | order details | | orders | | products | | shippers | | suppliers | +----------------+ 8 rows in set (0.00 sec)
mysql> grant select on test.customers to guest@localhost identified by 'guest'; Query OK, 0 rows affected (0.05 sec)
mysql> flush privileges; Query OK, 0 rows affected (0.04 sec)
mysql> quit;
Now, log in to mysql 4.1.7 with guest as the user.
mysql> status;
--------------
Connection id: 5 Current database: Current user: guest@localhost SSL: Not in use Using delimiter: ; Server version: 4.1.7-max Protocol version: 10 Connection: localhost via TCP/IP Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 TCP port: 3308 Uptime: 7 min 22 sec
Threads: 1 Questions: 25 Slow queries: 0 Opens: 16 Flush tables: 1 Open tables: 0 Queries per second avg: 0.057
--------------
mysql> use test; Database changed mysql> show tables; +----------------+ | Tables_in_test | +----------------+ | categories | | customers | | employees | | order details | | orders | | products | | shippers | | suppliers | +----------------+ 8 rows in set (0.00 sec)
mysql> drop table customers; Query OK, 0 rows affected (0.01 sec)
On MySQL 4.0.22, user guest just show customers tables only and can't drop customers table. But In MySQL 4.1.7, user guest can show all tables on database on can drop tables too.
O.K
-- Daniel da Veiga Computer Operator - RS - Brazil




