Fixes for binary distribution in tar file
- mysql_install_db doesn't require --basedir option anymore - Fix that mysql_install_db mysqld_safe mysql_fix_privilege_tables has right paths for tar binary install - Move some files from share/mysql to where they have always been (1.0 - 5.0) - Move scripts used when installing MariaDB to the scripts directory (Added symlinks in old place for compatibility) - Move man files to 'man' (from 'share/man') - Ensure that all scripts are executable mysql_secure_installation.sh - Added support for --basedir flag - Don't assume that the mysql binary is in the path Other: - Fixed crash when one got kill signal during bootstrap Docs/INSTALL-BINARY: Change references from MySQL to MariaDB Docs/mysql.info: Change references from MySQL to MariaDB README: Removed duplicate row configure.in: Change references from MySQL to MariaDB libmysql/libmysql.c: Assume that if version string contains '-maria-' we are also using MariaDB scripts/make_binary_distribution.sh: Fix that mysql_install_db mysqld_safe mysql_fix_privilege_tables has right paths for tar binary install Remove some files that should not be part of a MariaDB binary install Move some files from share/mysql to where they have always been (1.0 - 5.0) Move man files to 'man' (from 'share/man') Move scripts used when installing MariaDB to the scripts directory (Added symlinks in old place for compatibility) Removed generation of 'netware/init_db.sql', as it was never used Remove old reference to bk tree scripts/mysql_secure_installation.sh: Added support for --basedir flag Don't assume that the mysql binary is in the path Use .my.cnf files Removed a lot of useless 'echo' rows sql/mysqld.cc: Fixed crash when one got kill signal during bootstrap storage/maria/Makefile.am: Don't add internal test files to binary distributions storage/myisam/Makefile.am: Don't add internal test files to binary distributions support-files/Makefile.am: Make scripts executable support-files/config.huge.ini.sh: Removed execution bit support-files/config.medium.ini.sh: Removed execution bit support-files/config.small.ini.sh: Removed execution bit support-files/mysql.server.sh: Ensure this works also mysqld is in the 'bin' directory
This commit is contained in:
parent
1b7d4b37b4
commit
afd0a45639
@ -1,25 +1,20 @@
|
|||||||
|
MariaDB and MySQL have identical install methods. In this document we
|
||||||
|
describe how to install MariaDB; However all documentation at www.mysql.com
|
||||||
|
also applies.
|
||||||
|
|
||||||
2.9. Installing MySQL from tar.gz Packages on Other Unix-Like Systems
|
|
||||||
|
|
||||||
This section covers the installation of MySQL binary distributions
|
2.9. Installing MariaDB from tar.gz Packages on Other Unix-Like Systems
|
||||||
|
|
||||||
|
This section covers the installation of MariaDB binary distributions
|
||||||
that are provided for various platforms in the form of compressed
|
that are provided for various platforms in the form of compressed
|
||||||
tar files (files with a .tar.gz extension). See Section 2.1.2.4,
|
tar files (files with a .tar.gz extension).
|
||||||
"MySQL Binaries Compiled by Sun Microsystems, Inc.," for a
|
|
||||||
detailed list.
|
|
||||||
|
|
||||||
To obtain MySQL, see Section 2.1.3, "How to Get MySQL."
|
MariaDB tar file binary distributions have names of the form
|
||||||
|
mariadb-VERSION-OS.tar.gz, where VERSION is a number (for example,
|
||||||
MySQL tar file binary distributions have names of the form
|
|
||||||
mysql-VERSION-OS.tar.gz, where VERSION is a number (for example,
|
|
||||||
5.1.39), and OS indicates the type of operating system for which
|
5.1.39), and OS indicates the type of operating system for which
|
||||||
the distribution is intended (for example, pc-linux-i686).
|
the distribution is intended (for example, pc-linux-i686).
|
||||||
|
|
||||||
In addition to these generic packages, we also offer binaries in
|
You need the following tools to install a MariaDB tar file binary
|
||||||
platform-specific package formats for selected platforms. See
|
|
||||||
Section 2.2, "Standard MySQL Installation Using a Binary
|
|
||||||
Distribution," for more information on how to install these.
|
|
||||||
|
|
||||||
You need the following tools to install a MySQL tar file binary
|
|
||||||
distribution:
|
distribution:
|
||||||
|
|
||||||
* GNU gunzip to uncompress the distribution.
|
* GNU gunzip to uncompress the distribution.
|
||||||
@ -33,11 +28,14 @@
|
|||||||
program. On other systems with a deficient tar, you should
|
program. On other systems with a deficient tar, you should
|
||||||
install GNU tar first.
|
install GNU tar first.
|
||||||
|
|
||||||
If you run into problems and need to file a bug report, please use
|
If you run into problems and need to file a bug report,
|
||||||
the instructions in Section 1.6, "How to Report Bugs or Problems."
|
please report them to: http://bugs.launchpad.net/maria
|
||||||
|
|
||||||
|
See the instructions in Section 1.6, "How to Report Bugs or Problems."
|
||||||
|
|
||||||
The basic commands that you must execute to install and use a
|
The basic commands that you must execute to install and use a
|
||||||
MySQL binary distribution are:
|
MariaDB binary distribution are:
|
||||||
|
|
||||||
shell> groupadd mysql
|
shell> groupadd mysql
|
||||||
shell> useradd -g mysql mysql
|
shell> useradd -g mysql mysql
|
||||||
shell> cd /usr/local
|
shell> cd /usr/local
|
||||||
@ -53,7 +51,7 @@ shell> bin/mysqld_safe --user=mysql &
|
|||||||
|
|
||||||
Note
|
Note
|
||||||
|
|
||||||
This procedure does not set up any passwords for MySQL accounts.
|
This procedure does not set up any passwords for MariaDB accounts.
|
||||||
After following the procedure, proceed to Section 2.11,
|
After following the procedure, proceed to Section 2.11,
|
||||||
"Post-Installation Setup and Testing."
|
"Post-Installation Setup and Testing."
|
||||||
|
|
||||||
@ -80,8 +78,8 @@ shell> useradd -g mysql mysql
|
|||||||
shell> cd /usr/local
|
shell> cd /usr/local
|
||||||
|
|
||||||
3. Obtain a distribution file using the instructions in Section
|
3. Obtain a distribution file using the instructions in Section
|
||||||
2.1.3, "How to Get MySQL." For a given release, binary
|
2.1.3, "How to Get MariaDB." For a given release, binary
|
||||||
distributions for all platforms are built from the same MySQL
|
distributions for all platforms are built from the same MariaDB
|
||||||
source distribution.
|
source distribution.
|
||||||
|
|
||||||
4. Unpack the distribution, which creates the installation
|
4. Unpack the distribution, which creates the installation
|
||||||
@ -106,7 +104,7 @@ shell> cd mysql
|
|||||||
+ The bin directory contains client programs and the
|
+ The bin directory contains client programs and the
|
||||||
server. You should add the full path name of this
|
server. You should add the full path name of this
|
||||||
directory to your PATH environment variable so that your
|
directory to your PATH environment variable so that your
|
||||||
shell finds the MySQL programs properly. See Section
|
shell finds the MariaDB programs properly. See Section
|
||||||
2.14, "Environment Variables."
|
2.14, "Environment Variables."
|
||||||
|
|
||||||
+ The scripts directory contains the mysql_install_db
|
+ The scripts directory contains the mysql_install_db
|
||||||
@ -126,8 +124,8 @@ shell> chgrp -R mysql .
|
|||||||
the mysql user. The second changes the group attribute to the
|
the mysql user. The second changes the group attribute to the
|
||||||
mysql group.
|
mysql group.
|
||||||
|
|
||||||
7. If you have not installed MySQL before, you must create the
|
7. If you have not installed MariaDB before, you must create the
|
||||||
MySQL data directory and initialize the grant tables:
|
MariaDB data directory and initialize the grant tables:
|
||||||
shell> scripts/mysql_install_db --user=mysql
|
shell> scripts/mysql_install_db --user=mysql
|
||||||
If you run the command as root, include the --user option as
|
If you run the command as root, include the --user option as
|
||||||
shown. If you run the command while logged in as that user,
|
shown. If you run the command while logged in as that user,
|
||||||
@ -137,25 +135,26 @@ shell> scripts/mysql_install_db --user=mysql
|
|||||||
After creating or updating the grant tables, you need to
|
After creating or updating the grant tables, you need to
|
||||||
restart the server manually.
|
restart the server manually.
|
||||||
|
|
||||||
8. Most of the MySQL installation can be owned by root if you
|
8. Most of the MariaDB installation can be owned by root if you
|
||||||
like. The exception is that the data directory must be owned
|
like. The exception is that the data directory must be owned
|
||||||
by mysql. To accomplish this, run the following commands as
|
by mysql. To accomplish this, run the following commands as
|
||||||
root in the installation directory:
|
root in the installation directory:
|
||||||
|
|
||||||
shell> chown -R root .
|
shell> chown -R root .
|
||||||
shell> chown -R mysql data
|
shell> chown -R mysql data
|
||||||
|
|
||||||
9. If you want MySQL to start automatically when you boot your
|
9. If you want MariaDB to start automatically when you boot your
|
||||||
machine, you can copy support-files/mysql.server to the
|
machine, you can copy support-files/mysql.server to the
|
||||||
location where your system has its startup files. More
|
location where your system has its startup files. More
|
||||||
information can be found in the support-files/mysql.server
|
information can be found in the support-files/mysql.server
|
||||||
script itself and in Section 2.11.2.2, "Starting and Stopping
|
script itself and in Section 2.11.2.2, "Starting and Stopping
|
||||||
MySQL Automatically."
|
MariaDB Automatically."
|
||||||
10. You can set up new accounts using the bin/mysql_setpermission
|
10. You can set up new accounts using the bin/mysql_setpermission
|
||||||
script if you install the DBI and DBD::mysql Perl modules. See
|
script if you install the DBI and DBD::mysql Perl modules. See
|
||||||
Section 4.6.14, "mysql_setpermission --- Interactively Set
|
Section 4.6.14, "mysql_setpermission --- Interactively Set
|
||||||
Permissions in Grant Tables." For Perl module installation
|
Permissions in Grant Tables." For Perl module installation
|
||||||
instructions, see Section 2.15, "Perl Installation Notes."
|
instructions, see Section 2.15, "Perl Installation Notes."
|
||||||
11. If you would like to use mysqlaccess and have the MySQL
|
11. If you would like to use mysqlaccess and have the MariaDB
|
||||||
distribution in some nonstandard location, you must change the
|
distribution in some nonstandard location, you must change the
|
||||||
location where mysqlaccess expects to find the mysql client.
|
location where mysqlaccess expects to find the mysql client.
|
||||||
Edit the bin/mysqlaccess script at approximately line 18.
|
Edit the bin/mysqlaccess script at approximately line 18.
|
||||||
@ -166,7 +165,7 @@ $MYSQL = '/usr/local/bin/mysql'; # path to mysql executable
|
|||||||
error will occur when you run mysqlaccess.
|
error will occur when you run mysqlaccess.
|
||||||
|
|
||||||
After everything has been unpacked and installed, you should test
|
After everything has been unpacked and installed, you should test
|
||||||
your distribution. To start the MySQL server, use the following
|
your distribution. To start the MariaDB server, use the following
|
||||||
command:
|
command:
|
||||||
shell> bin/mysqld_safe --user=mysql &
|
shell> bin/mysqld_safe --user=mysql &
|
||||||
|
|
||||||
@ -185,7 +184,7 @@ shell> bin/mysqld_safe --user=mysql &
|
|||||||
|
|
||||||
Note
|
Note
|
||||||
|
|
||||||
The accounts that are listed in the MySQL grant tables initially
|
The accounts that are listed in the MariaDB grant tables initially
|
||||||
have no passwords. After starting the server, you should set up
|
have no passwords. After starting the server, you should set up
|
||||||
passwords for them using the instructions in Section 2.11,
|
passwords for them using the instructions in Section 2.11,
|
||||||
"Post-Installation Setup and Testing."
|
"Post-Installation Setup and Testing."
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
MariaDB is in most aspects identical to MySQL.
|
||||||
|
|
||||||
|
Differences between MySQL and MariaDB can be found at:
|
||||||
|
http://askmonty.org/wiki/index.php/MariaDB_versus_MySQL
|
||||||
|
|
||||||
|
The MariaDB references manual can be found at:
|
||||||
|
http://askmonty.org/wiki/index.php/Manual
|
||||||
|
|
||||||
The MySQL Reference Manual is available in various formats on
|
The MySQL Reference Manual is available in various formats on
|
||||||
http://dev.mysql.com/doc; if you're interested in the DocBook XML
|
http://dev.mysql.com/doc; if you're interested in the DocBook XML
|
||||||
|
1
README
1
README
@ -1,5 +1,4 @@
|
|||||||
This is a release of MariaDB, a branch of MySQL.
|
This is a release of MariaDB, a branch of MySQL.
|
||||||
MySQL is brought to you by the MySQL team at Sun Microsystems, Inc.
|
|
||||||
|
|
||||||
MariaDB is a drop-in replacement of MySQL, with more features, less
|
MariaDB is a drop-in replacement of MySQL, with more features, less
|
||||||
bugs and better performance.
|
bugs and better performance.
|
||||||
|
10
configure.in
10
configure.in
@ -2897,13 +2897,11 @@ AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' C
|
|||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the"
|
echo "You can find information about MariaDB at"
|
||||||
echo "latest release, upcoming features, and other information to make your"
|
echo http://askmonty.org/wiki/index.php/MariaDB
|
||||||
echo "work or play with MySQL more productive. There you can also find"
|
|
||||||
echo "information about mailing lists for MySQL discussion."
|
|
||||||
echo
|
echo
|
||||||
echo "Remember to check the platform specific part of the reference manual for"
|
echo "Remember to check the platform specific part of the reference manual for"
|
||||||
echo "hints about installing MySQL on your platform. Also have a look at the"
|
echo "hints about installing MariaDB on your platform. Also have a look at the"
|
||||||
echo "files in the Docs directory."
|
echo "files in the Docs directory."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@ -2922,5 +2920,5 @@ echo "---"
|
|||||||
|
|
||||||
# The following text is checked in ./Do-compile to verify that configure
|
# The following text is checked in ./Do-compile to verify that configure
|
||||||
# ended sucessfully - don't remove it.
|
# ended sucessfully - don't remove it.
|
||||||
echo "Thank you for choosing MySQL!"
|
echo "Thank you for choosing MariaDB!"
|
||||||
echo
|
echo
|
||||||
|
@ -1432,7 +1432,8 @@ mysql_get_server_info(MYSQL *mysql)
|
|||||||
|
|
||||||
my_bool STDCALL mariadb_connection(MYSQL *mysql)
|
my_bool STDCALL mariadb_connection(MYSQL *mysql)
|
||||||
{
|
{
|
||||||
return strinstr(mysql->server_version, "MariaDB") != 0;
|
return (strinstr(mysql->server_version, "MariaDB") != 0 ||
|
||||||
|
strinstr(mysql->server_version, "-maria-") != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * STDCALL
|
const char * STDCALL
|
||||||
|
@ -239,8 +239,8 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then
|
|||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
cd scripts
|
cd scripts
|
||||||
rm -f mysql_install_db
|
rm -f mysql_install_db mysqld_safe mysql_fix_privilege_tables
|
||||||
@MAKE@ mysql_install_db \
|
@MAKE@ mysql_install_db mysqld_safe mysql_fix_privilege_tables \
|
||||||
prefix=. \
|
prefix=. \
|
||||||
bindir=./bin \
|
bindir=./bin \
|
||||||
sbindir=./bin \
|
sbindir=./bin \
|
||||||
@ -257,7 +257,7 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then
|
|||||||
sbindir=./bin \
|
sbindir=./bin \
|
||||||
scriptdir=./bin \
|
scriptdir=./bin \
|
||||||
libexecdir=./bin \
|
libexecdir=./bin \
|
||||||
pkgdatadir=@pkgdatadir@
|
pkgdatadir=./share
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
@ -320,6 +320,33 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then
|
|||||||
mkdir $DEST/data $DEST/data/mysql $DEST/data/test
|
mkdir $DEST/data $DEST/data/mysql $DEST/data/test
|
||||||
chmod o-rwx $DEST/data $DEST/data/mysql $DEST/data/test
|
chmod o-rwx $DEST/data $DEST/data/mysql $DEST/data/test
|
||||||
|
|
||||||
|
# Remove not needed files
|
||||||
|
rm $DEST/share/mysql/errmsg.txt
|
||||||
|
|
||||||
|
# Remove NDB files
|
||||||
|
rm -f $DEST/share/mysql/ndb-config-2-node.ini \
|
||||||
|
$DEST/share/mysql/config*
|
||||||
|
|
||||||
|
#
|
||||||
|
# Move things to make them easier to find in tar installation
|
||||||
|
#
|
||||||
|
mv $DEST/libexec/* $DEST/bin
|
||||||
|
mv $DEST/share/man $DEST
|
||||||
|
mv $DEST/share/mysql/binary-configure $DEST/configure
|
||||||
|
mv $DEST/share/mysql/*.sql $DEST/share
|
||||||
|
mv $DEST/share/mysql/*.cnf $DEST/share/mysql/*.server $DEST/share/mysql/mysql-log-rotate $DEST/support-files
|
||||||
|
rmdir $DEST/libexec
|
||||||
|
|
||||||
|
#
|
||||||
|
# Move some scripts that are only run once to 'scripts' directory
|
||||||
|
# but add symbolic links instead to old place for compatibility
|
||||||
|
#
|
||||||
|
for i in mysql_secure_installation mysql_fix_extensions mysql_fix_privilege_tables
|
||||||
|
do
|
||||||
|
mv $DEST/bin/$i $DEST/scripts
|
||||||
|
ln -s "../scripts/$i" $DEST/bin/$i
|
||||||
|
done
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# Create the result tar file
|
# Create the result tar file
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
@ -496,12 +523,21 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh \
|
|||||||
$BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution \
|
$BASE/bin/mysql_install_db $BASE/bin/make_binary_distribution \
|
||||||
$BASE/bin/make_win_* \
|
$BASE/bin/make_win_* \
|
||||||
$BASE/bin/setsomevars $BASE/support-files/Makefile* \
|
$BASE/bin/setsomevars $BASE/support-files/Makefile* \
|
||||||
$BASE/support-files/*.sh
|
$BASE/support-files/*.sh \
|
||||||
|
$BASE/share/mysql/errmsg.txt
|
||||||
|
|
||||||
|
# Remove NDB files
|
||||||
|
rm -f $BASE/share/ndb-config-2-node.ini \
|
||||||
|
$BASE/share/mysql/config*
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copy system dependent files
|
# Move things to make things easier to find in tar installation
|
||||||
#
|
#
|
||||||
./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql
|
|
||||||
|
mv $BASE/share/man $BASE
|
||||||
|
mv $BASE/share/mysql/binary-configure $BASE/configure
|
||||||
|
mv $BASE/share/mysql/*.sql $BASE/share
|
||||||
|
mv $BASE/share/mysql/*.cnf $BASE/share/mysql/*.server $BASE/share/mysql/mysql-log-rotate $BASE/support-files
|
||||||
|
|
||||||
#
|
#
|
||||||
# Remove system dependent files
|
# Remove system dependent files
|
||||||
@ -515,12 +551,6 @@ rm -f $BASE/support-files/magic \
|
|||||||
$BASE/support-files/MySQL-shared-compat.spec \
|
$BASE/support-files/MySQL-shared-compat.spec \
|
||||||
$BASE/INSTALL-BINARY
|
$BASE/INSTALL-BINARY
|
||||||
|
|
||||||
# Clean up if we did this from a bk tree
|
|
||||||
if [ -d $BASE/sql-bench/SCCS ] ; then
|
|
||||||
find $BASE/share -name SCCS -print | xargs rm -rf
|
|
||||||
find $BASE/sql-bench -name SCCS -print | xargs rm -rf
|
|
||||||
fi
|
|
||||||
|
|
||||||
BASE2=$TMP/$NEW_NAME
|
BASE2=$TMP/$NEW_NAME
|
||||||
rm -rf $BASE2
|
rm -rf $BASE2
|
||||||
mv $BASE $BASE2
|
mv $BASE $BASE2
|
||||||
|
@ -23,6 +23,157 @@ trap "interrupt" 2
|
|||||||
rootpass=""
|
rootpass=""
|
||||||
echo_n=
|
echo_n=
|
||||||
echo_c=
|
echo_c=
|
||||||
|
basedir=
|
||||||
|
bindir=
|
||||||
|
|
||||||
|
parse_arg()
|
||||||
|
{
|
||||||
|
echo "$1" | sed -e 's/^[^=]*=//'
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_arguments()
|
||||||
|
{
|
||||||
|
# We only need to pass arguments through to the server if we don't
|
||||||
|
# handle them here. So, we collect unrecognized options (passed on
|
||||||
|
# the command line) into the args variable.
|
||||||
|
pick_args=
|
||||||
|
if test "$1" = PICK-ARGS-FROM-ARGV
|
||||||
|
then
|
||||||
|
pick_args=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
--basedir=*) basedir=`parse_arg "$arg"` ;;
|
||||||
|
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
|
||||||
|
defaults="$arg" ;;
|
||||||
|
*)
|
||||||
|
if test -n "$pick_args"
|
||||||
|
then
|
||||||
|
# This sed command makes sure that any special chars are quoted,
|
||||||
|
# so the arg gets passed exactly to the server.
|
||||||
|
# XXX: This is broken; true fix requires using eval and proper
|
||||||
|
# quoting of every single arg ($basedir, $ldata, etc.)
|
||||||
|
#args="$args "`echo "$arg" | sed -e 's,\([^a-zA-Z0-9_.-]\),\\\\\1,g'`
|
||||||
|
args="$args $arg"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Try to find a specific file within --basedir which can either be a binary
|
||||||
|
# release or installed source directory and return the path.
|
||||||
|
find_in_basedir()
|
||||||
|
{
|
||||||
|
return_dir=
|
||||||
|
case "$1" in
|
||||||
|
--dir)
|
||||||
|
return_dir=1; shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
file=$1; shift
|
||||||
|
|
||||||
|
for dir in "$@"
|
||||||
|
do
|
||||||
|
if test -f "$basedir/$dir/$file"
|
||||||
|
then
|
||||||
|
if test -n "$return_dir"
|
||||||
|
then
|
||||||
|
echo "$basedir/$dir"
|
||||||
|
else
|
||||||
|
echo "$basedir/$dir/$file"
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
cannot_find_file()
|
||||||
|
{
|
||||||
|
echo
|
||||||
|
echo "FATAL ERROR: Could not find $1"
|
||||||
|
|
||||||
|
shift
|
||||||
|
if test $# -ne 0
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "The following directories were searched:"
|
||||||
|
echo
|
||||||
|
for dir in "$@"
|
||||||
|
do
|
||||||
|
echo " $dir"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "If you compiled from source, you need to run 'make install' to"
|
||||||
|
echo "copy the software into the correct location ready for operation."
|
||||||
|
echo
|
||||||
|
echo "If you are using a binary release, you must either be at the top"
|
||||||
|
echo "level of the extracted archive, or pass the --basedir option"
|
||||||
|
echo "pointing to that location."
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ok, let's go. We first need to parse arguments which are required by
|
||||||
|
# my_print_defaults so that we can execute it first, then later re-parse
|
||||||
|
# the command line to add any extra bits that we need.
|
||||||
|
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
|
|
||||||
|
#
|
||||||
|
# We can now find my_print_defaults. This script supports:
|
||||||
|
#
|
||||||
|
# --srcdir=path pointing to compiled source tree
|
||||||
|
# --basedir=path pointing to installed binary location
|
||||||
|
#
|
||||||
|
# or default to compiled-in locations.
|
||||||
|
#
|
||||||
|
|
||||||
|
if test -n "$basedir"
|
||||||
|
then
|
||||||
|
print_defaults=`find_in_basedir my_print_defaults bin extra`
|
||||||
|
echo "print: $print_defaults"
|
||||||
|
if test -z "$print_defaults"
|
||||||
|
then
|
||||||
|
cannot_find_file my_print_defaults $basedir/bin $basedir/extra
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
print_defaults="@bindir@/my_print_defaults"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -x "$print_defaults"
|
||||||
|
then
|
||||||
|
cannot_find_file "$print_defaults"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Now we can get arguments from the group [client]
|
||||||
|
# in the my.cfg file, then re-run to merge with command line arguments.
|
||||||
|
parse_arguments `$print_defaults $defaults client`
|
||||||
|
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
|
|
||||||
|
# Configure paths to support files
|
||||||
|
if test -n "$basedir"
|
||||||
|
then
|
||||||
|
bindir="$basedir/bin"
|
||||||
|
elif test -f "./bin/mysql"
|
||||||
|
then
|
||||||
|
bindir="./bin"
|
||||||
|
else
|
||||||
|
bindir="@bindir@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mysql_command=`find_in_basedir mysql $bindir`
|
||||||
|
if test -z "$print_defaults"
|
||||||
|
then
|
||||||
|
cannot_find_file mysql $bindir
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
set_echo_compat() {
|
set_echo_compat() {
|
||||||
case `echo "testing\c"`,`echo -n testing` in
|
case `echo "testing\c"`,`echo -n testing` in
|
||||||
@ -39,7 +190,7 @@ prepare() {
|
|||||||
|
|
||||||
do_query() {
|
do_query() {
|
||||||
echo $1 >$command
|
echo $1 >$command
|
||||||
mysql --defaults-file=$config <$command
|
$bindir/mysql --defaults-file=$config <$command
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,15 +335,10 @@ cleanup() {
|
|||||||
prepare
|
prepare
|
||||||
set_echo_compat
|
set_echo_compat
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo
|
echo
|
||||||
echo "NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL"
|
echo "NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL"
|
||||||
echo " SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!"
|
echo " SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!"
|
||||||
echo
|
echo
|
||||||
echo
|
|
||||||
|
|
||||||
echo "In order to log into MySQL to secure it, we'll need the current"
|
echo "In order to log into MySQL to secure it, we'll need the current"
|
||||||
echo "password for the root user. If you've just installed MySQL, and"
|
echo "password for the root user. If you've just installed MySQL, and"
|
||||||
echo "you haven't set the root password yet, the password will be blank,"
|
echo "you haven't set the root password yet, the password will be blank,"
|
||||||
@ -309,14 +455,9 @@ echo
|
|||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo
|
echo
|
||||||
echo "All done! If you've completed all of the above steps, your MySQL"
|
echo "All done! If you've completed all of the above steps, your MySQL"
|
||||||
echo "installation should now be secure."
|
echo "installation should now be secure."
|
||||||
echo
|
echo
|
||||||
echo "Thanks for using MySQL!"
|
echo "Thanks for using MySQL!"
|
||||||
echo
|
|
||||||
echo
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4560,7 +4560,13 @@ we force server id to 2, but this MySQL server will not act as a slave.");
|
|||||||
{
|
{
|
||||||
select_thread_in_use= 0; // Allow 'kill' to work
|
select_thread_in_use= 0; // Allow 'kill' to work
|
||||||
bootstrap(stdin);
|
bootstrap(stdin);
|
||||||
unireg_abort(bootstrap_error ? 1 : 0);
|
if (!kill_in_progress)
|
||||||
|
unireg_abort(bootstrap_error ? 1 : 0);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sleep(2); // Wait for kill
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (opt_init_file)
|
if (opt_init_file)
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ SUBDIRS = . unittest
|
|||||||
|
|
||||||
EXTRA_DIST = ma_test_all.sh ma_test_all.res ma_test_big.sh \
|
EXTRA_DIST = ma_test_all.sh ma_test_all.res ma_test_big.sh \
|
||||||
ma_ft_stem.c CMakeLists.txt plug.in ma_test_recovery
|
ma_ft_stem.c CMakeLists.txt plug.in ma_test_recovery
|
||||||
pkgdata_DATA = ma_test_all ma_test_all.res ma_test_recovery
|
pkgdata_DATA =
|
||||||
pkglib_LIBRARIES = libmaria.a
|
pkglib_LIBRARIES = libmaria.a
|
||||||
bin_PROGRAMS = maria_chk maria_pack maria_ftdump maria_read_log \
|
bin_PROGRAMS = maria_chk maria_pack maria_ftdump maria_read_log \
|
||||||
maria_dump_log
|
maria_dump_log
|
||||||
|
@ -28,7 +28,7 @@ LDADD =
|
|||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
|
||||||
EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in
|
EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in
|
||||||
pkgdata_DATA = mi_test_all mi_test_all.res
|
pkgdata_DATA =
|
||||||
|
|
||||||
pkglib_LIBRARIES = libmyisam.a
|
pkglib_LIBRARIES = libmyisam.a
|
||||||
bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump
|
bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump
|
||||||
|
@ -53,7 +53,9 @@ pkgsupp_DATA = my-small.cnf \
|
|||||||
ndb-config-2-node.ini
|
ndb-config-2-node.ini
|
||||||
|
|
||||||
pkgsupp_SCRIPTS = mysql.server \
|
pkgsupp_SCRIPTS = mysql.server \
|
||||||
mysqld_multi.server
|
mysqld_multi.server \
|
||||||
|
binary-configure \
|
||||||
|
mysql-log-rotate
|
||||||
|
|
||||||
aclocaldir = $(datadir)/aclocal
|
aclocaldir = $(datadir)/aclocal
|
||||||
aclocal_DATA = mysql.m4
|
aclocal_DATA = mysql.m4
|
||||||
|
0
support-files/config.huge.ini.sh
Executable file → Normal file
0
support-files/config.huge.ini.sh
Executable file → Normal file
0
support-files/config.medium.ini.sh
Executable file → Normal file
0
support-files/config.medium.ini.sh
Executable file → Normal file
0
support-files/config.small.ini.sh
Executable file → Normal file
0
support-files/config.small.ini.sh
Executable file → Normal file
@ -77,7 +77,12 @@ else
|
|||||||
datadir="$basedir/data"
|
datadir="$basedir/data"
|
||||||
fi
|
fi
|
||||||
sbindir="$basedir/sbin"
|
sbindir="$basedir/sbin"
|
||||||
libexecdir="$basedir/libexec"
|
if test -f "$basedir/bin/mysqld"
|
||||||
|
then
|
||||||
|
libexecdir="$basedir/bin"
|
||||||
|
else
|
||||||
|
libexecdir="$basedir/libexec"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# datadir_set is used to determine if datadir was set (and so should be
|
# datadir_set is used to determine if datadir was set (and so should be
|
||||||
@ -126,6 +131,12 @@ parse_server_arguments() {
|
|||||||
datadir="$basedir/data"
|
datadir="$basedir/data"
|
||||||
fi
|
fi
|
||||||
sbindir="$basedir/sbin"
|
sbindir="$basedir/sbin"
|
||||||
|
if test -f "$basedir/bin/mysqld"
|
||||||
|
then
|
||||||
|
libexecdir="$basedir/bin"
|
||||||
|
else
|
||||||
|
libexecdir="$basedir/libexec"
|
||||||
|
fi
|
||||||
libexecdir="$basedir/libexec"
|
libexecdir="$basedir/libexec"
|
||||||
;;
|
;;
|
||||||
--datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'`
|
--datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user