www.farid-hajji.net banner

Farid Hajji

Perl: Einführung, Anwendungen, Referenz (2/e) [Support-Site]

Farid Hajji: Perl - Einführung, Anwendungen, Referenz
2., aktualisierte und erweiterte Auflage
Addison-Wesley Longman, ISBN 3-8273-1535-2

Beispielprogramm

mysql-init.sql
# MySQL dump 6.0
#
# Host: localhost    Database: mysql
#--------------------------------------------------------
# Server version    3.22.25

#
# Table structure for table 'columns_priv'
#
DROP TABLE IF EXISTS columns_priv;
CREATE TABLE columns_priv (
  Host char(60) DEFAULT '' NOT NULL,
  Db char(60) DEFAULT '' NOT NULL,
  User char(16) DEFAULT '' NOT NULL,
  Table_name char(60) DEFAULT '' NOT NULL,
  Column_name char(60) DEFAULT '' NOT NULL,
  Timestamp timestamp(14),
  Column_priv set('Select','Insert','Update','References')
                                      DEFAULT '' NOT NULL,
  PRIMARY KEY (Host,Db,User,Table_name,Column_name)
);

#
# Dumping data for table 'columns_priv'
#

LOCK TABLES columns_priv WRITE;
UNLOCK TABLES;

#
# Table structure for table 'db'
#
DROP TABLE IF EXISTS db;
CREATE TABLE db (
  Host char(60) DEFAULT '' NOT NULL,
  Db char(32) DEFAULT '' NOT NULL,
  User char(16) DEFAULT '' NOT NULL,
  Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  References_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  PRIMARY KEY (Host,Db,User),
  KEY User (User)
);

#
# Dumping data for table 'db'
#

LOCK TABLES db WRITE;
INSERT INTO db VALUES
      ('%','test','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'),
      ('%','test\\_%','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
UNLOCK TABLES;

#
# Table structure for table 'func'
#
DROP TABLE IF EXISTS func;
CREATE TABLE func (
  name char(64) DEFAULT '' NOT NULL,
  ret tinyint(1) DEFAULT '0' NOT NULL,
  dl char(128) DEFAULT '' NOT NULL,
  type enum('function','aggregate') DEFAULT 'function' NOT NULL,
  PRIMARY KEY (name)
);

#
# Dumping data for table 'func'
#

LOCK TABLES func WRITE;
UNLOCK TABLES;

#
# Table structure for table 'host'
#
DROP TABLE IF EXISTS host;
CREATE TABLE host (
  Host char(60) DEFAULT '' NOT NULL,
  Db char(32) DEFAULT '' NOT NULL,
  Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  References_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  PRIMARY KEY (Host,Db)
);

#
# Dumping data for table 'host'
#

LOCK TABLES host WRITE;
UNLOCK TABLES;

#
# Table structure for table 'tables_priv'
#
DROP TABLE IF EXISTS tables_priv;
CREATE TABLE tables_priv (
  Host char(60) DEFAULT '' NOT NULL,
  Db char(60) DEFAULT '' NOT NULL,
  User char(16) DEFAULT '' NOT NULL,
  Table_name char(60) DEFAULT '' NOT NULL,
  Grantor char(77) DEFAULT '' NOT NULL,
  Timestamp timestamp(14),
  Table_priv set('Select','Insert','Update','Delete','Create','Drop',
                 'Grant','References','Index','Alter')
                                   DEFAULT '' NOT NULL,
  Column_priv set('Select','Insert','Update','References')
                                      DEFAULT '' NOT NULL,
  PRIMARY KEY (Host,Db,User,Table_name),
  KEY Grantor (Grantor)
);

#
# Dumping data for table 'tables_priv'
#

LOCK TABLES tables_priv WRITE;
UNLOCK TABLES;

#
# Table structure for table 'user'
#
DROP TABLE IF EXISTS user;
CREATE TABLE user (
  Host char(60) DEFAULT '' NOT NULL,
  User char(16) DEFAULT '' NOT NULL,
  Password char(16) DEFAULT '' NOT NULL,
  Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Process_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  File_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  References_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,
  PRIMARY KEY (Host,User)
);

#
# Dumping data for table 'user'
#

LOCK TABLES user WRITE;
INSERT INTO user VALUES
        ('localhost','root','57914ac778ddd574','Y','Y','Y','Y','Y',
         'Y','Y','Y','Y','Y','Y','Y','Y','Y'),
        ('sun-1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
         'Y','Y','Y','Y'),
        ('localhost','','','N','N','N','N','N','N','N','N','N','N',
         'N','Y','Y','Y'),
        ('sun-1','','','N','N','N','N','N','N','N','N','N','N','N',
         'Y','Y','Y');
UNLOCK TABLES;
   

[Prev] [Up] [Relevant Chapter] [Next]

[Alte Quelle]


Last modified: $Date: 2006/05/18 12:56:01 $
FH. Search :: Sitemap :: Disclaimer :: Copyright :: Privacy
FreeBSD Logo