Skip to content

Commit

Permalink
Change MySQL -> MariaDB inc scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
montywi committed Aug 9, 2014
1 parent 3bde139 commit b4c74e2
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 68 deletions.
4 changes: 2 additions & 2 deletions scripts/make_binary_distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ set -e
if test -f ./client/.libs/mysql
then
echo ""
echo "The MySQL clients are compiled dynamicly, which is not allowed for"
echo "a MySQL binary tar file. Please configure with"
echo "The MariaDB clients are compiled dynamically, which is not allowed for"
echo "a MariaDB binary tar file. Please configure with"
echo "--with-client-ldflags=-all-static and try again"
exit 1;
fi
Expand Down
4 changes: 2 additions & 2 deletions scripts/mysql_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

# This script reports various configuration settings that may be needed
# when using the MySQL client library.
# when using the MariaDB client library.

which ()
{
Expand All @@ -39,7 +39,7 @@ which ()
#
# If we can find the given directory relatively to where mysql_config is
# we should use this instead of the incompiled one.
# This is to ensure that this script also works with the binary MySQL
# This is to ensure that this script also works with the binary MariaDB
# version

fix_path ()
Expand Down
2 changes: 1 addition & 1 deletion scripts/mysql_convert_table_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ sub usage

print <<EOF;
Conversion of a MySQL tables to other storage engines
Conversion of a MariaDB tables to other storage engines
Usage: $0 database [table[ table ...]]
If no tables has been specifed, all tables in the database will be converted.
Expand Down
2 changes: 1 addition & 1 deletion scripts/mysql_find_rows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ $0 Ver $version
Prints all SQL queries that matches a regexp or contains a 'use
database' or 'set ..' command to stdout. A SQL query may contain
newlines. This is useful to find things in a MySQL update log.
newlines. This is useful to find things in a MariaDB update log.
$0 takes the following options:
Expand Down
6 changes: 3 additions & 3 deletions scripts/mysql_fix_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA

# This is a utility for MySQL. It is not needed by any standard part
# of MySQL.
# This is a utility for MariaDB. It is not needed by any standard part
# of MariaDB.

# Usage: mysql_fix_extentions datadir
# Usage: mysql_fix_extensions datadir
# does not work with RAID, with InnoDB or BDB tables
# makes .frm lowercase and .MYI/MYD/ISM/ISD uppercase
# useful when datafiles are copied from windows
Expand Down
18 changes: 9 additions & 9 deletions scripts/mysql_setpermission.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ else
if ($opt_password eq '')
{
system "stty -echo";
print "Password for user $opt_user to connect to MySQL: ";
print "Password for user $opt_user to connect to MariaDB: ";
$opt_password = <STDIN>;
chomp($opt_password);
system "stty echo";
print "\n";
}


# make the connection to MySQL
# make the connection to MariaDB
$dbh= DBI->connect("DBI:mysql:mysql:host=$sqlhost:port=$opt_port:mysql_socket=$opt_socket",$opt_user,$opt_password, {PrintError => 0}) ||
die("Can't make a connection to the mysql server.\n The error: $DBI::errstr");

Expand All @@ -106,7 +106,7 @@ sub q1 { # first question ...
while (! $end) {
print "#"x70;
print "\n";
print "## Welcome to the permission setter $version for MySQL.\n";
print "## Welcome to the permission setter $version for MariaDB.\n";
print "## made by Luuk de Boer\n";
print "#"x70;
print "\n";
Expand Down Expand Up @@ -634,17 +634,17 @@ sub usage
{
print <<EOL;
----------------------------------------------------------------------
The permission setter for MySQL.
The permission setter for MariaDB.
version: $version
made by: Luuk de Boer <luuk\@wxs.nl>
----------------------------------------------------------------------
The permission setter is a little program which can help you add users
or databases or change passwords in MySQL. Keep in mind that we don't
check permissions which already been set in MySQL. So if you can't
connect to MySQL using the permission you just added, take a look at
the permissions which have already been set in MySQL.
or databases or change passwords in MariaDB. Keep in mind that we don't
check permissions which already been set in MariaDB. So if you can't
connect to MariaDB using the permission you just added, take a look at
the permissions which have already been set in MariaDB.
The permission setter first reads your .my.cnf file in your Home
directory if it exists.
Expand All @@ -653,7 +653,7 @@ Options for the permission setter:
--help : print this help message and exit.
The options shown below are used for making the connection to the MySQL
The options shown below are used for making the connection to the MariaDB
server. Keep in mind that the permissions for the user specified via
these options must be sufficient to add users / create databases / set
passwords.
Expand Down
4 changes: 2 additions & 2 deletions scripts/mysql_zap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

# This is a utility for MySQL. It is not needed by any standard part
# of MySQL.
# This is a utility for MariaDB. It is not needed by any standard part
# of MariaDB.

# Usage: mysql_zap [-signal] [-f] [-t] pattern

Expand Down
6 changes: 3 additions & 3 deletions scripts/mysqlaccess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BEGIN {
$script_log = $ENV{'HOME'}."/$script.log";

# ****************************
# information on MySQL
# information on MariaDB
$MYSQL = '@bindir@/mysql'; # path to mysql executable
$SERVER = '3.21';
$MYSQL_OPT = ' --batch --unbuffered';
Expand Down Expand Up @@ -97,8 +97,8 @@ Usage: $script [host [user [db]]] OPTIONS
-U, --superuser=# connect as superuser
-P, --spassword=# password for superuser
-H, --rhost=# remote MySQL-server to connect to
--old_server connect to old MySQL-server (before v3.21) which
-H, --rhost=# remote MariaDB-server to connect to
--old_server connect to old MariaDB-server (before v3.21) which
does not yet know how to handle full where clauses.
-b, --brief single-line tabular report
Expand Down
50 changes: 25 additions & 25 deletions scripts/mysqld_multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ sub main
print "WARNING: my_print_defaults command not found.\n";
print "Please make sure you have this command available and\n";
print "in your path. The command is available from the latest\n";
print "MySQL distribution.\n";
print "MariaDB distribution.\n";
$my_print_defaults_exists= 0;
}

Expand Down Expand Up @@ -153,7 +153,7 @@ sub main
if (!defined(my_which(my_print_defaults)))
{
print "ABORT: Can't find command 'my_print_defaults'.\n";
print "This command is available from the latest MySQL\n";
print "This command is available from the latest MariaDB\n";
print "distribution. Please make sure you have the command\n";
print "in your PATH.\n";
exit(1);
Expand Down Expand Up @@ -265,17 +265,17 @@ sub init_log
}

####
#### Report living and not running MySQL servers
#### Report living and not running MariaDB servers
####

sub report_mysqlds
{
my (@groups, $com, $i, @options, $pec);

print "Reporting MySQL servers\n";
print "Reporting MariaDB servers\n";
if (!$opt_no_log)
{
w2log("\nReporting MySQL servers","$opt_log",0,0);
w2log("\nReporting MariaDB servers","$opt_log",0,0);
}
@groups = &find_groups($groupids);
for ($i = 0; defined($groups[$i]); $i++)
Expand All @@ -286,19 +286,19 @@ sub report_mysqlds
$pec = $? >> 8;
if ($pec)
{
print "MySQL server from group: $groups[$i] is not running\n";
print "MariaDB server from group: $groups[$i] is not running\n";
if (!$opt_no_log)
{
w2log("MySQL server from group: $groups[$i] is not running",
w2log("MariaDB server from group: $groups[$i] is not running",
"$opt_log", 0, 0);
}
}
else
{
print "MySQL server from group: $groups[$i] is running\n";
print "MariaDB server from group: $groups[$i] is running\n";
if (!$opt_no_log)
{
w2log("MySQL server from group: $groups[$i] is running",
w2log("MariaDB server from group: $groups[$i] is running",
"$opt_log", 0, 0);
}
}
Expand All @@ -323,11 +323,11 @@ sub start_mysqlds()

if (!$opt_no_log)
{
w2log("\nStarting MySQL servers\n","$opt_log",0,0);
w2log("\nStarting MariaDB servers\n","$opt_log",0,0);
}
else
{
print "\nStarting MySQL servers\n";
print "\nStarting MariaDB servers\n";
}
@groups = &find_groups($groupids);
for ($i = 0; defined($groups[$i]); $i++)
Expand Down Expand Up @@ -398,7 +398,7 @@ sub start_mysqlds()
}
if (!$i && !$opt_no_log)
{
w2log("No MySQL servers to be started (check your GNRs)",
w2log("No MariaDB servers to be started (check your GNRs)",
"$opt_log", 0, 0);
}
}
Expand All @@ -413,11 +413,11 @@ sub stop_mysqlds()

if (!$opt_no_log)
{
w2log("\nStopping MySQL servers\n","$opt_log",0,0);
w2log("\nStopping MariaDB servers\n","$opt_log",0,0);
}
else
{
print "\nStopping MySQL servers\n";
print "\nStopping MariaDB servers\n";
}
@groups = &find_groups($groupids);
for ($i = 0; defined($groups[$i]); $i++)
Expand All @@ -430,7 +430,7 @@ sub stop_mysqlds()
}
if (!$i && !$opt_no_log)
{
w2log("No MySQL servers to be stopped (check your GNRs)",
w2log("No MariaDB servers to be stopped (check your GNRs)",
"$opt_log", 0, 0);
}
}
Expand Down Expand Up @@ -638,23 +638,23 @@ sub example
#
# 1.COMMON USER
#
# Make sure that the MySQL user, who is stopping the mysqld services, has
# the same password to all MySQL servers being accessed by $my_progname.
# Make sure that the MariaDB user, who is stopping the mysqld services, has
# the same password to all MariaDB servers being accessed by $my_progname.
# This user needs to have the 'Shutdown_priv' -privilege, but for security
# reasons should have no other privileges. It is advised that you create a
# common 'multi_admin' user for all MySQL servers being controlled by
# common 'multi_admin' user for all MariaDB servers being controlled by
# $my_progname. Here is an example how to do it:
#
# GRANT SHUTDOWN ON *.* TO multi_admin\@localhost IDENTIFIED BY 'password'
#
# You will need to apply the above to all MySQL servers that are being
# You will need to apply the above to all MariaDB servers that are being
# controlled by $my_progname. 'multi_admin' will shutdown the servers
# using 'mysqladmin' -binary, when '$my_progname stop' is being called.
#
# 2.PID-FILE
#
# If you are using mysqld_safe to start mysqld, make sure that every
# MySQL server has a separate pid-file. In order to use mysqld_safe
# MariaDB server has a separate pid-file. In order to use mysqld_safe
# via $my_progname, you need to use two options:
#
# mysqld=/path/to/mysqld_safe
Expand All @@ -667,7 +667,7 @@ sub example
#
# 3.DATA DIRECTORY
#
# It is NOT advised to run many MySQL servers within the same data directory.
# It is NOT advised to run many MariaDB servers within the same data directory.
# You can do so, but please make sure to understand and deal with the
# underlying caveats. In short they are:
# - Speed penalty
Expand All @@ -688,15 +688,15 @@ sub example
# intentionally left out. You may have 'gaps' in the config file. This
# gives you more flexibility.
#
# 6.MySQL Server User
# 6.MariaDB Server User
#
# You can pass the user=... option inside [mysqld#] groups. This
# can be very handy in some cases, but then you need to run $my_progname
# as UNIX root.
#
# 7.A Start-up Manage Script for $my_progname
#
# In the recent MySQL distributions you can find a file called
# In the recent MariaDB distributions you can find a file called
# mysqld_multi.server.sh. It is a wrapper for $my_progname. This can
# be used to start and stop multiple servers during boot and shutdown.
#
Expand All @@ -709,7 +709,7 @@ sub example
# or /root/.my.cnf and add the [mysqld_multi] and [mysqld#] groups.
#
# The script can be found from support-files/mysqld_multi.server.sh
# in MySQL distribution. (Verify the script before using)
# in MariaDB distribution. (Verify the script before using)
#
[mysqld_multi]
Expand Down Expand Up @@ -828,7 +828,7 @@ Using: @{[join ' ', @defaults_options]}
file is turned on.
--password=... Password for mysqladmin user.
--silent Disable warnings.
--tcp-ip Connect to the MySQL server(s) via the TCP/IP port instead
--tcp-ip Connect to the MariaDB server(s) via the TCP/IP port instead
of the UNIX socket. This affects stopping and reporting.
If a socket file is missing, the server may still be
running, but can be accessed only via the TCP/IP port.
Expand Down
Loading

0 comments on commit b4c74e2

Please sign in to comment.