Difference between revisions of "MySQL"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
  
 
Create Users in MySQL
 
Create Users in MySQL
CREATE USER some_user@'%.unh.edu' IDENTIFIED BY 'some_pass';
+
  CREATE USER some_user@'%.unh.edu' IDENTIFIED BY 'some_pass';
  
 
Create Database
 
Create Database
CREATE database some_datadb;
+
  CREATE database some_datadb;
  
 
Give user permission to specific database
 
Give user permission to specific database
GRANT ALL ON some_datadb.* TO some_user@'%.unh.edu';
+
  GRANT ALL ON some_datadb.* TO some_user@'%.unh.edu';
  
 
Check user permissions
 
Check user permissions
use mysql;
+
  use mysql;
SELECT * FROM user;
+
  SELECT * FROM user;
 +
 
 +
On Roentgen in /etc/my.cnf this line was added specifically for Transana
 +
  set-variable=max_allowed_packet=8500000
  
 
<font size="+2" color=red><b>PLEASE TAKE EXTREME CARE WITH USER PERMISSIONS!</b></font>
 
<font size="+2" color=red><b>PLEASE TAKE EXTREME CARE WITH USER PERMISSIONS!</b></font>

Latest revision as of 15:47, 29 April 2010

To be further documented.

Main documentation: http://dev.mysql.com/doc/

Restore procedure used for upgrade from MySql 4.1 to 5.0.x Mysql database restore.

Create Users in MySQL

 CREATE USER some_user@'%.unh.edu' IDENTIFIED BY 'some_pass';

Create Database

 CREATE database some_datadb;

Give user permission to specific database

 GRANT ALL ON some_datadb.* TO some_user@'%.unh.edu';

Check user permissions

 use mysql;
 SELECT * FROM user;

On Roentgen in /etc/my.cnf this line was added specifically for Transana

 set-variable=max_allowed_packet=8500000

PLEASE TAKE EXTREME CARE WITH USER PERMISSIONS!