Changes

From SME Server
Jump to navigationJump to search
275 bytes added ,  13:15, 6 April 2008
m
Reformatted/-ordered database and user administration section
Line 64: Line 64:     
===Administration===
 
===Administration===
 +
Information about user managament can be found in the [http://dev.mysql.com/doc/refman/4.1/en/user-account-management.html MySQL User Account Management section] of the [http://dev.mysql.com/doc/refman/4.1/en/ MySQL manual], which holds a lot of useful information, a small section is listed here for convenience.
    
==== Create a new database ====
 
==== Create a new database ====
Line 88: Line 89:  
In the above line you will have to fill in the user and the host and/or domain from which you will allow the user access to the SME Server MySQL server (don't forget the single quotes). More information can be found in the MySQL Server Manual at the MySQL website linked here.
 
In the above line you will have to fill in the user and the host and/or domain from which you will allow the user access to the SME Server MySQL server (don't forget the single quotes). More information can be found in the MySQL Server Manual at the MySQL website linked here.
    +
====Listing available databases ====
 +
To view a list of available databases on the system you can issue the following command while logged in in MySQL:
   −
==== Remove a database and user ====
+
show databases;
Using roundcube as an example database and user,
  −
Get access to the SME Server shell and issue the following commands to login to the MySQL server:
     −
mysql
+
==== Remove a database ====
 +
Get access to the SME Server shell and MySQL and issue the following command:
   −
show databases;  #list databases
+
  drop database databasename;
  drop database roundcube;
     −
use mysql;
+
Replace databasename with the name of the database.
select user,host from user;  #list users
  −
DELETE FROM user WHERE User = 'roundcube';
  −
FLUSH PRIVILEGES;
      +
==== Remove a user ====
 +
Get access to the SME Server shell and MySQL and issue the following command:
   −
{{Tip box|
+
DELETE FROM user WHERE user = 'username';
 +
FLUSH PRIVILEGES;
   −
<code>mysql_setpermission</code> is a command line menu driven utility that can assist in MySQL administration.}}
+
Replace username with the username you wish to delete.
   −
More information about user managament can be found in the [http://dev.mysql.com/doc/refman/4.1/en/user-account-management.html MySQL User Account Management section] of the [http://dev.mysql.com/doc/refman/4.1/en/ MySQL manual].
+
{{Tip box|mysql_setpermission is a command line menu driven utility that can assist in MySQL administration.}}
    
<noinclude>[[Category:Howto|MySQL]]</noinclude>
 
<noinclude>[[Category:Howto|MySQL]]</noinclude>

Navigation menu