For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > February 2008 > Accounts in Mysql









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Accounts in Mysql
Gaston Verhulst

2008-02-13, 8:04 am

Hello,

Learning about Mysql Accounts, there is something I like to ask for.

I have made some database tests as root mysql with
[gastonv@telenetPC ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| MemberDirectory |
| PetCatalog |
| books |
| guestbook |
| mysql |
| test |
| world |
+--------------------+
8 rows in set (0.01 sec)

Then I select a database:

mysql> use PetCatalog
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SHOW TABLES;
+----------------------+
| Tables_in_PetCatalog |
+----------------------+
| Pet |
| PetColor |
| PetType |
+----------------------+
3 rows in set (0.00 sec)

mysql>

Please, how can I see of all the accounts for this database?
And otherwise, how can I add a new account for e.g. only seeing or only
looking for data into tables of that database?

For instance, I am gastonv@localhost, and I like to make an account for
only seeing, or for only adding something in a table of it, please how
can I do that?

Many thanks in advance and greetings,
Gaston Verhulst.
J.O. Aho

2008-02-13, 10:05 pm

Gaston Verhulst wrote:

> Please, how can I see of all the accounts for this database?


You find that in the mysql database which includes all the users.


> And otherwise, how can I add a new account for e.g. only seeing or only
> looking for data into tables of that database?


Take a look at the grant syntax:
http://dev.mysql.com/doc/refman/5.0/en/grant.html


--

//Aho
Gaston Verhulst

2008-02-13, 10:05 pm

J.O. Aho schreef:
> Gaston Verhulst wrote:
>
>
> You find that in the mysql database which includes all the users.
>
>
>
> Take a look at the grant syntax:
> http://dev.mysql.com/doc/refman/5.0/en/grant.html
>
>

Hi,
I have to thank you very much for your tip.
In the database mysql, I could find all accounts with their privileges
with the command SELECT * FROM user, wo users is a TABLE from DATABASE
mysql.
And the link also is a very good one, so I can manage accounts.
Many greetings,
Gaston Verhulst.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com