Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b4c74e2a
Commit
b4c74e2a
authored
Aug 03, 2014
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change MySQL -> MariaDB inc scripts
parent
3bde1393
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
68 deletions
+67
-68
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+2
-2
scripts/mysql_config.sh
scripts/mysql_config.sh
+2
-2
scripts/mysql_convert_table_format.sh
scripts/mysql_convert_table_format.sh
+1
-1
scripts/mysql_find_rows.sh
scripts/mysql_find_rows.sh
+1
-1
scripts/mysql_fix_extensions.sh
scripts/mysql_fix_extensions.sh
+3
-3
scripts/mysql_setpermission.sh
scripts/mysql_setpermission.sh
+9
-9
scripts/mysql_zap.sh
scripts/mysql_zap.sh
+2
-2
scripts/mysqlaccess.sh
scripts/mysqlaccess.sh
+3
-3
scripts/mysqld_multi.sh
scripts/mysqld_multi.sh
+25
-25
scripts/mytop.sh
scripts/mytop.sh
+19
-20
No files found.
scripts/make_binary_distribution.sh
View file @
b4c74e2a
...
...
@@ -234,8 +234,8 @@ set -e
if
test
-f
./client/.libs/mysql
then
echo
""
echo
"The M
ySQL clients are compiled dynamic
ly, which is not allowed for"
echo
"a M
ySQL
binary tar file. Please configure with"
echo
"The M
ariaDB clients are compiled dynamical
ly, which is not allowed for"
echo
"a M
ariaDB
binary tar file. Please configure with"
echo
"--with-client-ldflags=-all-static and try again"
exit
1
;
fi
...
...
scripts/mysql_config.sh
View file @
b4c74e2a
...
...
@@ -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 M
ySQL
client library.
# when using the M
ariaDB
client library.
which
()
{
...
...
@@ -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 M
ySQL
# This is to ensure that this script also works with the binary M
ariaDB
# version
fix_path
()
...
...
scripts/mysql_convert_table_format.sh
View file @
b4c74e2a
...
...
@@ -125,7 +125,7 @@ sub usage
print
<<
EOF
;
Conversion of a M
ySQL
tables to other storage engines
Conversion of a M
ariaDB
tables to other storage engines
Usage:
$0
database [table[ table ...]]
If no tables has been specifed, all tables in the database will be converted.
...
...
scripts/mysql_find_rows.sh
View file @
b4c74e2a
...
...
@@ -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 M
ySQL
update log.
newlines. This is useful to find things in a M
ariaDB
update log.
$0
takes the following options:
...
...
scripts/mysql_fix_extensions.sh
View file @
b4c74e2a
...
...
@@ -18,10 +18,10 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
# MA 02110-1301, USA
# This is a utility for M
ySQL
. It is not needed by any standard part
# of M
ySQL
.
# This is a utility for M
ariaDB
. It is not needed by any standard part
# of M
ariaDB
.
# Usage: mysql_fix_exten
t
ions datadir
# Usage: mysql_fix_exten
s
ions 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
...
...
scripts/mysql_setpermission.sh
View file @
b4c74e2a
...
...
@@ -78,7 +78,7 @@ else
if
(
$opt_password
eq
''
)
{
system
"stty -echo"
;
print
"Password for user
$opt_user
to connect to M
ySQL
: "
;
print
"Password for user
$opt_user
to connect to M
ariaDB
: "
;
$opt_password
=
<STDIN>
;
chomp
(
$opt_password
)
;
system
"stty echo"
;
...
...
@@ -86,7 +86,7 @@ if ($opt_password eq '')
}
# make the connection to M
ySQL
# make the connection to M
ariaDB
$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"
)
;
...
...
@@ -106,7 +106,7 @@ sub q1 { # first question ...
while
(!
$end
)
{
print
"#"
x70
;
print
"
\n
"
;
print
"## Welcome to the permission setter
$version
for M
ySQL
.
\n
"
;
print
"## Welcome to the permission setter
$version
for M
ariaDB
.
\n
"
;
print
"## made by Luuk de Boer
\n
"
;
print
"#"
x70
;
print
"
\n
"
;
...
...
@@ -634,17 +634,17 @@ sub usage
{
print
<<
EOL
;
----------------------------------------------------------------------
The permission setter for M
ySQL
.
The permission setter for M
ariaDB
.
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 M
ySQL
. Keep in mind that we don't
check permissions which already been set in M
ySQL
. So if you can't
connect to M
ySQL
using the permission you just added, take a look at
the permissions which have already been set in M
ySQL
.
or databases or change passwords in M
ariaDB
. Keep in mind that we don't
check permissions which already been set in M
ariaDB
. So if you can't
connect to M
ariaDB
using the permission you just added, take a look at
the permissions which have already been set in M
ariaDB
.
The permission setter first reads your .my.cnf file in your Home
directory if it exists.
...
...
@@ -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 M
ySQL
The options shown below are used for making the connection to the M
ariaDB
server. Keep in mind that the permissions for the user specified via
these options must be sufficient to add users / create databases / set
passwords.
...
...
scripts/mysql_zap.sh
View file @
b4c74e2a
...
...
@@ -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 M
ySQL
. It is not needed by any standard part
# of M
ySQL
.
# This is a utility for M
ariaDB
. It is not needed by any standard part
# of M
ariaDB
.
# Usage: mysql_zap [-signal] [-f] [-t] pattern
...
...
scripts/mysqlaccess.sh
View file @
b4c74e2a
...
...
@@ -34,7 +34,7 @@ BEGIN {
$script_log
=
$ENV
{
'HOME'
}
.
"/
$script
.log"
;
# ****************************
# information on M
ySQL
# information on M
ariaDB
$MYSQL
=
'@bindir@/mysql'
;
# path to mysql executable
$SERVER
=
'3.21'
;
$MYSQL_OPT
=
' --batch --unbuffered'
;
...
...
@@ -97,8 +97,8 @@ Usage: $script [host [user [db]]] OPTIONS
-U, --superuser=# connect as superuser
-P, --spassword=# password for superuser
-H, --rhost=# remote M
ySQL
-server to connect to
--old_server connect to old M
ySQL
-server (before v3.21) which
-H, --rhost=# remote M
ariaDB
-server to connect to
--old_server connect to old M
ariaDB
-server (before v3.21) which
does not yet know how to handle full where clauses.
-b, --brief single-line tabular report
...
...
scripts/mysqld_multi.sh
View file @
b4c74e2a
...
...
@@ -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
"M
ySQL
distribution.
\n
"
;
print
"M
ariaDB
distribution.
\n
"
;
$my_print_defaults_exists
=
0
;
}
...
...
@@ -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 M
ySQL
\n
"
;
print
"This command is available from the latest M
ariaDB
\n
"
;
print
"distribution. Please make sure you have the command
\n
"
;
print
"in your PATH.
\n
"
;
exit
(
1
)
;
...
...
@@ -265,17 +265,17 @@ sub init_log
}
####
#### Report living and not running M
ySQL
servers
#### Report living and not running M
ariaDB
servers
####
sub report_mysqlds
{
my
(
@groups,
$com
,
$i
, @options,
$pec
)
;
print
"Reporting M
ySQL
servers
\n
"
;
print
"Reporting M
ariaDB
servers
\n
"
;
if
(!
$opt_no_log
)
{
w2log
(
"
\n
Reporting M
ySQL
servers"
,
"
$opt_log
"
,0,0
)
;
w2log
(
"
\n
Reporting M
ariaDB
servers"
,
"
$opt_log
"
,0,0
)
;
}
@groups
=
&find_groups
(
$groupids
)
;
for
(
$i
=
0
;
defined
(
$groups
[
$i
])
;
$i
++
)
...
...
@@ -286,19 +286,19 @@ sub report_mysqlds
$pec
=
$?
>>
8
;
if
(
$pec
)
{
print
"M
ySQL
server from group:
$groups
[
$i
] is not running
\n
"
;
print
"M
ariaDB
server from group:
$groups
[
$i
] is not running
\n
"
;
if
(!
$opt_no_log
)
{
w2log
(
"M
ySQL
server from group:
$groups
[
$i
] is not running"
,
w2log
(
"M
ariaDB
server from group:
$groups
[
$i
] is not running"
,
"
$opt_log
"
, 0, 0
)
;
}
}
else
{
print
"M
ySQL
server from group:
$groups
[
$i
] is running
\n
"
;
print
"M
ariaDB
server from group:
$groups
[
$i
] is running
\n
"
;
if
(!
$opt_no_log
)
{
w2log
(
"M
ySQL
server from group:
$groups
[
$i
] is running"
,
w2log
(
"M
ariaDB
server from group:
$groups
[
$i
] is running"
,
"
$opt_log
"
, 0, 0
)
;
}
}
...
...
@@ -323,11 +323,11 @@ sub start_mysqlds()
if
(!
$opt_no_log
)
{
w2log
(
"
\n
Starting M
ySQL
servers
\n
"
,
"
$opt_log
"
,0,0
)
;
w2log
(
"
\n
Starting M
ariaDB
servers
\n
"
,
"
$opt_log
"
,0,0
)
;
}
else
{
print
"
\n
Starting M
ySQL
servers
\n
"
;
print
"
\n
Starting M
ariaDB
servers
\n
"
;
}
@groups
=
&find_groups
(
$groupids
)
;
for
(
$i
=
0
;
defined
(
$groups
[
$i
])
;
$i
++
)
...
...
@@ -398,7 +398,7 @@ sub start_mysqlds()
}
if
(!
$i
&&
!
$opt_no_log
)
{
w2log
(
"No M
ySQL
servers to be started (check your GNRs)"
,
w2log
(
"No M
ariaDB
servers to be started (check your GNRs)"
,
"
$opt_log
"
, 0, 0
)
;
}
}
...
...
@@ -413,11 +413,11 @@ sub stop_mysqlds()
if
(!
$opt_no_log
)
{
w2log
(
"
\n
Stopping M
ySQL
servers
\n
"
,
"
$opt_log
"
,0,0
)
;
w2log
(
"
\n
Stopping M
ariaDB
servers
\n
"
,
"
$opt_log
"
,0,0
)
;
}
else
{
print
"
\n
Stopping M
ySQL
servers
\n
"
;
print
"
\n
Stopping M
ariaDB
servers
\n
"
;
}
@groups
=
&find_groups
(
$groupids
)
;
for
(
$i
=
0
;
defined
(
$groups
[
$i
])
;
$i
++
)
...
...
@@ -430,7 +430,7 @@ sub stop_mysqlds()
}
if
(!
$i
&&
!
$opt_no_log
)
{
w2log
(
"No M
ySQL
servers to be stopped (check your GNRs)"
,
w2log
(
"No M
ariaDB
servers to be stopped (check your GNRs)"
,
"
$opt_log
"
, 0, 0
)
;
}
}
...
...
@@ -638,23 +638,23 @@ sub example
#
# 1.COMMON USER
#
# Make sure that the M
ySQL
user, who is stopping the mysqld services, has
# the same password to all M
ySQL
servers being accessed by
$my_progname
.
# Make sure that the M
ariaDB
user, who is stopping the mysqld services, has
# the same password to all M
ariaDB
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 M
ySQL
servers being controlled by
# common 'multi_admin' user for all M
ariaDB
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 M
ySQL
servers that are being
# You will need to apply the above to all M
ariaDB
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
# M
ySQL
server has a separate pid-file. In order to use mysqld_safe
# M
ariaDB
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
...
...
@@ -667,7 +667,7 @@ sub example
#
# 3.DATA DIRECTORY
#
# It is NOT advised to run many M
ySQL
servers within the same data directory.
# It is NOT advised to run many M
ariaDB
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
...
...
@@ -688,7 +688,7 @@ sub example
# intentionally left out. You may have 'gaps' in the config file. This
# gives you more flexibility.
#
# 6.M
ySQL
Server User
# 6.M
ariaDB
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
...
...
@@ -696,7 +696,7 @@ sub example
#
# 7.A Start-up Manage Script for
$my_progname
#
# In the recent M
ySQL
distributions you can find a file called
# In the recent M
ariaDB
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.
#
...
...
@@ -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 M
ySQL
distribution. (Verify the script before using)
# in M
ariaDB
distribution. (Verify the script before using)
#
[mysqld_multi]
...
...
@@ -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 M
ySQL
server(s) via the TCP/IP port instead
--tcp-ip Connect to the M
ariaDB
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.
...
...
scripts/mytop.sh
View file @
b4c74e2a
...
...
@@ -6,7 +6,7 @@
=
head1 NAME
mytop - display M
ySQL
server performance info like
`
top
'
mytop - display M
ariaDB
server performance info like
`
top
'
=cut
...
...
@@ -257,7 +257,7 @@ my $dbh = DBI->connect($dsn, $config{user}, $config{pass},
if (not ref
$dbh
)
{
my
$Error
= <<EODIE
Cannot connect to M
ySQL
server. Please check the:
Cannot connect to M
ariaDB
server. Please check the:
* database you specified "
$config
{
db
}
" (default is "
test
")
* username you specified "
$config
{
user
}
" (default is "
root
")
...
...
@@ -1905,12 +1905,11 @@ pick up Term::ReadKey here:
http://search.cpan.org/search?dist=TermReadKey
And you obviously need access to a MySQL server (version 3.22.x or
3.23.x) with the necessary security to run the I<SHOW PROCESSLIST> and
I<SHOW STATUS> commands.
And you obviously need access to a MariaDB server with the necessary
security to run the I<SHOW PROCESSLIST> and I<SHOW STATUS> commands.
If you are a Windows user, using ActiveState's Perl, you can use PPM
(the Perl Package Manager) to install the MySQL and Term::ReadKey
(the Perl Package Manager) to install the M
ariaDB/M
ySQL and Term::ReadKey
modules.
=head2 Optional Color Support
...
...
@@ -1962,24 +1961,24 @@ B<mytop> was inspired by the system monitoring tool B<top>. I
routinely use B<top> on Linux, FreeBSD, and Solaris. You are likely to
notice features from each of them here.
B<mytop> will connect to a M
ySQL
server and periodically run the
B<mytop> will connect to a M
ariaDB
server and periodically run the
I<SHOW PROCESSLIST> and I<SHOW STATUS> commands and attempt to
summarize the information from them in a useful format.
=head2 The Display
The B<mytop> display screen is really broken into two parts. The top 4
lines (header) contain summary information about your M
ySQL
lines (header) contain summary information about your M
ariaDB
server. For example, you might see something like:
M
ySQL on localhost (4.0.13-log)
up 1+11:13:00 [23:29:11]
M
ariaDB on localhost (10.0.13-log)
up 1+11:13:00 [23:29:11]
Queries: 19.3M qps: 160 Slow: 1.0 Se/In/Up/De(%): 00/80/03/17
qps now: 219 Slow qps: 0.0 Threads: 1 ( 1/ 16) 00/74/00/25
Key Efficiency: 99.3% Bps in/out: 30.5k/162.8 Now in/out: 32.7k/ 3.3k
The first line identifies the hostname of the server (localhost) and
the version of M
ySQL
it is running. The right had side shows the
uptime of the M
ySQL
server process in days+hours:minutes:seconds
the version of M
ariaDB
it is running. The right had side shows the
uptime of the M
ariaDB
server process in days+hours:minutes:seconds
format (much like FreeBSD's top) as well as the current time.
The second line displays the total number of queries the server has
...
...
@@ -1993,7 +1992,7 @@ on the previous line).
And the fourth line displays key buffer efficiency (how often keys are
read from the buffer rather than disk) and the number of bytes that
M
ySQL
has sent and received, both over all and in the last cycle.
M
ariaDB
has sent and received, both over all and in the last cycle.
You can toggle the header by hitting B<h> when running B<mytop>.
...
...
@@ -2039,21 +2038,21 @@ have two dashes `--'. Short arguments only have one '-'.
=item B<-u> or B<-user> username
Username to use when logging in to the M
ySQL
server. Default: ``root''.
Username to use when logging in to the M
ariaDB
server. Default: ``root''.
=item B<-p> or B<-pass> or B<-password> password
Password to use when logging in to the M
ySQL
server. Default: none.
Password to use when logging in to the M
ariaDB
server. Default: none.
=item B<-h> or B<--host> hostname[:port]
Hostname of the M
ySQL
server. The hostname may be followed by an
Hostname of the M
ariaDB
server. The hostname may be followed by an
option port number. Note that the port is specified separate from the
host when using a config file. Default: ``localhost''.
=item B<--port> or B<-P> port
If you'
re running M
ySQL
on a non-standard port, use this to specify
If you'
re running M
ariaDB
on a non-standard port, use this to specify
the port number. Default: 3306.
=
item B<
-s
>
or B<
--delay
>
seconds
...
...
@@ -2071,15 +2070,15 @@ In batch mode, mytop runs only once, does not clear the screen, and
places no limit on the number of lines it will print. This is suitable
for running periodically (perhaps from cron) to capture the
information into a file for later viewing. You might use batch mode in
a CGI script to occasionally display your M
ySQL
server status on the
a CGI script to occasionally display your M
ariaDB
server status on the
web.
Default: unset.
=item B<-S> or B<--socket> /path/to/socket
If you'
re running B<mytop> on the same host as M
ySQL
, you may wish to
have it use the M
ySQL
socket directly rather than a standard TCP/IP
If you'
re running B<mytop> on the same host as M
ariaDB
, you may wish to
have it use the M
ariaDB
socket directly rather than a standard TCP/IP
connection. If you
do
,just specify one.
Note that specifying a socket will make B<mytop> ignore any host
...
...
@@ -2125,7 +2124,7 @@ Default: noprompt.
=
item B<
--resolve
>
If you have skip-resolve
set
on M
ySQL
(
to keep it from doing a reverse
If you have skip-resolve
set
on M
ariaDB
(
to keep it from doing a reverse
DNS lookup on each inbound connection
)
, mytop can replace IP addresses
with hostnames but toggling this option.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment