Commit 88301da1 authored by unknown's avatar unknown

Many files:

  new file
Makefile.am:
  Changes from Novell diff


netware/Makefile.am:
  Changes from Novell diff
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
parent 2479bdea
...@@ -15,6 +15,7 @@ bell@sanja.is.com.ua ...@@ -15,6 +15,7 @@ bell@sanja.is.com.ua
bk@admin.bk bk@admin.bk
davida@isil.mysql.com davida@isil.mysql.com
gluh@gluh.(none) gluh@gluh.(none)
gweir@work.mysql.com
heikki@donna.mysql.fi heikki@donna.mysql.fi
heikki@hundin.mysql.fi heikki@hundin.mysql.fi
heikki@rescue. heikki@rescue.
......
# Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB # Copyright (c) 2002 Novell, Inc. All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -14,9 +14,13 @@ ...@@ -14,9 +14,13 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Process this file with automake to create Makefile.in INCLUDES = -I$(srcdir)/../include -I../include -I..
bin_PROGRAMS = mysqld_safe mysql_install_db mysql_test_run libmysql
EXTRA_DIST = netware.patch mysqld_safe_SOURCES= mysqld_safe.c my_manage.c
mysql_install_db_SOURCES= mysql_install_db.c my_manage.c
mysql_test_run_SOURCES= mysql_test_run.c my_manage.c
libmysql_SOURCES= libmysqlmain.c
libmysql_LDADD = ../libmysql/.libs/libmysqlclient.a
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
USE mysql;
CREATE TABLE db (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary 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, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User)) comment='Database privileges';
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
CREATE TABLE host (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary 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, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db)) comment='Host privileges; Merged with database privileges';
CREATE TABLE user (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(16) binary 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, Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User)) comment='Users and global privileges';
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user VALUES ('%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user (host,user) values ('localhost','');
INSERT INTO user (host,user) values ('%','');
CREATE TABLE func (name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') NOT NULL, PRIMARY KEY (name)) comment='User defined functions';
CREATE TABLE tables_priv (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(60) binary 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)) comment='Table privileges';
CREATE TABLE columns_priv (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary 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)) comment='Column privileges';
# This functionality is handled by mysql-test-run.nlm on NetWare
myodbc_remove_escape,
mysql_add_slave,
mysql_affected_rows,
mysql_change_user,
mysql_character_set_name,
mysql_close,
mysql_data_seek,
mysql_debug,
mysql_disable_reads_from_master,
mysql_disable_rpl_parse,
mysql_dump_debug_info,
mysql_enable_reads_from_master,
mysql_enable_rpl_parse,
mysql_eof,
mysql_errno,
mysql_error,
mysql_escape_string,
mysql_fetch_field,
mysql_fetch_field_direct,
mysql_fetch_fields,
mysql_fetch_lengths,
mysql_fetch_row,
mysql_field_count,
mysql_field_seek,
mysql_field_tell,
mysql_free_result,
mysql_get_client_info,
mysql_get_host_info,
mysql_get_proto_info,
mysql_get_server_info,
mysql_info,
mysql_init,
mysql_insert_id,
mysql_kill,
mysql_list_dbs,
mysql_list_fields,
mysql_list_processes,
mysql_list_tables,
mysql_manager_close,
mysql_manager_command,
mysql_manager_connect,
mysql_manager_fetch_line,
mysql_manager_init,
mysql_master_query,
mysql_master_send_query,
mysql_num_fields,
mysql_num_rows,
mysql_odbc_escape_string,
mysql_options,
mysql_ping,
mysql_query,
mysql_read_query_result,
mysql_reads_from_master_enabled,
mysql_real_connect,
mysql_real_escape_string,
mysql_real_query,
mysql_refresh,
mysql_row_seek,
mysql_row_tell,
mysql_rpl_parse_enabled,
mysql_rpl_probe,
mysql_rpl_query_type,
mysql_select_db,
mysql_send_query,
mysql_server_end,
mysql_server_init,
mysql_set_master,
mysql_shutdown,
mysql_slave_query,
mysql_slave_send_query,
mysql_ssl_set,
mysql_stat,
mysql_store_result,
mysql_thread_end,
mysql_thread_id,
mysql_thread_init,
mysql_thread_safe,
mysql_use_result,
net_safe_read,
simple_command,
mysql_connect,
mysql_create_db,
mysql_drop_db,
/*
Copyright (c) 2002 Novell, Inc. All Rights Reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "my_global.h"
my_bool init_available_charsets(myf myflags);
/* this function is required so that global memory is allocated against this
library nlm, and not against a paticular client */
int _NonAppStart(void *NLMHandle, void *errorScreen, const char *commandLine,
const char *loadDirPath, size_t uninitializedDataLength,
void *NLMFileHandle, int (*readRoutineP)( int conn, void *fileHandle,
size_t offset, size_t nbytes, size_t *bytesRead, void *buffer ),
size_t customDataOffset, size_t customDataSize, int messageCount,
const char **messages)
{
mysql_server_init(0, NULL, NULL);
init_available_charsets(MYF(0));
return 0;
}
This diff is collapsed.
/*
Copyright (c) 2002 Novell, Inc. All Rights Reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _MY_MANAGE
#define _MY_MANAGE
/******************************************************************************
includes
******************************************************************************/
#include <stdlib.h>
#include <unistd.h>
/******************************************************************************
macros
******************************************************************************/
#define ARG_MAX 50
#define TRY_MAX 5
#define init_args(al) _init_args(&al);
#define free_args(al) _free_args(&al);
/******************************************************************************
structures
******************************************************************************/
typedef struct
{
int argc;
char *argv[ARG_MAX];
} arg_list_t, * arg_list;
/******************************************************************************
global variables
******************************************************************************/
/******************************************************************************
prototypes
******************************************************************************/
void _init_args(arg_list *);
void add_arg(arg_list, char *, ...);
void _free_args(arg_list *);
int sleep_until_file_exists(char *);
int sleep_until_file_deleted(char *);
int wait_for_server_start(char *, char *, char *, int);
int spawn(char *, arg_list, int, char *, char *, char *);
int stop_server(char *, char *, char *, int, char *);
pid_t get_server_pid(char *);
void kill_server(pid_t pid);
void del_tree(char *);
int removef(char *, ...);
void get_basedir(char *, char *);
#endif /* _MY_MANAGE */
This diff is collapsed.
#-----------------------------------------------------------------------------
# Copyright (C) 2002 MySQL AB and Jeremy Cole
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# This notice applies to changes, created by or for Novell, Inc.,
# to preexisting works for which notices appear elsewhere in this file.
# Copyright (c) 2003 Novell, Inc. All Rights Reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#-----------------------------------------------------------------------------
use strict;
use Mysql;
print "MySQL Secure Installation Script\n\n";
print "NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL\n";
print " SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!\n\n";
#-----------------------------------------------------------------------------
# get the current root password
#-----------------------------------------------------------------------------
print "In order to log into MySQL to secure it, we'll need the current\n";
print "password for the root user. If you've just installed MySQL, and\n";
print "you haven't set the root password yet, the password will be blank,\n";
print "so you should just press enter here.\n\n";
print "Enter the current password for root: ";
my $password = <STDIN>;
chomp $password;
print "\n";
my $conn = Mysql->connect("localhost", "mysql", "root", $password)
|| die "Unable to connect to MySQL.";
print "OK, successfully used the password, moving on...\n\n";
#-----------------------------------------------------------------------------
# set the root password
#-----------------------------------------------------------------------------
unless ($password)
{
print "Setting the root password ensures that no one can log into MySQL\n";
print "using the root user without the proper authorization.\n\n";
print "Set root password (Y/N)? ";
my $reply = <STDIN>;
chomp $reply;
print "\n";
if ($reply =~ /Y/i)
{
print "New password for root: ";
my $pass1 = <STDIN>;
chomp $pass1;
print "\n";
print "Re-enter new password for root: ";
my $pass2 = <STDIN>;
chomp $pass2;
print "\n";
unless ($pass1 eq $pass2) { die "Sorry, the passwords do not match."; }
unless ($pass1) { die "Sorry, you can't use an empty password here."; }
$conn->query("SET PASSWORD FOR root\@localhost=PASSWORD('$pass1')")
|| die "Unable to set password.";
print "OK, successfully set the password, moving on...\n\n";
}
else
{
print "WARNING, the password is not set, moving on...\n\n";
}
}
#-----------------------------------------------------------------------------
# remove anonymous users
#-----------------------------------------------------------------------------
print "By default, a MySQL installation has anonymous users, allowing anyone\n";
print "to log into MySQL without having to have a user account created for\n";
print "them. This is intended only for testing, and to make the installation\n";
print "go a bit smoother. You should remove them before moving into a\n";
print "production environment.\n\n";
print "Remove anonymous users (Y/N)? ";
my $reply = <STDIN>;
chomp $reply;
print "\n";
if ($reply =~ /Y/i)
{
$conn->query("DELETE FROM mysql.user WHERE user=''")
|| die "Unable to remove anonymous users.";
print "OK, successfully removed anonymous users, moving on...\n\n";
}
else
{
print "WARNING, the anonymous users have not been removed, moving on...\n\n";
}
#-----------------------------------------------------------------------------
# disallow remote root login
#-----------------------------------------------------------------------------
print "Normally, root should only be allowed to connect from 'localhost'. This\n";
print "ensures that someone cannot guess at the root password from the network.\n\n";
print "Disallow remote root login (Y/N)? ";
my $reply = <STDIN>;
chomp $reply;
print "\n";
if ($reply =~ /Y/i)
{
$conn->query("DELETE FROM mysql.user WHERE user='root' AND host!='localhost'")
|| die "Unable to disallow remote root login.";
print "OK, successfully disallowed remote root login, moving on...\n\n";
}
else
{
print "WARNING, remote root login has not been disallowed, moving on...\n\n";
}
#-----------------------------------------------------------------------------
# remove test database
#-----------------------------------------------------------------------------
print "By default, MySQL comes with a database named 'test' that anyone can\n";
print "access. This is intended only for testing, and should be removed\n";
print "before moving into a production environment.\n\n";
print "Remove the test database (Y/N)? ";
my $reply = <STDIN>;
chomp $reply;
print "\n";
if ($reply =~ /Y/i)
{
$conn->query("DROP DATABASE IF EXISTS test")
|| die "Unable to remove test database.";
$conn->query("DELETE FROM mysql.db WHERE db='test' OR db='test\\_%'")
|| die "Unable to remove access to the test database.";
print "OK, successfully removed the test database, moving on...\n\n";
}
else
{
print "WARNING, the test database has not been removed, moving on...\n\n";
}
#-----------------------------------------------------------------------------
# reload privilege tables
#-----------------------------------------------------------------------------
print "Reloading the privilege tables will ensure that all changes made so far\n";
print "will take effect immediately.\n\n";
print "Reload privilege tables (Y/N)? ";
my $reply = <STDIN>;
chomp $reply;
print "\n";
if ($reply =~ /Y/i)
{
$conn->query("FLUSH PRIVILEGES")
|| die "Unable to reload privilege tables.";
print "OK, successfully reloaded privilege tables, moving on...\n\n";
}
else
{
print "WARNING, the privilege tables have not been reloaded, moving on...\n\n";
}
#-----------------------------------------------------------------------------
# done
#-----------------------------------------------------------------------------
print "\n\nAll done! If you've completed all of the above steps, your MySQL\n";
print "installation should now be secure.\n\n";
print "Thanks for using MySQL!\n\n";
This diff is collapsed.
This diff is collapsed.
USE mysql;
CREATE TABLE db (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary 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, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User)) comment='Database privileges';
CREATE TABLE host (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary 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, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db)) comment='Host privileges; Merged with database privileges';
CREATE TABLE user (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(16) binary 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, Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User)) comment='Users and global privileges';
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
CREATE TABLE func (name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') NOT NULL, PRIMARY KEY (name)) comment='User defined functions';
CREATE TABLE tables_priv (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(60) binary 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)) comment='Table privileges';
CREATE TABLE columns_priv (Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary 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)) comment='Column privileges';
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment