Changes

Jump to: navigation, search

MySQL Users and Security

1,036 bytes added, 20:40, 27 October 2007
Getting Information About Users
The first step securing a database is to find out which users already have access. This information is stored, not suprisingly, in a MySQL database called ''mysql''.
 
The mysql database contains a table called ''user'' which in turn contains a number of columns including the user login name and the users various privileges and connection rights. To obtain a list of users run the following command:
 
<pre>
SELECT user FROM user;
</pre>
 
A newly installed MySQL database will only list one user, the root user:
 
<pre>
mysql> select user from user;
+----------+
| user |
+----------+
| root |
+----------+
7 rows in set (0.
</pre>
 
A database that is more established will likely contain more users, some of which will have been manually created, and others, in the cvase below, created as a result of installing a third-party which uses MySQL
 
<pre>
mysql> select user from user;
+----------+
| user |
+----------+
| remote |
| |
| phptest |
| root |
| wikiuser |
| |
| root |
+----------+
7 rows in set (0.00 sec)
</pre>
 
== Creating a New MySQL User ==
 
== Deleting a MySQL User ==
 
== Renaming a MySQL User ==
 
== Changing the Password for a MySQL User ==

Navigation menu