Changes

From SME Server
Jump to navigationJump to search
272 bytes added ,  17:27, 27 November 2014
m
Line 603: Line 603:  
Create a new MySQL database (In this example the database name is databasename. Change '''databasename''', '''username''' and '''password''' with your own choices as required)
 
Create a new MySQL database (In this example the database name is databasename. Change '''databasename''', '''username''' and '''password''' with your own choices as required)
   −
Login as root and issue the following command:
+
Login as root and issue the following command to enter the MySQL CLI and create the database:
    
  mysql
 
  mysql
Line 610: Line 610:  
  flush privileges;
 
  flush privileges;
 
  exit
 
  exit
 +
 +
or directly from the shell or script:
 +
 +
mysql -e "create database '''databasename''';"
 +
mysql -e "grant all privileges on '''databasename'''.* to '''username''' identified by ''''password'''';"
 +
mysql -e "flush privileges;"
    
===Remove a database===
 
===Remove a database===

Navigation menu