| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| msql2mysql \- MySQL importer for msql style data. | ||
| .SH SYNOPSIS | ||
| msql2mysql [options] | ||
| .SH DESCRIPTION | ||
| This program imports old msql database files. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,127 @@ | ||
| # | ||
| # The MySQL database server configuration file. | ||
| # | ||
| # You can copy this to one of: | ||
| # - "/etc/mysql/my.cnf" to set global options, | ||
| # - "~/.my.cnf" to set user-specific options. | ||
| # | ||
| # One can use all long options that the program supports. | ||
| # Run program with --help to get a list of available options and with | ||
| # --print-defaults to see which it would actually understand and use. | ||
| # | ||
| # For explanations see | ||
| # http://dev.mysql.com/doc/mysql/en/server-system-variables.html | ||
|
|
||
| # This will be passed to all mysql clients | ||
| # It has been reported that passwords should be enclosed with ticks/quotes | ||
| # escpecially if they contain "#" chars... | ||
| # Remember to edit /etc/mysql/debian.cnf when changing the socket location. | ||
| [client] | ||
| port = 3306 | ||
| socket = /var/run/mysqld/mysqld.sock | ||
|
|
||
| # Here is entries for some specific programs | ||
| # The following values assume you have at least 32M ram | ||
|
|
||
| # This was formally known as [safe_mysqld]. Both versions are currently parsed. | ||
| [mysqld_safe] | ||
| socket = /var/run/mysqld/mysqld.sock | ||
| nice = 0 | ||
|
|
||
| [mysqld] | ||
| # | ||
| # * Basic Settings | ||
| # | ||
| user = mysql | ||
| pid-file = /var/run/mysqld/mysqld.pid | ||
| socket = /var/run/mysqld/mysqld.sock | ||
| port = 3306 | ||
| basedir = /usr | ||
| datadir = /var/lib/mysql | ||
| tmpdir = /tmp | ||
| lc-messages-dir = /usr/share/mysql | ||
| skip-external-locking | ||
| # | ||
| # Instead of skip-networking the default is now to listen only on | ||
| # localhost which is more compatible and is not less secure. | ||
| bind-address = 127.0.0.1 | ||
| # | ||
| # * Fine Tuning | ||
| # | ||
| key_buffer = 16M | ||
| max_allowed_packet = 16M | ||
| thread_stack = 192K | ||
| thread_cache_size = 8 | ||
| # This replaces the startup script and checks MyISAM tables if needed | ||
| # the first time they are touched | ||
| myisam-recover = BACKUP | ||
| #max_connections = 100 | ||
| #table_cache = 64 | ||
| #thread_concurrency = 10 | ||
| # | ||
| # * Query Cache Configuration | ||
| # | ||
| query_cache_limit = 1M | ||
| query_cache_size = 16M | ||
| # | ||
| # * Logging and Replication | ||
| # | ||
| # Both location gets rotated by the cronjob. | ||
| # Be aware that this log type is a performance killer. | ||
| # As of 5.1 you can enable the log at runtime! | ||
| #general_log_file = /var/log/mysql/mysql.log | ||
| #general_log = 1 | ||
| # | ||
| # Error log - should be very few entries. | ||
| # | ||
| log_error = /var/log/mysql/error.log | ||
| # | ||
| # Here you can see queries with especially long duration | ||
| #log_slow_queries = /var/log/mysql/mysql-slow.log | ||
| #long_query_time = 2 | ||
| #log-queries-not-using-indexes | ||
| # | ||
| # The following can be used as easy to replay backup logs or for replication. | ||
| # note: if you are setting up a replication slave, see README.Debian about | ||
| # other settings you may need to change. | ||
| #server-id = 1 | ||
| #log_bin = /var/log/mysql/mysql-bin.log | ||
| expire_logs_days = 10 | ||
| max_binlog_size = 100M | ||
| #binlog_do_db = include_database_name | ||
| #binlog_ignore_db = include_database_name | ||
| # | ||
| # * InnoDB | ||
| # | ||
| # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. | ||
| # Read the manual for more InnoDB related options. There are many! | ||
| # | ||
| # * Security Features | ||
| # | ||
| # Read the manual, too, if you want chroot! | ||
| # chroot = /var/lib/mysql/ | ||
| # | ||
| # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". | ||
| # | ||
| # ssl-ca=/etc/mysql/cacert.pem | ||
| # ssl-cert=/etc/mysql/server-cert.pem | ||
| # ssl-key=/etc/mysql/server-key.pem | ||
|
|
||
|
|
||
|
|
||
| [mysqldump] | ||
| quick | ||
| quote-names | ||
| max_allowed_packet = 16M | ||
|
|
||
| [mysql] | ||
| #no-auto-rehash # faster start of mysql but no tab completition | ||
|
|
||
| [isamchk] | ||
| key_buffer = 16M | ||
|
|
||
| # | ||
| # * IMPORTANT: Additional settings that can override those from this file! | ||
| # The files must end with '.cnf', otherwise they'll be ignored. | ||
| # | ||
| !includedir /etc/mysql/conf.d/ |
| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| my_print_defaults \- MySQL helper script that prints defaults. | ||
| .SH SYNOPSIS | ||
| my_print_defaults [options] | ||
| .SH DESCRIPTION | ||
| Prints all arguments that is give to some program using the default files. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| myisam_ftdump \- Dumps full text tables. | ||
| .SH SYNOPSIS | ||
| myisam_ftdump [options] | ||
| .SH DESCRIPTION | ||
| Dumps information and contents of full text tables. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,17 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| myisamchk \- Checks MySQL myisam type databases. | ||
| .SH SYNOPSIS | ||
| myisamchk [options] | ||
| .SH DESCRIPTION | ||
| Description, check and repair of ISAM tables. | ||
| Used without options all tables on the command will be checked for errors | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| myisamlog \- MySQL helper script. | ||
| .SH SYNOPSIS | ||
| myisamlog [options] | ||
| .SH DESCRIPTION | ||
| Function unknown. Mail to ch@debian.org. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,19 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| myisampack \- Compresses MySQL database files. | ||
| .SH SYNOPSIS | ||
| myisampack [options] | ||
| .SH DESCRIPTION | ||
| Pack a MyISAM-table to take much less space. | ||
| Keys are not updated, you must run myisamchk -rq on the datafile | ||
| afterwards to update the keys. | ||
| You should give the .MYI file as the filename argument. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,2 @@ | ||
| W: mysql-dfsg source: maintainer-script-lacks-debhelper-token debian/mysql-server.postinst | ||
| W: mysql-server: possible-bashism-in-maintainer-script postinst:68 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}' |
| @@ -0,0 +1,17 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysqlconfig \- MySQL compile settings. | ||
| .SH SYNOPSIS | ||
| mysqlconfig [options] | ||
| .SH DESCRIPTION | ||
| This program is only useful for people who want to compile agains | ||
| libmysqlclient. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,17 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysql_convert_table_format \- MySQL table converter. | ||
| .SH SYNOPSIS | ||
| mysql_convert_table_format [options] | ||
| .SH DESCRIPTION | ||
| Conversion of a MySQL tables to other table types. | ||
| If no tables has been specifed, all tables in the database will be converted. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,18 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysql_find_rows \- MySQL shell skript for searching in update logs. | ||
| .SH SYNOPSIS | ||
| mysql_find_rows [options] | ||
| .SH DESCRIPTION | ||
| 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. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,18 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysql_fix_extensions \- Corrects MySQL database file names. | ||
| .SH SYNOPSIS | ||
| mysql_fix_extensions <datadir> | ||
| .SH DESCRIPTION | ||
| Makes .frm lowercase and .MYI/MYD/ISM/ISD uppercase | ||
| useful when datafiles are copied from windows. | ||
| Does not work with RAID, with InnoDB or BDB tables. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (8) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysql_install_db \- MySQL helper program. | ||
| .SH SYNOPSIS | ||
| mysql_install_db [options] | ||
| .SH DESCRIPTION | ||
| This program is normally not needed by any user. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,17 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysql_secure_installation \- Secures the MySQL access control lists. | ||
| .SH SYNOPSIS | ||
| mysql_secure_installation [options] | ||
| .SH DESCRIPTION | ||
| This interactive programm suggests changes like removing anonymous users that | ||
| are supposed to make your installation more secure. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (8) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,23 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysql_setpermission \- Adds MySQL users or changes passwords. | ||
| .SH SYNOPSIS | ||
| mysql_setpermission [options] | ||
| .SH DESCRIPTION | ||
| 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. | ||
|
|
||
| The permission setter first reads your .my.cnf file in your Home | ||
| directory if it exists. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,322 @@ | ||
| .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 | ||
| .\" | ||
| .\" Standard preamble: | ||
| .\" ======================================================================== | ||
| .de Sh \" Subsection heading | ||
| .br | ||
| .if t .Sp | ||
| .ne 5 | ||
| .PP | ||
| \fB\\$1\fR | ||
| .PP | ||
| .. | ||
| .de Sp \" Vertical space (when we can't use .PP) | ||
| .if t .sp .5v | ||
| .if n .sp | ||
| .. | ||
| .de Vb \" Begin verbatim text | ||
| .ft CW | ||
| .nf | ||
| .ne \\$1 | ||
| .. | ||
| .de Ve \" End verbatim text | ||
| .ft R | ||
| .fi | ||
| .. | ||
| .\" Set up some character translations and predefined strings. \*(-- will | ||
| .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | ||
| .\" double quote, and \*(R" will give a right double quote. | will give a | ||
| .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | ||
| .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | ||
| .\" expand to `' in nroff, nothing in troff, for use with C<>. | ||
| .tr \(*W-|\(bv\*(Tr | ||
| .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | ||
| .ie n \{\ | ||
| . ds -- \(*W- | ||
| . ds PI pi | ||
| . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | ||
| . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | ||
| . ds L" "" | ||
| . ds R" "" | ||
| . ds C` "" | ||
| . ds C' "" | ||
| 'br\} | ||
| .el\{\ | ||
| . ds -- \|\(em\| | ||
| . ds PI \(*p | ||
| . ds L" `` | ||
| . ds R" '' | ||
| 'br\} | ||
| .\" | ||
| .\" If the F register is turned on, we'll generate index entries on stderr for | ||
| .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | ||
| .\" entries marked with X<> in POD. Of course, you'll have to process the | ||
| .\" output yourself in some meaningful fashion. | ||
| .if \nF \{\ | ||
| . de IX | ||
| . tm Index:\\$1\t\\n%\t"\\$2" | ||
| .. | ||
| . nr % 0 | ||
| . rr F | ||
| .\} | ||
| .\" | ||
| .\" For nroff, turn off justification. Always turn off hyphenation; it makes | ||
| .\" way too many mistakes in technical documents. | ||
| .hy 0 | ||
| .if n .na | ||
| .\" | ||
| .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | ||
| .\" Fear. Run. Save yourself. No user-serviceable parts. | ||
| . \" fudge factors for nroff and troff | ||
| .if n \{\ | ||
| . ds #H 0 | ||
| . ds #V .8m | ||
| . ds #F .3m | ||
| . ds #[ \f1 | ||
| . ds #] \fP | ||
| .\} | ||
| .if t \{\ | ||
| . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | ||
| . ds #V .6m | ||
| . ds #F 0 | ||
| . ds #[ \& | ||
| . ds #] \& | ||
| .\} | ||
| . \" simple accents for nroff and troff | ||
| .if n \{\ | ||
| . ds ' \& | ||
| . ds ` \& | ||
| . ds ^ \& | ||
| . ds , \& | ||
| . ds ~ ~ | ||
| . ds / | ||
| .\} | ||
| .if t \{\ | ||
| . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | ||
| . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | ||
| . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | ||
| . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | ||
| . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | ||
| . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | ||
| .\} | ||
| . \" troff and (daisy-wheel) nroff accents | ||
| .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | ||
| .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | ||
| .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | ||
| .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | ||
| .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | ||
| .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | ||
| .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | ||
| .ds ae a\h'-(\w'a'u*4/10)'e | ||
| .ds Ae A\h'-(\w'A'u*4/10)'E | ||
| . \" corrections for vroff | ||
| .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | ||
| .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | ||
| . \" for low resolution devices (crt and lpr) | ||
| .if \n(.H>23 .if \n(.V>19 \ | ||
| \{\ | ||
| . ds : e | ||
| . ds 8 ss | ||
| . ds o a | ||
| . ds d- d\h'-1'\(ga | ||
| . ds D- D\h'-1'\(hy | ||
| . ds th \o'bp' | ||
| . ds Th \o'LP' | ||
| . ds ae ae | ||
| . ds Ae AE | ||
| .\} | ||
| .rm #[ #] #H #V #F C | ||
| .\" ======================================================================== | ||
| .\" | ||
| .IX Title "MYSQL_TABLEINFO 1" | ||
| .TH MYSQL_TABLEINFO 1 "2003-04-05" "perl v5.8.0" "User Contributed Perl Documentation" | ||
| .SH "NAME" | ||
| mysql_tableinfo \- creates and populates information tables with | ||
| the output of SHOW DATABASES, SHOW TABLES (or SHOW TABLE STATUS), | ||
| SHOW COLUMNS and SHOW INDEX. | ||
| .PP | ||
| This is version 1.1. | ||
| .SH "SYNOPSIS" | ||
| .IX Header "SYNOPSIS" | ||
| .Vb 1 | ||
| \& mysql_tableinfo [OPTIONS] database_to_write [database_like_wild] [table_like_wild] | ||
| .Ve | ||
| .PP | ||
| .Vb 2 | ||
| \& Do not backquote (``) database_to_write, | ||
| \& and do not quote ('') database_like_wild or table_like_wild | ||
| .Ve | ||
| .PP | ||
| .Vb 1 | ||
| \& Examples: | ||
| .Ve | ||
| .PP | ||
| .Vb 1 | ||
| \& mysql_tableinfo info | ||
| .Ve | ||
| .PP | ||
| .Vb 1 | ||
| \& mysql_tableinfo info this_db | ||
| .Ve | ||
| .PP | ||
| .Vb 1 | ||
| \& mysql_tableinfo info %a% b% | ||
| .Ve | ||
| .PP | ||
| .Vb 1 | ||
| \& mysql_tableinfo info --clear-only | ||
| .Ve | ||
| .PP | ||
| .Vb 1 | ||
| \& mysql_tableinfo info --col --idx --table-status | ||
| .Ve | ||
| .SH "DESCRIPTION" | ||
| .IX Header "DESCRIPTION" | ||
| mysql_tableinfo asks a MySQL server information about its | ||
| databases, tables, table columns and index, and stores this | ||
| in tables called `db`, `tbl` (or `tbl_status`), `col`, `idx` | ||
| (with an optional prefix specified with \-\-prefix). | ||
| After that, you can query these information tables, for example | ||
| to build your admin scripts with \s-1SQL\s0 queries, like | ||
| .PP | ||
| \&\s-1SELECT\s0 \s-1CONCAT\s0(\*(L"\s-1CHECK\s0 \s-1TABLE\s0 \*(R",`database`,\*(L".\*(R",`table`,\*(L" \s-1EXTENDED\s0;\*(R") | ||
| \&\s-1FROM\s0 info.tbl \s-1WHERE\s0 ... ; | ||
| .PP | ||
| as people usually do with some other \s-1RDBMS\s0 | ||
| (note: to increase the speed of your queries on the info tables, | ||
| you may add some index on them). | ||
| .PP | ||
| The database_like_wild and table_like_wild instructs the program | ||
| to gather information only about databases and tables | ||
| whose names match these patterns. If the info | ||
| tables already exist, their rows matching the patterns are simply | ||
| deleted and replaced by the new ones. That is, | ||
| old rows not matching the patterns are not touched. | ||
| If the database_like_wild and table_like_wild arguments | ||
| are not specified on the command-line they default to \*(L"%\*(R". | ||
| .PP | ||
| The program : | ||
| .PP | ||
| \&\- does \s-1CREATE\s0 \s-1DATABASE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write | ||
| where database_to_write is the database name specified on the command\-line. | ||
| .PP | ||
| \&\- does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`db` | ||
| .PP | ||
| \&\- fills database_to_write.`db` with the output of | ||
| \&\s-1SHOW\s0 \s-1DATABASES\s0 \s-1LIKE\s0 database_like_wild | ||
| .PP | ||
| \&\- does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`tbl` | ||
| (respectively database_to_write.`tbl_status` | ||
| if the \-\-tbl\-status option is on) | ||
| .PP | ||
| \&\- for every found database, | ||
| fills database_to_write.`tbl` (respectively database_to_write.`tbl_status`) | ||
| with the output of | ||
| \&\s-1SHOW\s0 \s-1TABLES\s0 \s-1FROM\s0 found_db \s-1LIKE\s0 table_like_wild | ||
| (respectively \s-1SHOW\s0 \s-1TABLE\s0 \s-1STATUS\s0 \s-1FROM\s0 found_db \s-1LIKE\s0 table_like_wild) | ||
| .PP | ||
| \&\- if the \-\-col option is on, | ||
| * does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`col` | ||
| * for every found table, | ||
| fills database_to_write.`col` with the output of | ||
| \s-1SHOW\s0 \s-1COLUMNS\s0 \s-1FROM\s0 found_tbl \s-1FROM\s0 found_db | ||
| .PP | ||
| \&\- if the \-\-idx option is on, | ||
| * does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`idx` | ||
| * for every found table, | ||
| fills database_to_write.`idx` with the output of | ||
| \s-1SHOW\s0 \s-1INDEX\s0 \s-1FROM\s0 found_tbl \s-1FROM\s0 found_db | ||
| .PP | ||
| Some options may modify this general scheme (see below). | ||
| .PP | ||
| As mentioned, the contents of the info tables are the output of | ||
| \&\s-1SHOW\s0 commands. In fact the contents are slightly more complete : | ||
| .PP | ||
| \&\- the `tbl` (or `tbl_status`) info table | ||
| has an extra column which contains the database name, | ||
| .PP | ||
| \&\- the `col` info table | ||
| has an extra column which contains the table name, | ||
| and an extra column which contains, for each described column, | ||
| the number of this column in the table owning it (this extra column | ||
| is called `Seq_in_table`). `Seq_in_table` makes it possible for you | ||
| to retrieve your columns in sorted order, when you are querying | ||
| the `col` table. | ||
| .PP | ||
| \&\- the `index` info table | ||
| has an extra column which contains the database name. | ||
| .PP | ||
| Caution: info tables contain certain columns (e.g. | ||
| Database, Table, Null...) whose names, as they are MySQL reserved words, | ||
| need to be backquoted (`...`) when used in \s-1SQL\s0 statements. | ||
| .PP | ||
| Caution: as information fetching and info tables filling happen at the | ||
| same time, info tables may contain inaccurate information about | ||
| themselves. | ||
| .SH "OPTIONS" | ||
| .IX Header "OPTIONS" | ||
| .IP "\-\-clear" 4 | ||
| .IX Item "--clear" | ||
| Does \s-1DROP\s0 \s-1TABLE\s0 on the info tables (only those that the program is | ||
| going to fill, for example if you do not use \-\-col it won't drop | ||
| the `col` table) and processes normally. Does not drop database_to_write. | ||
| .IP "\-\-clear\-only" 4 | ||
| .IX Item "--clear-only" | ||
| Same as \-\-clear but exits after the DROPs. | ||
| .IP "\-\-col" 4 | ||
| .IX Item "--col" | ||
| Adds columns information (into table `col`). | ||
| .IP "\-\-idx" 4 | ||
| .IX Item "--idx" | ||
| Adds index information (into table `idx`). | ||
| .IP "\-\-prefix prefix" 4 | ||
| .IX Item "--prefix prefix" | ||
| The info tables are named from the concatenation of prefix and, | ||
| respectively, db, tbl (or tbl_status), col, idx. Do not quote ('') | ||
| or backquote (``) prefix. | ||
| .IP "\-q, \-\-quiet" 4 | ||
| .IX Item "-q, --quiet" | ||
| Does not warn you about what the script is going to do (\s-1DROP\s0 \s-1TABLE\s0 etc) | ||
| and does not ask for a confirmation before starting. | ||
| .IP "\-\-tbl\-status" 4 | ||
| .IX Item "--tbl-status" | ||
| Instead of using \s-1SHOW\s0 \s-1TABLES\s0, uses \s-1SHOW\s0 \s-1TABLE\s0 \s-1STATUS\s0 | ||
| (much more complete information, but slower). | ||
| .IP "\-\-help" 4 | ||
| .IX Item "--help" | ||
| Display helpscreen and exit | ||
| .IP "\-u, \-\-user=#" 4 | ||
| .IX Item "-u, --user=#" | ||
| user for database login if not current user. Give a user | ||
| who has sufficient privileges (\s-1CREATE\s0, ...). | ||
| .IP "\-p, \-\-password=# (INSECURE)" 4 | ||
| .IX Item "-p, --password=# (INSECURE)" | ||
| password to use when connecting to server. | ||
| WARNING: Providing a password on command line is insecure as it is visible through /proc to anyone for a short time. | ||
| .IP "\-h, \-\-host=#" 4 | ||
| .IX Item "-h, --host=#" | ||
| host to connect to | ||
| .IP "\-P, \-\-port=#" 4 | ||
| .IX Item "-P, --port=#" | ||
| port to use when connecting to server | ||
| .IP "\-S, \-\-socket=#" 4 | ||
| .IX Item "-S, --socket=#" | ||
| \&\s-1UNIX\s0 domain socket to use when connecting to server | ||
| .SH "WARRANTY" | ||
| .IX Header "WARRANTY" | ||
| This software is free and comes without warranty of any kind. You | ||
| should never trust backup software without studying the code yourself. | ||
| Study the code inside this script and only rely on it if \fIyou\fR believe | ||
| that it does the right thing for you. | ||
| .Sp | ||
| Patches adding bug fixes, documentation and new features are welcome. | ||
| .SH "TO DO" | ||
| .IX Header "TO DO" | ||
| Use extended inserts to be faster (for servers with many databases | ||
| or tables). But to do that, must care about net\-buffer\-length. | ||
| .SH "AUTHOR" | ||
| .IX Header "AUTHOR" | ||
| 2002\-06\-18 Guilhem Bichot (guilhem.bichot@mines\-paris.org) | ||
| .Sp | ||
| And all the authors of mysqlhotcopy, which served as a model for | ||
| the structure of the program. |
| @@ -0,0 +1,20 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysql_waitpid \- Waits a specified amount of seconds for a PID to terminate. | ||
| .SH SYNOPSIS | ||
| mysql_waitpid [options] <pid> <seconds> | ||
| .SH DESCRIPTION | ||
| Description: Waits for a program, which program id is #pid, to | ||
| terminate within #time seconds. If the program terminates within | ||
| this time, or if the #pid no longer exists, value 0 is returned. | ||
| Otherwise 1 is returned. Both #pid and #time must be positive | ||
| integer arguments. | ||
|
|
||
| See mysql_waitpid for options. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,17 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysqlbinlog \- Dumps MySQL binary logs. | ||
| .SH SYNOPSIS | ||
| mysqlbinlog [options] | ||
| .SH DESCRIPTION | ||
| Dumps a MySQL binary log in a format usable for viewing or for pipeing to | ||
| the mysql command line client | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,14 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysqlbug \- MySQL bug reporting tool. | ||
| .SH SYNOPSIS | ||
| mysqlbug [options] | ||
| .SH DESCRIPTION | ||
| Interactive bug reporting tool. Use reportbug on Debian systems. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,28 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysqlcheck \- MySQL program for repairing, checking and optimizing tables. | ||
| .SH SYNOPSIS | ||
| mysqlcheck | mysqlanalyze | mysqloptimize [options] | ||
| .SH DESCRIPTION | ||
| This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a) | ||
| or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be | ||
| used same time. It works on MyISAM and in some cases on BDB tables. | ||
| Please consult the MySQL manual for latest information about the | ||
| above. The options -c,-r,-a and -o are exclusive to each other, which | ||
| means that the last option will be used, if several was specified. | ||
|
|
||
| The option -c will be used by default, if none was specified. You | ||
| can change the default behavior by making a symbolic link, or | ||
| copying this file somewhere with another name, the alternatives are: | ||
| mysqlrepair: The default option will be -r | ||
| mysqlanalyze: The default option will be -a | ||
| mysqloptimize: The default option will be -o | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (8) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,2 @@ | ||
| [mysqld_safe] | ||
| syslog |
| @@ -0,0 +1,50 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysqldumpslow \- Parse and summarize the MySQL slow query log. | ||
| .SH SYNOPSIS | ||
| mysqldumpslow [options] | ||
| .SH DESCRIPTION | ||
| This program parses and summarizes a 'slow query log'. | ||
|
|
||
| .TP | ||
| \fB\-v\fR | ||
| verbose | ||
| .TP | ||
| \fB\-d\fR | ||
| debug | ||
| .TP | ||
| \fB\-s=WORD\fR | ||
| what to sort by (t, at, l, al, r, ar etc) | ||
| .TP | ||
| \fB\-r\fR | ||
| reverse the sort order (largest last instead of first) | ||
| .TP | ||
| \fB\-t=NUMBER\fR | ||
| just show the top n queries | ||
| .TP | ||
| \fB\-a\fR | ||
| don't abstract all numbers to N and strings to 'S' | ||
| .TP | ||
| \fB\-n=NUMBER\fR | ||
| abstract numbers with at least n digits within names | ||
| .TP | ||
| \fB\-g=WORD\fR | ||
| grep: only consider stmts that include this string | ||
| .TP | ||
| \fB\-h=WORD\fR | ||
| hostname of db server for *-slow.log filename (can be wildcard) | ||
| .TP | ||
| \fB\-i=WORD\fR | ||
| name of server instance (if using mysql.server startup script) | ||
| .TP | ||
| \fB\-l\fR | ||
| don't subtract lock time from total time | ||
|
|
||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org> based on | ||
| the commends in the code. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,20 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysqlimport \- Imports text files with MySQL database queries. | ||
| .SH SYNOPSIS | ||
| mysqlimport [options] | ||
| .SH DESCRIPTION | ||
| Loads tables from text files in various formats. The base name of the | ||
| text file must be the name of the table that should be used. | ||
| If one uses sockets to connect to the MySQL server, the server will open and | ||
| read the text file directly. In other cases the client will open the text | ||
| file. The SQL command 'LOAD DATA INFILE' is used to import the rows. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,180 @@ | ||
| .TH "mysqlreport" "1" "2.5 2006-09-01 (docrev 2006-05-19)" "Daniel Nichter" "MYSQL" | ||
| .SH "NAME" | ||
| .LP | ||
| mysqlreport \- Makes a friendly report of important MySQL status values | ||
| .SH "SYNTAX" | ||
| .LP | ||
| mysqlreport [\fIoptions\fP] | ||
| .SH "DESCRIPTION" | ||
| .LP | ||
| mysqlreport makes a friendly report of important MySQL status values. Actually, | ||
| it makes a friendly report of nearly every status value from SHOW STATUS. | ||
| Unlike SHOW STATUS which simply dumps over 100 values to screen in one long | ||
| list, mysqlreport interprets and formats the values and presents the basic | ||
| values and many more inferred values in a human\-readable format. Numerous | ||
| example reports are available at the mysqlreport web page at | ||
| http://hackmysql.com/mysqlreport. | ||
|
|
||
| The benefit of mysqlreport is that it allows you to very quickly see a wide | ||
| array of performance indicators for your MySQL server which would otherwise | ||
| need to be calculated by hand from all the various SHOW STATUS values. For | ||
| example, the Index Read Ratio is an important value but it's not present in | ||
| SHOW STATUS; it's an inferred value (the ratio of Key_reads to | ||
| Key_read_requests). | ||
|
|
||
| This documentation outlines all the command line options in mysqlreport, most | ||
| of which control which reports are printed. This document does not address | ||
| how to interpret these reports; that topic is covered in the document Guide | ||
| To Understanding mysqlreport at http://hackmysql.com/mysqlreportguide. | ||
|
|
||
| .SH "OPTIONS" | ||
| Technically, command line options are in the form \-\-option, but \-option works | ||
| too. All options can be abbreviated if the abbreviation is unique. For example, | ||
| option \-\-host can be abbreviated \-\-ho but not \-\-h because \-\-h is ambiguous: it | ||
| could mean \-\-host or \-\-help. | ||
|
|
||
| .LP | ||
|
|
||
| .TP | ||
| \fB\-\-help\fR | ||
| Output help information and exit. | ||
|
|
||
| .TP | ||
| \fB\-\-user USER\fR | ||
|
|
||
| .TP | ||
| \fB\-\-password\fR | ||
| As of version 2.3 \-\-password can take the password on the | ||
| command line like "\-\-password FOO". Using \-\-password | ||
| alone without giving a password on the command line | ||
| causes mysqlreport to prompt for a password. | ||
|
|
||
| .TP | ||
| \fB\-\-host ADDRESS\fR | ||
|
|
||
| .TP | ||
| \fB\-\-port PORT\fR | ||
|
|
||
| .TP | ||
| \fB\-\-socket SOCKET\fR | ||
|
|
||
| .TP | ||
| \fB\-\-no\-mycnf\fR | ||
| \-\-no\-mycnf makes mysqlreport not read ~/.my.cnf which it does by default | ||
| otherwise. \-\-user and \-\-password always override values from ~/.my.cnf. | ||
|
|
||
| .TP | ||
| \fB\-\-dtq\fR | ||
| Print Distribution of Total Queries (DTQ) report (under | ||
| Total in Questions report). Queries (or Questions) can | ||
| be divided into four main areas: DMS (see \-\-dms below), | ||
| Com_ (see \-\-com below), COM_QUIT (see COM_QUIT and | ||
| Questions at http://hackmysql.com/com_quit), and | ||
| Unknown. \-\-dtq lists the number of queries in each of | ||
| these areas in descending order. | ||
|
|
||
| .TP | ||
| \fB\-\-dms\fR | ||
| Print Data Manipulation Statements (DMS) report (under | ||
| DMS in Questions report). DMS are those from the MySQL | ||
| manual section 13.2. Data Manipulation Statements. | ||
| (Currently, mysqlreport considers only SELECT, INSERT, | ||
| REPLACE, UPDATE, and DELETE.) Each DMS is listed in | ||
| descending order by count. | ||
|
|
||
| .TP | ||
| \fB\-\-com N\fR | ||
| Print top N number of non\-DMS Com_ status values in | ||
| descending order (after DMS in Questions report). If N | ||
| is not given, default is 3. Such non\-DMS Com_ values | ||
| include Com_change_db, Com_show_tables, Com_rollback, | ||
| etc. | ||
|
|
||
| .TP | ||
| \fB\-\-sas\fR | ||
| Print report for Select_ and Sort_ status values (after | ||
| Questions report). See MySQL Select and Sort Status | ||
| Variables at http://hackmysql.com/selectandsort. | ||
|
|
||
| .TP | ||
| \fB\-\-tab\fR | ||
| Print Threads, Aborted, and Bytes status reports (after | ||
| Created temp report). As of mysqlreport v2.3 the | ||
| Threads report reports on all Threads_ status values. | ||
|
|
||
| .TP | ||
| \fB\-\-qcache\fR | ||
| Print Query Cache report. | ||
| .TP | ||
| \fB\-\-all\fR | ||
| Equivalent to "\-\-dtq \-\-dms \-\-com 3 \-\-sas \-\-qcache". | ||
| (Notice \-\-tab is not invoked by \-\-all.) | ||
|
|
||
| .TP | ||
| \fB\-\-infile FILE\fR | ||
| Instead of getting SHOW STATUS values from MySQL, read | ||
| values from FILE. FILE is often a copy of the output of | ||
| SHOW STATUS including formatting characters (|, +, \-). | ||
| mysqlreport expects FILE to have the format | ||
| " value number " where value is only alpha and | ||
| underscore characters (A\-Z and _) and number is a | ||
| positive integer. Anything before, between, or after | ||
| value and number is ignored. mysqlreport also needs | ||
| the following MySQL server variables: version, | ||
| table_cache, max_connections, key_buffer_size, | ||
| query_cache_size. These values can be specified in | ||
| INFILE in the format "name = value" where name is one | ||
| of the aforementioned server variables and value is a | ||
| positive integer with or without a trailing M and | ||
| possible periods (for version). For example, to specify | ||
| an 18M key_buffer_size: key_buffer_size = 18M. Or, a | ||
| 256 table_cache: table_cache = 256. The M implies | ||
| Megabytes not million, so 18M means 18,874,368 not | ||
| 18,000,000. If these server variables are not specified | ||
| the following defaults are used (respectively) which | ||
| may cause strange values to be reported: 0.0.0, 64, | ||
| 100, 8M, 0. | ||
|
|
||
| .TP | ||
| \fB\-\-outfile FILE\fR | ||
| After printing the report to screen, print the report | ||
| to FILE too. Internally, mysqlreport always writes the | ||
| report to a temp file first: /tmp/mysqlreport.PID on | ||
| *nix, c:\mysqlreport.PID on Windows (PID is the | ||
| script's process ID). Then it prints the temp file to | ||
| screen. Then if \-\-outfile is specified, the temp file | ||
| is copied to OUTFILE. After \-\-email (below), the temp | ||
| file is deleted. | ||
|
|
||
| .TP | ||
| \fB\-\-email ADDRESS\fR | ||
| After printing the report to screen, email the report | ||
| to ADDRESS. This option requires sendmail in | ||
| /usr/sbin/, therefore it does not work on Windows. | ||
| /usr/sbin/sendmail can be a sym link to qmail, for | ||
| example, or any MTA that emulates sendmail's \-t | ||
| command line option and operation. The FROM: field is | ||
| "mysqlreport", SUBJECT: is "MySQL status report". | ||
|
|
||
| .TP | ||
| \fB\-\-flush\-status\fR | ||
| Execute a "FLUSH STATUS;" after generating the reports. | ||
| If you do not have permissions in MySQL to do this an | ||
| error from DBD::mysql::st will be printed after the | ||
| reports. | ||
|
|
||
| .SH "AUTHORS" | ||
| .LP | ||
| Daniel Nichter | ||
|
|
||
| If mysqlreport breaks, send me a message from | ||
| http://hackmysql.com/feedback | ||
| with the error. | ||
|
|
||
| .SH "SEE ALSO" | ||
| .LP | ||
| mytop(1) | ||
| .LP | ||
| The comprehensive Guide To Understanding mysqlreport at | ||
| http://hackmysql.com/mysqlreportguide. | ||
|
|
| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| mysqltest \- Regressiontest program for MySQL. | ||
| .SH SYNOPSIS | ||
| mysqltest [options] | ||
| .SH DESCRIPTION | ||
| Runs a test against the mysql server and compares output with a results file. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,19 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| myisampack \- Compresses MySQL database files. | ||
| .SH SYNOPSIS | ||
| myisampack [options] | ||
| .SH DESCRIPTION | ||
| Pack a ISAM-table to take much smaller space | ||
| Keys are not updated, so you must run isamchk -rq on any table | ||
| that has keys after you have compressed it | ||
| You should give the .ISM file as the filename argument | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| resolve_stack_dump \- MySQL helper program for reporting bugs. | ||
| .SH SYNOPSIS | ||
| resolve_stack_dump [options] | ||
| .SH DESCRIPTION | ||
| Resolve numeric stack strace dump into symbols. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,16 @@ | ||
| .TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" | ||
| .SH NAME | ||
| resolveip \- MySQL helper program to retrive IP addresses. | ||
| .SH SYNOPSIS | ||
| resolveip [options] | ||
| .SH DESCRIPTION | ||
| Get hostname based on IP-address or IP-address based on hostname. | ||
|
|
||
| For more information start the program with '--help'. | ||
| .SH "SEE ALSO" | ||
| mysql (1), mysqld (1) | ||
| .SH AUTHOR | ||
| This manpage was written by Christian Hammers <ch@debian.org>. | ||
|
|
||
| MySQL is available at http://www.mysql.com/. | ||
| .\" end of man page |
| @@ -0,0 +1,45 @@ | ||
| # vim:syntax=apparmor | ||
| # Last Modified: Tue Jun 19 17:37:30 2007 | ||
| #include <tunables/global> | ||
|
|
||
| /usr/sbin/mysqld { | ||
| #include <abstractions/base> | ||
| #include <abstractions/nameservice> | ||
| #include <abstractions/user-tmp> | ||
| #include <abstractions/mysql> | ||
| #include <abstractions/winbind> | ||
|
|
||
| capability dac_override, | ||
| capability sys_resource, | ||
| capability setgid, | ||
| capability setuid, | ||
|
|
||
| network tcp, | ||
|
|
||
| /etc/hosts.allow r, | ||
| /etc/hosts.deny r, | ||
|
|
||
| /etc/mysql/*.pem r, | ||
| /etc/mysql/conf.d/ r, | ||
| /etc/mysql/conf.d/* r, | ||
| /etc/mysql/*.cnf r, | ||
| /usr/lib/mysql/plugin/ r, | ||
| /usr/lib/mysql/plugin/*.so* mr, | ||
| /usr/sbin/mysqld mr, | ||
| /usr/share/mysql/** r, | ||
| /var/log/mysql.log rw, | ||
| /var/log/mysql.err rw, | ||
| /var/lib/mysql/ r, | ||
| /var/lib/mysql/** rwk, | ||
| /var/log/mysql/ r, | ||
| /var/log/mysql/* rw, | ||
| /var/run/mysqld/mysqld.pid rw, | ||
| /var/run/mysqld/mysqld.sock w, | ||
| /run/mysqld/mysqld.pid rw, | ||
| /run/mysqld/mysqld.sock w, | ||
|
|
||
| /sys/devices/system/cpu/ r, | ||
|
|
||
| # Site-specific additions and overrides. See local/README for details. | ||
| #include <local/usr.sbin.mysqld> | ||
| } |
| @@ -0,0 +1,5 @@ | ||
| mysql-wsrep-5.5 (5.5.41-1) UNRELEASED; urgency=medium | ||
|
|
||
| * Initial Debian packaging based on MySQL 5.5.41-0ubuntu0.12.04.1 | ||
|
|
||
| -- Otto Kekäläinen <otto@seravo.fi> Wed, 21 Fed 2015 08:51:36 -0500 |
| @@ -0,0 +1 @@ | ||
| 9 |
| @@ -0,0 +1,198 @@ | ||
| Source: mysql-wsrep-5.5 | ||
| Section: database | ||
| Priority: optional | ||
| Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> | ||
| XSBC-Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org> | ||
| Uploaders: Norbert Tretkowski <norbert@tretkowski.de>, Clint Byrum <clint@ubuntu.com> | ||
| Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper (>= 8.1.3~), file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline-dev, psmisc, po-debconf, chrpath, doxygen-latex, ghostscript, gawk, bison, lsb-release, hardening-wrapper, cmake, gcc-4.5, g++-4.5, dh-apparmor | ||
| Standards-Version: 3.9.2 | ||
| Homepage: http://dev.mysql.com/ | ||
| Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/mysql-5.5/ | ||
| Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/mysql-5.5/ | ||
|
|
||
| Package: libmysqlclient18 | ||
| Section: libs | ||
| Architecture: any | ||
| Depends: mysql-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} | ||
| Pre-Depends: multiarch-support, ${misc:Pre-Depends} | ||
| Multi-Arch: same | ||
| Description: MySQL database client library | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the client library. | ||
|
|
||
| Package: libmysqld-pic | ||
| Architecture: any | ||
| Section: libdevel | ||
| Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends} | ||
| Description: MySQL database development files | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the -fPIC version of the embedded server library. | ||
|
|
||
| Package: libmysqld-dev | ||
| Architecture: any | ||
| Section: libdevel | ||
| Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends} | ||
| Description: MySQL embedded database development files | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the embedded server library and header files. | ||
|
|
||
| Package: libmysqlclient-dev | ||
| Architecture: any | ||
| Section: libdevel | ||
| Depends: libmysqlclient18 (= ${binary:Version}), zlib1g-dev, , ${shlibs:Depends}, ${misc:Depends} | ||
| Conflicts: libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev | ||
| Provides: libmysqlclient15-dev | ||
| Replaces: libmysqlclient15-dev | ||
| Description: MySQL database development files | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes development libraries and header files. | ||
|
|
||
| Package: mysql-common | ||
| Architecture: all | ||
| Depends: ${shlibs:Depends}, ${misc:Depends} | ||
| Conflicts: mysql-common-4.1 | ||
| Provides: mysql-common-4.1 | ||
| Replaces: mysql-common-4.1 | ||
| Breaks: mysql-server-5.1, mysql-client-5.1, mysql-server-core-5.1, mysql-client-core-5.1 | ||
| Multi-Arch: foreign | ||
| Description: MySQL database common files, e.g. /etc/mysql/my.cnf | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes files needed by all versions of the client library, | ||
| e.g. /etc/mysql/my.cnf. | ||
|
|
||
| Package: mysql-client-core-5.5 | ||
| Architecture: any | ||
| Depends: ${shlibs:Depends}, ${misc:Depends} | ||
| Breaks: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-core-5.1 | ||
| Replaces: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-core-5.1 | ||
| Description: MySQL database core client binaries | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the core client files, as used by Akonadi. | ||
|
|
||
| Package: mysql-client-5.5 | ||
| Architecture: any | ||
| Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-common (>= ${source:Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, mysql-client-core-5.5, libterm-readkey-perl | ||
| Provides: virtual-mysql-client, mysql-client, mysql-client-4.1 | ||
| Breaks: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-5.1 | ||
| Replaces: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-5.1 | ||
| Description: MySQL database client binaries | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the client binaries and the additional tools | ||
| innotop and mysqlreport. | ||
|
|
||
| Package: mysql-server-core-5.5 | ||
| Architecture: any | ||
| Depends: ${shlibs:Depends}, ${misc:Depends} | ||
| Breaks: mysql-server-5.1, mysql-server-5.0, mysql-server-core-5.1 | ||
| Provides: mysql-server-core | ||
| Replaces: mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-5.0, mysql-server-5.1, mysql-server-core-5.1 | ||
| Description: MySQL database server binaries | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the server binaries but doesn't contain all the | ||
| infrastructure needed to setup system databases. | ||
|
|
||
| Package: mysql-server-5.5 | ||
| Architecture: any | ||
| Suggests: tinyca, mailx | ||
| Recommends: libhtml-template-perl | ||
| Pre-Depends: mysql-common (>= ${source:Version}), adduser (>= 3.40), debconf | ||
| Depends: mysql-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mysql-server-core-5.5 (= ${binary:Version}), upstart (>= 0.6.7-2) | ||
| Breaks: mysql-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.1, libmysqlclient-dev ( << 5.5.17~ ) | ||
| Provides: virtual-mysql-server | ||
| Replaces: mysql-server (<< ${source:Version}), mysql-server-5.1, mysql-server-5.0, mysql-server-4.1, libmysqlclient-dev ( << 5.5.17~ ) | ||
| Description: MySQL database server binaries and system database setup | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package contains all the infrastructure needed to setup system | ||
| databases. | ||
|
|
||
| Package: mysql-server | ||
| Architecture: all | ||
| Depends: mysql-server-5.5 | ||
| Description: MySQL database server (metapackage depending on the latest version) | ||
| This is an empty package that depends on the current "best" version of | ||
| mysql-server (currently mysql-server-5.5), as determined by the MySQL | ||
| maintainers. Install this package if in doubt about which MySQL | ||
| version you need. That will install the version recommended by the | ||
| package maintainers. | ||
| . | ||
| MySQL is a fast, stable and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
|
|
||
| Package: mysql-client | ||
| Architecture: all | ||
| Depends: mysql-client-5.5 | ||
| Description: MySQL database client (metapackage depending on the latest version) | ||
| This is an empty package that depends on the current "best" version of | ||
| mysql-client (currently mysql-client-5.5), as determined by the MySQL | ||
| maintainers. Install this package if in doubt about which MySQL version | ||
| you want, as this is the one we consider to be in the best shape. | ||
|
|
||
| Package: mysql-testsuite | ||
| Architecture: all | ||
| Depends: mysql-testsuite-5.5 | ||
| Description: MySQL testsuite | ||
| This is an empty package that depends on the current "best" version of | ||
| mysql-testsuite (currently mysql-testsuite-5.5), as determined by the | ||
| MySQL maintainers. Install this package if in doubt about which MySQL | ||
| version you want, as this is the one we consider to be in the best shape. | ||
|
|
||
| Package: mysql-testsuite-5.5 | ||
| Architecture: any | ||
| Depends: mysql-server, mysql-client, ${misc:Depends}, ${shlibs:Depends} | ||
| Conflicts: mysql-testsuite (<< ${source:Version}) | ||
| Description: MySQL testsuite | ||
| MySQL is a fast, stable, and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the MySQL testsuite. | ||
|
|
||
| Package: mysql-source-5.5 | ||
| Architecture: any | ||
| Depends: ${misc:Depends}, ${shlibs:Depends} | ||
| Description: MySQL source | ||
| MySQL is a fast, stable, and true multi-user, multi-threaded SQL database | ||
| server. SQL (Structured Query Language) is the most popular database query | ||
| language in the world. The main goals of MySQL are speed, robustness and | ||
| ease of use. | ||
| . | ||
| This package includes the MySQL source code as configured before building. |
| @@ -0,0 +1,4 @@ | ||
| The examples directory includes files that might be needed by some | ||
| developers: | ||
| - header files not installed by default | ||
| - the example file udf_example.c |
| @@ -0,0 +1,2 @@ | ||
| usr/include/ | ||
| usr/lib/ |
| @@ -0,0 +1 @@ | ||
| sql/udf_example.c |
| @@ -0,0 +1,11 @@ | ||
| usr/bin/mysql_config | ||
| usr/include/mysql/* | ||
| usr/lib/*/libmysqlclient.a | ||
| usr/lib/*/libmysqlclient.so | ||
| usr/lib/*/libmysqlclient_r.a | ||
| usr/lib/*/libmysqlclient_r.so | ||
| usr/lib/*/mysql/plugin/ha_example.* | ||
| usr/lib/*/mysql/plugin/ha_*_plugin.a | ||
| usr/lib/*/mysql/plugin/ha_*_plugin.la | ||
| usr/share/aclocal/mysql.m4 | ||
| usr/share/man/man1/mysql_config.1 |
| @@ -0,0 +1,12 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| # dh_installdeb will replace this with shell code automatically | ||
| # generated by other debhelper scripts. | ||
|
|
||
| #DEBHELPER# | ||
|
|
||
| exit 0 | ||
|
|
||
| # vim: ts=4 | ||
|
|
||
|
|
| @@ -0,0 +1 @@ | ||
| usr/lib/ |
| @@ -0,0 +1,2 @@ | ||
| usr/lib/*/libmysqlclient.so.* | ||
| usr/lib/*/libmysqlclient_r.so.* |
| @@ -0,0 +1,5 @@ | ||
| This package was requested in http://bugs.debian.org/508406 because it | ||
| is needed by programs want to include the embedded MySQL into their | ||
| shared libraries. | ||
|
|
||
| In order to get the full compile flags, use /bin/mysql_config_pic |
| @@ -0,0 +1,2 @@ | ||
| usr/lib/mysql/libmysqld_pic.a | ||
| usr/bin/mysql_config_pic |
| @@ -0,0 +1,2 @@ | ||
| usr/lib/*/libmysqld.a | ||
| usr/lib/*/libmysqlservices.a |
| @@ -0,0 +1,5 @@ | ||
| This package was requested in http://bugs.debian.org/508406 because it | ||
| is needed by programs want to include the embedded MySQL into their | ||
| shared libraries. | ||
|
|
||
| In order to get the full compile flags, use /bin/mysql_config_pic |
| @@ -0,0 +1,2 @@ | ||
| usr/lib/mysql/libmysqld_pic.a | ||
| usr/bin/mysql_config_pic |
| @@ -0,0 +1,4 @@ | ||
| FAQ: | ||
|
|
||
| Q: My <tab> completition is gone, why? | ||
| A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf! |
| @@ -0,0 +1,3 @@ | ||
| usr/bin/ | ||
| usr/share/man/man1/ | ||
| usr/share/perl5/ |
| @@ -0,0 +1,2 @@ | ||
| debian/additions/innotop/changelog.innotop | ||
| README |
| @@ -0,0 +1,36 @@ | ||
| usr/bin/innochecksum | ||
| usr/bin/innotop | ||
| usr/bin/myisam_ftdump | ||
| usr/bin/mysqlaccess | ||
| usr/bin/mysqladmin | ||
| usr/bin/mysqlbug | ||
| usr/bin/mysql_client_test | ||
| usr/bin/mysqldump | ||
| usr/bin/mysqldumpslow | ||
| usr/bin/mysql_find_rows | ||
| usr/bin/mysql_fix_extensions | ||
| usr/bin/mysqlimport | ||
| usr/bin/mysqlreport | ||
| usr/bin/mysqlshow | ||
| usr/bin/mysqlslap | ||
| usr/bin/mysql_waitpid | ||
| usr/bin/mysql_plugin | ||
| usr/share/man/man1/innotop.1 | ||
| usr/share/man/man1/myisam_ftdump.1 | ||
| usr/share/man/man1/mysqlaccess.1 | ||
| usr/share/man/man1/mysqladmin.1 | ||
| usr/share/man/man1/mysqlbug.1 | ||
| usr/share/man/man1/mysql_client_test.1 | ||
| usr/share/man/man1/mysql_client_test_embedded.1 | ||
| usr/share/man/man1/mysqldump.1 | ||
| usr/share/man/man1/mysqldumpslow.1 | ||
| usr/share/man/man1/mysql_find_rows.1 | ||
| usr/share/man/man1/mysql_fix_extensions.1 | ||
| usr/share/man/man1/mysqlimport.1 | ||
| usr/share/man/man1/mysqlman.1 | ||
| usr/share/man/man1/mysqlreport.1 | ||
| usr/share/man/man1/mysqlshow.1 | ||
| usr/share/man/man1/mysqlslap.1 | ||
| usr/share/man/man1/mysql_tableinfo.1 | ||
| usr/share/man/man1/mysql_waitpid.1 | ||
| usr/share/man/man1/mysql_plugin.1 |
| @@ -0,0 +1,6 @@ | ||
| usr/bin/mysqlcheck usr/bin/mysqlrepair | ||
| usr/bin/mysqlcheck usr/bin/mysqlanalyze | ||
| usr/bin/mysqlcheck usr/bin/mysqloptimize | ||
| usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz | ||
| usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlanalyze.1.gz | ||
| usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqloptimize.1.gz |
| @@ -0,0 +1,5 @@ | ||
| mysql-client-5.5: package-has-a-duplicate-relation | ||
| mysql-client-5.5: wrong-name-for-upstream-changelog usr/share/doc/mysql-client-5.5/changelog.innotop.gz | ||
| mysql-client-5.5: pkg-not-in-package-test innotop | ||
| mysql-client-5.5: binary-without-manpage usr/bin/innochecksum | ||
| mysql-client-5.5: binary-without-manpage usr/bin/mysqltest_embedded |
| @@ -0,0 +1,4 @@ | ||
| usr/bin/mysql | ||
| usr/bin/mysqlcheck | ||
| usr/share/man/man1/mysql.1 | ||
| usr/share/man/man1/mysqlcheck.1 |
| @@ -0,0 +1 @@ | ||
| etc/mysql/conf.d/ |
| @@ -0,0 +1 @@ | ||
| etc/mysql/my.cnf |
| @@ -0,0 +1,2 @@ | ||
| script-not-executable ./usr/share/mysql-common/internal-use-only/_etc_init.d_mysql | ||
| script-not-executable ./usr/share/mysql-common/internal-use-only/_etc_mysql_debian-start |
| @@ -0,0 +1,7 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| if [ "$1" = "purge" ]; then | ||
| rmdir /etc/mysql 2>/dev/null || true | ||
| fi | ||
|
|
||
| #DEBHELPER# |
| @@ -0,0 +1,34 @@ | ||
| mysql-dfsg-5.1 (5.1.36-1) unstable; urgency=low | ||
|
|
||
| * Please read http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-5-0.html | ||
| * Make sure to do a REPAIR TABLE on all tables that use UTF-8 and have a | ||
| FULLTEXT index. | ||
|
|
||
| -- Christian Hammers <ch@debian.org> Sat, 4 Jul 2009 02:31:21 +0200 | ||
|
|
||
| mysql-dfsg-5.0 (5.1.14beta-2) unstable; urgency=low | ||
|
|
||
| * The BerkeleyDB Storage Engine is no longer supported. If the options | ||
| have-bdb or skip-bdb are found, MySQL will not start. If you have BDB | ||
| tables, you should change them to use another storage engine before | ||
| upgrading to 5.1. | ||
|
|
||
| -- Monty Taylor <mordred@inaugust.com> Thu, 18 Jan 2007 12:28:21 -0800 | ||
|
|
||
| mysql-dfsg-5.0 (5.0.45-2) unstable; urgency=low | ||
|
|
||
| * Binary logging is now disabled by default. If you really need it (e.g. on | ||
| a replication master), remove the comment from the log_bin line in my.cnf. | ||
|
|
||
| -- Norbert Tretkowski <norbert@tretkowski.de> Sat, 10 Nov 2007 16:26:35 +0100 | ||
|
|
||
| mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=low | ||
|
|
||
| * Rotation of the binary logs is now configured in /etc/mysql/my.cnf with | ||
| "expire-logs-days" which defaults to 20 days. The old file | ||
| /etc/mysql/debian-log-rotate.conf should be removed together with | ||
| /etc/cron.daily/mysql-server after this value has been adjusted. Note that | ||
| the old variable defined the number of files whereas the new one defines | ||
| a time span in days. | ||
|
|
||
| -- Christian Hammers <ch@debian.org> Tue, 24 Jan 2006 22:18:21 +0100 |
| @@ -0,0 +1,109 @@ | ||
| * MYSQL WON'T START OR STOP?: | ||
| ============================= | ||
| You may never ever delete the special mysql user "debian-sys-maint". This | ||
| user together with the credentials in /etc/mysql/debian.cnf are used by the | ||
| init scripts to stop the server as they would require knowledge of the mysql | ||
| root users password else. | ||
| So in most of the times you can fix the situation by making sure that the | ||
| debian.cnf file contains the right password, e.g. by setting a new one | ||
| (remember to do a "flush privileges" then). | ||
|
|
||
| * WHAT TO DO AFTER UPGRADES: | ||
| ============================ | ||
| The privilege tables are automatically updated so all there is left is read | ||
| the changelogs on dev.mysql.com to see if any changes affect custom apps. | ||
|
|
||
| * WHAT TO DO AFTER INSTALLATION: | ||
| ================================ | ||
| The MySQL manual describes certain steps to do at this stage in a separate | ||
| chapter. They are not necessary as the Debian packages does them | ||
| automatically. | ||
|
|
||
| The only thing that is left over for the admin is | ||
| - setting the passwords | ||
| - creating new users and databases | ||
| - read the rest of this text | ||
|
|
||
| * DOWNGRADING TO 4.0 or 4.1: | ||
| ============================ | ||
| Unsupported. Period. | ||
| But if you do and get problems or make interesting experiences, mail me, it | ||
| might help others. | ||
| Ok, if you really want, I would recommend to "mysqldump --opt" all tables, | ||
| then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps. Be | ||
| carefully, though, with the "mysql" table, you might not simply overwrite that | ||
| one as the password for the mysql "debian-sys-maint" user is stored in | ||
| /etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if | ||
| it's alive. | ||
|
|
||
| * SOME APPLICATION CAN NO LONGER CONNECT: | ||
| ========================================= | ||
| This application is probably linked against libmysqlclient12 or below and | ||
| somebody has created a mysql user with new-style passwords. | ||
| The old_passwords=1 option in /etc/mysql/my.cnf might help. If not the | ||
| application that inserted the user has to be changed or the application that | ||
| tries to connect updated to libmysqlclient14 or -15. | ||
|
|
||
| * NETWORKING: | ||
| ============= | ||
| For security reasons, the Debian package has enabled networking only on the | ||
| loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with | ||
| "netstat -tlnp" where it is listening. If your connection is aborted | ||
| immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read | ||
| hosts_access(5). | ||
|
|
||
| * WHERE IS THE DOCUMENTATION?: | ||
| ============================== | ||
| Unfortunately due to licensing restrictions, debian currently not able | ||
| to provide the mysql-doc package in any format. For the most up to date | ||
| documentation, please go to http://dev.mysql.com/doc. | ||
|
|
||
| * PASSWORDS: | ||
| ============ | ||
| It is strongly recommended to set a password for the mysql root user (which | ||
| /usr/bin/mysql -u root -D mysql -e "update user set password=password('new-password') where user='root'" | ||
| /usr/bin/mysql -u root -e "flush privileges" | ||
| If you already had a password set add "-p" before "-u" to the lines above. | ||
|
|
||
|
|
||
| If you are tired to type the password in every time or want to automate your | ||
| scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600 | ||
| (-rw------- username username .my.cnf) to ensure that nobody else can read | ||
| it. Every other configuration parameter can be stored there, too. You will | ||
| find an example below and more information in the MySQL manual in | ||
| /usr/share/doc/mysql-doc or www.mysql.com. | ||
|
|
||
| ATTENTION: It is necessary, that a .my.cnf from root always contains a "user" | ||
| line wherever there is a "password" line, else, the Debian maintenance | ||
| scripts, that use /etc/mysql/debian.cnf, will use the username | ||
| "debian-sys-maint" but the password that is in root's .my.cnf. Also note, | ||
| that every change you make in the /root/.my.cnf will affect the mysql cron | ||
| script, too. | ||
|
|
||
| # an example of $HOME/.my.cnf | ||
| [client] | ||
| user = your-mysql-username | ||
| password = enter-your-good-new-password-here | ||
|
|
||
| * BIG_ROWS FOR EVEN MORE ROWS IN A TABLE: | ||
| ========================================= | ||
| If you ever run out of rows in a table there is the possibility of building | ||
| the package with "-DBIG_ROWS" which, according to a MySQL employee on | ||
| packagers@lists.mysql.com should lead to a 64bit row index (I guess > 2^32 | ||
| rows) but also to an approx. 5% performance loss. | ||
|
|
||
| * BerkeleyDB Storage Engine | ||
| =========================== | ||
| Support for BerkeleyDB has been removed in 5.1, and consequently both the | ||
| have-bdb and skip-bdb configuration options will cause the server to fail. | ||
| Removing the options from /etc/mysql/my.cnf will fix this problem. | ||
|
|
||
| * FURTHER NOTES ON REPLICATION | ||
| =============================== | ||
| If the MySQL server is acting as a replication slave, you should not | ||
| set --tmpdir to point to a directory on a memory-based filesystem or to | ||
| a directory that is cleared when the server host restarts. A replication | ||
| slave needs some of its temporary files to survive a machine restart so | ||
| that it can replicate temporary tables or LOAD DATA INFILE operations. If | ||
| files in the temporary file directory are lost when the server restarts, | ||
| replication fails. |
| @@ -0,0 +1,46 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| . /usr/share/debconf/confmodule | ||
|
|
||
| if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi | ||
| ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } | ||
|
|
||
| CNF=/etc/mysql/my.cnf | ||
|
|
||
| # Beware that there are two ypwhich one of them needs the 2>/dev/null! | ||
| if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then | ||
| db_input high mysql-server-5.5/nis_warning || true | ||
| db_go | ||
| fi | ||
|
|
||
| # only ask this question on fresh installs, during "reconfiguration" and when | ||
| # not upgrading from an existing 5.0 installation. | ||
| # there is also an additional check for empty root passwords in the | ||
| # postinst script when the tools are available for us to use. | ||
| if [ "$1" = "configure" ] && ([ -z "$2" ] && [ ! -e "/var/lib/mysql/debian-5.0.flag" ] ) || [ "$1" = "reconfigure" ]; then | ||
| while :; do | ||
| RET="" | ||
| db_input high mysql-server/root_password || true | ||
| db_go | ||
| db_get mysql-server/root_password | ||
| # if password isn't empty we ask for password verification | ||
| if [ -z "$RET" ]; then | ||
| db_fset mysql-server/root_password seen false | ||
| db_fset mysql-server/root_password_again seen false | ||
| break | ||
| fi | ||
| ROOT_PW="$RET" | ||
| db_input high mysql-server/root_password_again || true | ||
| db_go | ||
| db_get mysql-server/root_password_again | ||
| if [ "$RET" == "$ROOT_PW" ]; then | ||
| ROOT_PW='' | ||
| break | ||
| fi | ||
| db_fset mysql-server/password_mismatch seen false | ||
| db_input critical mysql-server/password_mismatch | ||
| db_set mysql-server/root_password "" | ||
| db_set mysql-server/root_password_again "" | ||
| db_go | ||
| done | ||
| fi |
| @@ -0,0 +1,6 @@ | ||
| etc/init.d | ||
| etc/logrotate.d | ||
| etc/mysql/conf.d | ||
| usr/bin | ||
| usr/share/mysql | ||
| var/lib/mysql-upgrade |
| @@ -0,0 +1,59 @@ | ||
| etc/apparmor.d/usr.sbin.mysqld | ||
| usr/share/apport/package-hooks/source_mysql-5.5.py | ||
| usr/lib/mysql/*so* | ||
| usr/lib/mysql/plugin/*.so | ||
| etc/mysql/debian-start | ||
| etc/mysql/conf.d/mysqld_safe_syslog.cnf | ||
| usr/bin/msql2mysql | ||
| usr/bin/myisamchk | ||
| usr/bin/myisamlog | ||
| usr/bin/myisampack | ||
| usr/bin/mysql_convert_table_format | ||
| usr/bin/mysql_secure_installation | ||
| usr/bin/mysql_setpermission | ||
| usr/bin/mysql_tzinfo_to_sql | ||
| usr/bin/mysql_zap | ||
| usr/bin/mysqlbinlog | ||
| usr/bin/mysqld_multi | ||
| usr/bin/mysqld_safe | ||
| usr/bin/mysqlhotcopy | ||
| usr/bin/mysqltest | ||
| usr/bin/perror | ||
| usr/bin/replace | ||
| usr/bin/resolve_stack_dump | ||
| usr/bin/resolveip | ||
| usr/share/doc/mysql-server-5.5/ | ||
| usr/share/man/man1/msql2mysql.1 | ||
| usr/share/man/man1/myisamchk.1 | ||
| usr/share/man/man1/myisamlog.1 | ||
| usr/share/man/man1/myisampack.1 | ||
| usr/share/man/man1/mysqlbinlog.1 | ||
| usr/share/man/man1/mysql_convert_table_format.1 | ||
| usr/share/man/man1/mysqld_multi.1 | ||
| usr/share/man/man1/mysqld_safe.1 | ||
| usr/share/man/man1/mysqlhotcopy.1 | ||
| usr/share/man/man1/mysql_secure_installation.1 | ||
| usr/share/man/man1/mysql_setpermission.1 | ||
| usr/share/man/man1/mysqltest.1 | ||
| usr/share/man/man1/mysql_zap.1 | ||
| usr/share/man/man1/perror.1 | ||
| usr/share/man/man1/replace.1 | ||
| usr/share/man/man1/resolveip.1 | ||
| usr/share/man/man1/resolve_stack_dump.1 | ||
| usr/share/man/man1/innochecksum.1 | ||
| usr/share/man/man1/mysqltest_embedded.1 | ||
| usr/share/man/man1/mysql_tzinfo_to_sql.1 | ||
| usr/share/mysql/debian-start.inc.sh | ||
| usr/share/mysql/echo_stderr | ||
| usr/share/mysql/errmsg-utf8.txt | ||
| usr/share/mysql/mysqld_multi.server | ||
| usr/share/mysql/mysql_test_data_timezone.sql | ||
| usr/share/mysql/config.huge.ini | ||
| usr/share/mysql/config.medium.ini | ||
| usr/share/mysql/config.small.ini | ||
| usr/share/mysql/ndb-config-2-node.ini | ||
| usr/share/mysql/debian-start.inc.sh | ||
| usr/share/mysql/echo_stderr | ||
| usr/share/mysql/errmsg-utf8.txt | ||
| usr/share/mysql/mysqld_multi.server | ||
| usr/share/mysql/mysql_test_data_timezone.sql |
| @@ -0,0 +1,5 @@ | ||
| mysql-server-5.5: command-with-path-in-maintainer-script postinst | ||
| mysql-server-5.5: possible-bashism-in-maintainer-script postinst:81 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}' | ||
| mysql-server-5.5: possible-bashism-in-maintainer-script preinst:33 '${cmd/ */}' | ||
| mysql-server-5.5: statically-linked-binary ./usr/bin/mysql_tzinfo_to_sql | ||
| mysql-server-5.5: statically-linked-binary ./usr/sbin/mysqld |
| @@ -0,0 +1,9 @@ | ||
| /etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ | ||
| /etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ | ||
| /etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ | ||
| mysqld\[[0-9]+\]: $ | ||
| mysqld\[[0-9]+\]: Version: .* socket: '/var/run/mysqld/mysqld.sock' port: 3306$ | ||
| mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ | ||
| mysqld_safe\[[0-9]+\]: started$ | ||
| usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ | ||
| usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ |
| @@ -0,0 +1,32 @@ | ||
| /etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ | ||
| /etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ | ||
| /etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ | ||
| /etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ | ||
| mysqld\[[0-9]+\]: ?$ | ||
| mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed | ||
| mysqld\[[0-9]+\]: .*InnoDB: Started; | ||
| mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ | ||
| mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ | ||
| mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ | ||
| mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ | ||
| mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ | ||
| mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ | ||
| mysqld\[[0-9]+\]: Version: .* socket | ||
| mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ | ||
| mysqld_safe\[[0-9]+\]: ?$ | ||
| mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ | ||
| mysqld_safe\[[0-9]+\]: ended$ | ||
| mysqld_safe\[[0-9]+\]: http://www.mysql.com$ | ||
| mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ | ||
| mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ | ||
| mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$ | ||
| mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ | ||
| mysqld_safe\[[0-9]+\]: started$ | ||
| mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$ | ||
| mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$ | ||
| mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$ | ||
| mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$ | ||
| mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root -h app109 password 'new-password'$ | ||
| mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$ | ||
| usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ | ||
| usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ |
| @@ -0,0 +1,32 @@ | ||
| /etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ | ||
| /etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ | ||
| /etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ | ||
| /etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ | ||
| mysqld\[[0-9]+\]: ?$ | ||
| mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed | ||
| mysqld\[[0-9]+\]: .*InnoDB: Started; | ||
| mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ | ||
| mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ | ||
| mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ | ||
| mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ | ||
| mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ | ||
| mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ | ||
| mysqld\[[0-9]+\]: Version: .* socket | ||
| mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ | ||
| mysqld_safe\[[0-9]+\]: ?$ | ||
| mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ | ||
| mysqld_safe\[[0-9]+\]: ended$ | ||
| mysqld_safe\[[0-9]+\]: http://www.mysql.com$ | ||
| mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ | ||
| mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ | ||
| mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$ | ||
| mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ | ||
| mysqld_safe\[[0-9]+\]: started$ | ||
| mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$ | ||
| mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$ | ||
| mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$ | ||
| mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$ | ||
| mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root -h app109 password 'new-password'$ | ||
| mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$ | ||
| usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ | ||
| usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ |
| @@ -0,0 +1,27 @@ | ||
| # - I put everything in one block and added sharedscripts, so that mysql gets | ||
| # flush-logs'd only once. | ||
| # Else the binary logs would automatically increase by n times every day. | ||
| # - The error log is obsolete, messages go to syslog now. | ||
| /var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/error.log { | ||
| daily | ||
| rotate 7 | ||
| missingok | ||
| create 640 mysql adm | ||
| compress | ||
| sharedscripts | ||
| postrotate | ||
| test -x /usr/bin/mysqladmin || exit 0 | ||
| # If this fails, check debian.conf! | ||
| MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" | ||
| if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then | ||
| # Really no mysqld or rather a missing debian-sys-maint user? | ||
| # If this occurs and is not a error please report a bug. | ||
| #if ps cax | grep -q mysqld; then | ||
| if killall -q -s0 -umysql mysqld; then | ||
| exit 1 | ||
| fi | ||
| else | ||
| $MYADMIN flush-logs | ||
| fi | ||
| endscript | ||
| } |
| @@ -0,0 +1,187 @@ | ||
| #!/bin/bash | ||
| # | ||
| ### BEGIN INIT INFO | ||
| # Provides: mysql | ||
| # Required-Start: $remote_fs $syslog | ||
| # Required-Stop: $remote_fs $syslog | ||
| # Should-Start: $network $time | ||
| # Should-Stop: $network $time | ||
| # Default-Start: 2 3 4 5 | ||
| # Default-Stop: 0 1 6 | ||
| # Short-Description: Start and stop the mysql database server daemon | ||
| # Description: Controls the main MySQL database server daemon "mysqld" | ||
| # and its wrapper script "mysqld_safe". | ||
| ### END INIT INFO | ||
| # | ||
| set -e | ||
| set -u | ||
| ${DEBIAN_SCRIPT_DEBUG:+ set -v -x} | ||
|
|
||
| test -x /usr/bin/mysqld_safe || exit 0 | ||
|
|
||
| . /lib/lsb/init-functions | ||
|
|
||
| SELF=$(cd $(dirname $0); pwd -P)/$(basename $0) | ||
| CONF=/etc/mysql/my.cnf | ||
| MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" | ||
|
|
||
| # priority can be overriden and "-s" adds output to stderr | ||
| ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i" | ||
|
|
||
| # Safeguard (relative paths, core dumps..) | ||
| cd / | ||
| umask 077 | ||
|
|
||
| # mysqladmin likes to read /root/.my.cnf. This is usually not what I want | ||
| # as many admins e.g. only store a password without a username there and | ||
| # so break my scripts. | ||
| export HOME=/etc/mysql/ | ||
|
|
||
| ## Fetch a particular option from mysql's invocation. | ||
| # | ||
| # Usage: void mysqld_get_param option | ||
| mysqld_get_param() { | ||
| /usr/sbin/mysqld --print-defaults \ | ||
| | tr " " "\n" \ | ||
| | grep -- "--$1" \ | ||
| | tail -n 1 \ | ||
| | cut -d= -f2 | ||
| } | ||
|
|
||
| ## Do some sanity checks before even trying to start mysqld. | ||
| sanity_checks() { | ||
| # check for config file | ||
| if [ ! -r /etc/mysql/my.cnf ]; then | ||
| log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | ||
| echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER | ||
| fi | ||
|
|
||
| # check for diskspace shortage | ||
| datadir=`mysqld_get_param datadir` | ||
| if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4>4096) }'; then | ||
| log_failure_msg "$0: ERROR: The partition with $datadir is too full!" | ||
| echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER | ||
| exit 1 | ||
| fi | ||
| } | ||
|
|
||
| ## Checks if there is a server running and if so if it is accessible. | ||
| # | ||
| # check_alive insists on a pingable server | ||
| # check_dead also fails if there is a lost mysqld in the process list | ||
| # | ||
| # Usage: boolean mysqld_status [check_alive|check_dead] [warn|nowarn] | ||
| mysqld_status () { | ||
| ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? )) | ||
|
|
||
| ps_alive=0 | ||
| pidfile=`mysqld_get_param pid-file` | ||
| if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi | ||
|
|
||
| if [ "$1" = "check_alive" -a $ping_alive = 1 ] || | ||
| [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then | ||
| return 0 # EXIT_SUCCESS | ||
| else | ||
| if [ "$2" = "warn" ]; then | ||
| echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug | ||
| fi | ||
| return 1 # EXIT_FAILURE | ||
| fi | ||
| } | ||
|
|
||
| # | ||
| # main() | ||
| # | ||
|
|
||
| case "${1:-''}" in | ||
| 'start') | ||
| sanity_checks; | ||
| # Start daemon | ||
| log_daemon_msg "Starting MySQL database server" "mysqld" | ||
| if mysqld_status check_alive nowarn; then | ||
| log_progress_msg "already running" | ||
| log_end_msg 0 | ||
| else | ||
| # Could be removed during boot | ||
| test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld | ||
|
|
||
| # Start MySQL! | ||
| /usr/bin/mysqld_safe > /dev/null 2>&1 & | ||
|
|
||
| # 6s was reported in #352070 to be too few when using ndbcluster | ||
| for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do | ||
| sleep 1 | ||
| if mysqld_status check_alive nowarn ; then break; fi | ||
| log_progress_msg "." | ||
| done | ||
| if mysqld_status check_alive warn; then | ||
| log_end_msg 0 | ||
| # Now start mysqlcheck or whatever the admin wants. | ||
| output=$(/etc/mysql/debian-start) | ||
| [ -n "$output" ] && log_action_msg "$output" | ||
| else | ||
| log_end_msg 1 | ||
| log_failure_msg "Please take a look at the syslog" | ||
| fi | ||
| fi | ||
| ;; | ||
|
|
||
| 'stop') | ||
| # * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible | ||
| # at least for cron, we can rely on it here, too. (although we have | ||
| # to specify it explicit as e.g. sudo environments points to the normal | ||
| # users home and not /root) | ||
| log_daemon_msg "Stopping MySQL database server" "mysqld" | ||
| if ! mysqld_status check_dead nowarn; then | ||
| set +e | ||
| shutdown_out=`$MYADMIN shutdown 2>&1`; r=$? | ||
| set -e | ||
| if [ "$r" -ne 0 ]; then | ||
| log_end_msg 1 | ||
| [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out" | ||
| log_daemon_msg "Killing MySQL database server by signal" "mysqld" | ||
| killall -15 mysqld | ||
| server_down= | ||
| for i in 1 2 3 4 5 6 7 8 9 10; do | ||
| sleep 1 | ||
| if mysqld_status check_dead nowarn; then server_down=1; break; fi | ||
| done | ||
| if test -z "$server_down"; then killall -9 mysqld; fi | ||
| fi | ||
| fi | ||
|
|
||
| if ! mysqld_status check_dead warn; then | ||
| log_end_msg 1 | ||
| log_failure_msg "Please stop MySQL manually and read /usr/share/doc/mysql-server-5.5/README.Debian.gz!" | ||
| exit -1 | ||
| else | ||
| log_end_msg 0 | ||
| fi | ||
| ;; | ||
|
|
||
| 'restart') | ||
| set +e; $SELF stop; set -e | ||
| $SELF start | ||
| ;; | ||
|
|
||
| 'reload'|'force-reload') | ||
| log_daemon_msg "Reloading MySQL database server" "mysqld" | ||
| $MYADMIN reload | ||
| log_end_msg 0 | ||
| ;; | ||
|
|
||
| 'status') | ||
| if mysqld_status check_alive nowarn; then | ||
| log_action_msg "$($MYADMIN version)" | ||
| else | ||
| log_action_msg "MySQL is stopped." | ||
| exit 3 | ||
| fi | ||
| ;; | ||
|
|
||
| *) | ||
| echo "Usage: $SELF start|stop|restart|reload|force-reload|status" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
| @@ -0,0 +1,65 @@ | ||
| # MySQL Service | ||
|
|
||
| description "MySQL Server" | ||
| author "Mario Limonciello <superm1@ubuntu.com>" | ||
|
|
||
| start on runlevel [2345] | ||
| stop on starting rc RUNLEVEL=[016] | ||
|
|
||
| respawn | ||
| respawn limit 2 5 | ||
|
|
||
| env HOME=/etc/mysql | ||
| umask 007 | ||
|
|
||
| # The default of 5 seconds is too low for mysql which needs to flush buffers | ||
| kill timeout 300 | ||
|
|
||
| pre-start script | ||
| ## Fetch a particular option from mysql's invocation. | ||
| # Usage: void mysqld_get_param option | ||
| mysqld_get_param() { | ||
| /usr/sbin/mysqld --print-defaults \ | ||
| | tr " " "\n" \ | ||
| | grep -- "--$1" \ | ||
| | tail -n 1 \ | ||
| | cut -d= -f2 | ||
| } | ||
|
|
||
| # priority can be overriden and "-s" adds output to stderr | ||
| ERR_LOGGER="logger -p daemon.err -t /etc/init/mysql.conf -i" | ||
|
|
||
| #Sanity checks | ||
| [ -r $HOME/my.cnf ] | ||
| [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld | ||
| /lib/init/apparmor-profile-load usr.sbin.mysqld | ||
|
|
||
| # check for diskspace shortage | ||
| datadir=`mysqld_get_param datadir` | ||
| BLOCKSIZE=`LC_ALL=C df --portability $datadir/. | tail -n 1 | awk '{print $4}'` | ||
| if [ $BLOCKSIZE -le 4096 ] ; then | ||
| echo "$0: ERROR: The partition with $datadir is too full!" >&2 | ||
| echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER | ||
| exit 1 | ||
| fi | ||
| end script | ||
|
|
||
| exec /usr/sbin/mysqld | ||
|
|
||
| post-start script | ||
| for i in `seq 1 30` ; do | ||
| /usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && { | ||
| exec "${HOME}"/debian-start | ||
| # should not reach this line | ||
| exit 2 | ||
| } | ||
| statusnow=`status` | ||
| if echo $statusnow | grep -q 'stop/' ; then | ||
| exit 0 | ||
| elif echo $statusnow | grep -q 'respawn/' ; then | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
| exit 1 | ||
| end script |
| @@ -0,0 +1,282 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| . /usr/share/debconf/confmodule | ||
|
|
||
| if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi | ||
| ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } | ||
|
|
||
| export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin | ||
|
|
||
| # This command can be used as pipe to syslog. With "-s" it also logs to stderr. | ||
| ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i" | ||
|
|
||
| invoke() { | ||
| if [ -x /usr/sbin/invoke-rc.d ]; then | ||
| invoke-rc.d mysql $1 | ||
| else | ||
| /etc/init.d/mysql $1 | ||
| fi | ||
| } | ||
|
|
||
| MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables" | ||
|
|
||
| test_mysql_access() { | ||
| mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1 | ||
| } | ||
|
|
||
| # call with $1 = "online" to connect to the server, otherwise it bootstraps | ||
| set_mysql_rootpw() { | ||
| # forget we ever saw the password. don't use reset to keep the seen status | ||
| db_set mysql-server/root_password "" | ||
| db_set mysql-server/root_password_again "" | ||
|
|
||
| tfile=`mktemp` | ||
| if [ ! -f "$tfile" ]; then | ||
| return 1 | ||
| fi | ||
|
|
||
| # this avoids us having to call "test" or "[" on $rootpw | ||
| cat << EOF > $tfile | ||
| USE mysql; | ||
| UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root'; | ||
| FLUSH PRIVILEGES; | ||
| EOF | ||
| if grep -q 'PASSWORD("")' $tfile; then | ||
| retval=0 | ||
| elif [ "$1" = "online" ]; then | ||
| mysql --no-defaults -u root -h localhost <$tfile >/dev/null | ||
| retval=$? | ||
| else | ||
| $MYSQL_BOOTSTRAP <$tfile | ||
| retval=$? | ||
| fi | ||
| rm -f $tfile | ||
| return $retval | ||
| } | ||
|
|
||
| # This is necessary because mysql_install_db removes the pid file in /var/run | ||
| # and because changed configuration options should take effect immediately. | ||
| # In case the server wasn't running at all it should be ok if the stop | ||
| # script fails. I can't tell at this point because of the cleaned /var/run. | ||
| set +e; invoke stop; set -e | ||
|
|
||
| case "$1" in | ||
| configure) | ||
| mysql_datadir=/usr/share/mysql | ||
| mysql_statedir=/var/lib/mysql | ||
| mysql_rundir=/var/run/mysqld | ||
| mysql_logdir=/var/log | ||
| mysql_cfgdir=/etc/mysql | ||
| mysql_newlogdir=/var/log/mysql | ||
| mysql_upgradedir=/var/lib/mysql-upgrade | ||
|
|
||
| # first things first, if the following symlink exists, it is a preserved | ||
| # copy the old data dir from a mysql upgrade that would have otherwise | ||
| # been replaced by an empty mysql dir. this should restore it. | ||
| for dir in DATADIR LOGDIR; do | ||
| if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi | ||
| savelink="$mysql_upgradedir/$dir.link" | ||
| if [ -L "$savelink" ]; then | ||
| # If the targetdir was a symlink before we upgraded it is supposed | ||
| # to be either still be present or not existing anymore now. | ||
| if [ -L "$targetdir" ]; then | ||
| rm "$savelink" | ||
| elif [ ! -d "$targetdir" ]; then | ||
| mv "$savelink" "$targetdir" | ||
| else | ||
| # this should never even happen, but just in case... | ||
| mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX` | ||
| echo "this is very strange! see $mysql_tmp/README..." >&2 | ||
| mv "$targetdir" "$mysql_tmp" | ||
| cat << EOF > "$mysql_tmp/README" | ||
|
|
||
| if you're reading this, it's most likely because you had replaced /var/lib/mysql | ||
| with a symlink, then upgraded to a new version of mysql, and then dpkg | ||
| removed your symlink (see #182747 and others). the mysql packages noticed | ||
| that this happened, and as a workaround have restored it. however, because | ||
| /var/lib/mysql seems to have been re-created in the meantime, and because | ||
| we don't want to rm -rf something we don't know as much about, we're going | ||
| to leave this unexpected directory here. if your database looks normal, | ||
| and this is not a symlink to your database, you should be able to blow | ||
| this all away. | ||
|
|
||
| EOF | ||
| fi | ||
| fi | ||
| rmdir $mysql_upgradedir 2>/dev/null || true | ||
| done | ||
|
|
||
| # Ensure the existence and right permissions for the database and | ||
| # log files. | ||
| if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi | ||
| if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi | ||
| if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi | ||
| # When creating an ext3 jounal on an already mounted filesystem like e.g. | ||
| # /var/lib/mysql, you get a .journal file that is not modifyable by chown. | ||
| # The mysql_datadir must not be writable by the mysql user under any | ||
| # circumstances as it contains scripts that are executed by root. | ||
| set +e | ||
| chown -R 0:0 $mysql_datadir | ||
| chown -R mysql $mysql_statedir | ||
| chmod 700 $mysql_statedir $mysql_statedir/mysql | ||
| if [ ! -d "$mysql_rundir" ]; then mkdir "$mysql_rundir"; fi | ||
| chown -R mysql $mysql_rundir | ||
| chown -R mysql:adm $mysql_newlogdir; chmod 2750 $mysql_newlogdir; | ||
| for i in log err; do | ||
| touch $mysql_logdir/mysql.$i | ||
| chown mysql:adm $mysql_logdir/mysql.$i | ||
| chmod 0640 $mysql_logdir/mysql.$i | ||
| done | ||
| set -e | ||
|
|
||
| # This is important to avoid dataloss when there is a removed | ||
| # mysql-server version from Woody lying around which used the same | ||
| # data directory and then somewhen gets purged by the admin. | ||
| db_set mysql-server/postrm_remove_database false || true | ||
|
|
||
| # To avoid downgrades. | ||
| touch $mysql_statedir/debian-5.5.flag | ||
|
|
||
| # initiate databases. Output is not allowed by debconf :-( | ||
| # Debian: beware of the bashisms... | ||
| # Debian: can safely run on upgrades with existing databases | ||
| set +e | ||
| bash /usr/bin/mysql_install_db --rpm 2>&1 | $ERR_LOGGER | ||
| if [ "$?" != "0" ]; then | ||
| echo "ATTENTION: An error has occured. More info is in the syslog!" | ||
| fi | ||
| set -e | ||
|
|
||
| ## On every reconfiguration the maintenance user is recreated. | ||
| # | ||
| # - It is easier to regenerate the password every time but as people | ||
| # use fancy rsync scripts and file alteration monitors, the existing | ||
| # password is used and existing files not touched. | ||
| # - The mysqld statement is like that in mysql_install_db because the | ||
| # server is not already running. This has some implications: | ||
| # - The amount of newlines and semicolons in the query is important! | ||
| # - GRANT is not possible with --skip-grant-tables and "INSERT | ||
| # (user,host..) VALUES" is not --ansi compliant | ||
| # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo. | ||
| # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv | ||
| # may not be present as old Woody 3.23 databases did not have it and the | ||
| # admin might not already have run mysql_upgrade which adds them. | ||
| # As the binlog cron scripts to need at least the Super_priv, I do first | ||
| # the old query which always succeeds and then the new which may or may not. | ||
|
|
||
| # recreate the credentials file if not present or without mysql_upgrade stanza | ||
| dc=$mysql_cfgdir/debian.cnf; | ||
| if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then | ||
| pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`" | ||
| else | ||
| pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; | ||
| if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi | ||
| umask 066 | ||
| cat /dev/null > $dc | ||
| umask 022 | ||
| echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc | ||
| echo "[client]" >>$dc | ||
| echo "host = localhost" >>$dc | ||
| echo "user = debian-sys-maint" >>$dc | ||
| echo "password = $pass" >>$dc | ||
| echo "socket = $mysql_rundir/mysqld.sock" >>$dc | ||
| echo "[mysql_upgrade]" >>$dc | ||
| echo "host = localhost" >>$dc | ||
| echo "user = debian-sys-maint" >>$dc | ||
| echo "password = $pass" >>$dc | ||
| echo "socket = $mysql_rundir/mysqld.sock" >>$dc | ||
| echo "basedir = /usr" >>$dc | ||
| fi | ||
| # If this dir chmod go+w then the admin did it. But this file should not. | ||
| chown 0:0 $dc | ||
| chmod 0600 $dc | ||
|
|
||
| # update privilege tables | ||
| password_column_fix_query=`echo -e \ | ||
| "USE mysql\n" \ | ||
| "ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL"`; | ||
| replace_query=`echo -e \ | ||
| "USE mysql\n" \ | ||
| "REPLACE INTO user SET " \ | ||
| " host='localhost', user='debian-sys-maint', password=password('$pass'), " \ | ||
| " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \ | ||
| " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \ | ||
| " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \ | ||
| " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\ | ||
| " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\ | ||
| " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\ | ||
| " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\ | ||
| " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`; | ||
| fix_privs=`echo -e \ | ||
| "USE mysql;\n" \ | ||
| "ALTER TABLE user ADD column Create_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ | ||
| "ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ | ||
| "ALTER TABLE user ADD column Create_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ | ||
| "ALTER TABLE user ADD column Alter_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ | ||
| "ALTER TABLE user ADD column Create_user_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ | ||
| "ALTER TABLE user ADD column Event_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ | ||
| "ALTER TABLE user ADD column Trigger_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " ` | ||
| # Engines supported by etch should be installed per default. The query sequence is supposed | ||
| # to be aborted if the CREATE TABLE fails due to an already existent table in which case the | ||
| # admin might already have chosen to remove one or more plugins. Newlines are necessary. | ||
| install_plugins=`echo -e \ | ||
| "USE mysql;\n" \ | ||
| "CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \ | ||
| " dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \ | ||
| " PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';\n" \ | ||
| "INSERT INTO plugin VALUES ('innodb', 'ha_innodb.so');\n" \ | ||
| "INSERT INTO plugin VALUES ('federated', 'ha_federated.so');\n" \ | ||
| "INSERT INTO plugin VALUES ('blackhole', 'ha_blackhole.so');\n" \ | ||
| "INSERT INTO plugin VALUES ('archive', 'ha_archive.so');" ` | ||
|
|
||
| # Upgrade password column format before the root password gets set. | ||
| echo "$password_column_fix_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER | ||
|
|
||
| db_get mysql-server/root_password && rootpw="$RET" | ||
| if ! set_mysql_rootpw; then | ||
| password_error="yes" | ||
| fi | ||
|
|
||
| echo "$fix_privs" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER | ||
| echo "$replace_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER | ||
| set +e | ||
| echo "$install_plugins" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER | ||
| set -e | ||
| ;; | ||
|
|
||
| abort-upgrade|abort-remove|abort-configure) | ||
| ;; | ||
|
|
||
| *) | ||
| echo "postinst called with unknown argument '$1'" 1>&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # here we check to see if we can connect as root without a password | ||
| # this should catch upgrades from previous versions where the root | ||
| # password wasn't set. if there is a password, or if the connection | ||
| # fails for any other reason, nothing happens. | ||
| if [ "$1" = "configure" ]; then | ||
| if test_mysql_access; then | ||
| db_input medium mysql-server/root_password || true | ||
| db_go | ||
| db_get mysql-server/root_password && rootpw="$RET" | ||
|
|
||
| if ! set_mysql_rootpw "online"; then | ||
| password_error="yes" | ||
| fi | ||
| fi | ||
|
|
||
| if [ "$password_error" = "yes" ]; then | ||
| db_input high mysql-server/error_setting_password || true | ||
| db_go | ||
| fi | ||
|
|
||
| fi | ||
|
|
||
| db_stop # in case invoke failes | ||
|
|
||
| #DEBHELPER# | ||
|
|
||
| exit 0 |
| @@ -0,0 +1,83 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| # It is possible that Debconf has already been removed, too. | ||
| if [ -f /usr/share/debconf/confmodule ]; then | ||
| . /usr/share/debconf/confmodule | ||
| fi | ||
|
|
||
| if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi | ||
| ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } | ||
|
|
||
| MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" | ||
|
|
||
| # Try to stop the server in a sane way. If it does not success let the admin | ||
| # do it himself. No database directories should be removed while the server | ||
| # is running! | ||
| stop_server() { | ||
| set +e | ||
| if [ -x /usr/sbin/invoke-rc.d ]; then | ||
| invoke-rc.d mysql stop | ||
| else | ||
| /etc/init.d/mysql stop | ||
| fi | ||
| errno=$? | ||
| set -e | ||
|
|
||
| if [ "$?" != 0 ]; then | ||
| echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 | ||
| echo "Stop it yourself and try again!" 1>&2 | ||
| exit 1 | ||
| fi | ||
| } | ||
|
|
||
| case "$1" in | ||
| purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | ||
| if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then | ||
| stop_server | ||
| sleep 2 | ||
| fi | ||
| ;; | ||
| *) | ||
| echo "postrm called with unknown argument '$1'" 1>&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| # | ||
| # - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) | ||
| # - Remove the mysql user only after all his owned files are purged. | ||
| # | ||
| if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then | ||
| # we remove the mysql user only after all his owned files are purged | ||
| rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} | ||
| rm -rf /var/log/mysql | ||
|
|
||
| db_input high mysql-server-5.5/postrm_remove_databases || true | ||
| db_go || true | ||
| db_get mysql-server-5.5/postrm_remove_databases || true | ||
| if [ "$RET" = "true" ]; then | ||
| # never remove the debian.cnf when the databases are still existing | ||
| # else we ran into big trouble on the next install! | ||
| rm -f /etc/mysql/debian.cnf | ||
| rm -rf /var/lib/mysql | ||
| rm -rf /var/run/mysqld | ||
| userdel mysql || true | ||
| fi | ||
|
|
||
| # (normally) Automatically added by dh_installinit | ||
| if [ "$1" = "purge" ] ; then | ||
| update-rc.d mysql remove >/dev/null || exit 0 | ||
| fi | ||
| # (normally) End automatically added section | ||
| fi | ||
|
|
||
| # (normally) Automatically added by dh_installdebconf | ||
| if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then | ||
| . /usr/share/debconf/confmodule | ||
| db_purge | ||
| fi | ||
| # (normally) End automatically added section | ||
|
|
||
| #DEBHELPER# | ||
|
|
||
| exit 0 |
| @@ -0,0 +1,183 @@ | ||
| #!/bin/bash -e | ||
| # | ||
| # summary of how this script can be called: | ||
| # * <new-preinst> install | ||
| # * <new-preinst> install <old-version> | ||
| # * <new-preinst> upgrade <old-version> | ||
| # * <old-preinst> abort-upgrade <new-version> | ||
| # | ||
|
|
||
| . /usr/share/debconf/confmodule | ||
|
|
||
| if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi | ||
| ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } | ||
|
|
||
| export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin | ||
| MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" | ||
| DATADIR=/var/lib/mysql | ||
| LOGDIR=/var/log/mysql | ||
| UPGRADEDIR=/var/lib/mysql-upgrade | ||
|
|
||
| # Try to stop the server in a sane way. If it does not success let the admin | ||
| # do it himself. No database directories should be removed while the server | ||
| # is running! Another mysqld in e.g. a different chroot is fine for us. | ||
| stop_server() { | ||
| if [ ! -x /etc/init.d/mysql ]; then return; fi | ||
|
|
||
| set +e | ||
| if [ -x /usr/sbin/invoke-rc.d ]; then | ||
| cmd="invoke-rc.d mysql stop" | ||
| else | ||
| cmd="/etc/init.d/mysql stop" | ||
| fi | ||
| $cmd | ||
| errno=$? | ||
| set -e | ||
|
|
||
| # 0=ok, 100=no init script (fresh install) | ||
| if [ "$errno" != 0 -a "$errno" != 100 ]; then | ||
| echo "${cmd/ */} returned $errno" 1>&2 | ||
| echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2 | ||
| echo "Stop it yourself and try again!" 1>&2 | ||
| db_stop | ||
| exit 1 | ||
| fi | ||
| } | ||
|
|
||
| ################################ main() ########################## | ||
|
|
||
| this_version=5.5 | ||
|
|
||
| # Abort if an NDB cluster is in use. | ||
| if egrep -qi -r '^[^#]*ndb.connectstring|^[[:space:]]*\[[[:space:]]*ndb_mgmd' /etc/mysql/; then | ||
| db_fset mysql-server/no_upgrade_when_using_ndb seen false || true | ||
| db_input high mysql-server/no_upgrade_when_using_ndb || true | ||
| db_go | ||
| db_stop | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Abort if skip-bdb option is enabled, required for 5.0 -> 5.1 upgrades. | ||
| #TODO | ||
|
|
||
| # Safe the user from stupidities. | ||
| show_downgrade_warning=0 | ||
| for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do | ||
| found_version=`echo $i | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'` | ||
| if dpkg --compare-versions "$this_version" '<<' "$found_version"; then | ||
| show_downgrade_warning=1 | ||
| break; | ||
| fi | ||
| done | ||
| if [ "$show_downgrade_warning" = 1 ]; then | ||
| db_fset mysql-server-$this_version/really_downgrade seen false || true | ||
| db_input medium mysql-server-$this_version/really_downgrade || true | ||
| db_go | ||
| db_get mysql-server-$this_version/really_downgrade || true | ||
| if [ "$RET" = "true" ]; then | ||
| rm -f $DATADIR/debian-*.flag | ||
| touch $DATADIR/debian-$this_version.flag | ||
| else | ||
| echo "Aborting downgrade from (at least) $found_version to $this_version." 1>&2 | ||
| echo "If are sure you want to downgrade to $this_version, remove the file" 1>&2 | ||
| echo "$DATADIR/debian-*.flag and try installing again." 1>&2 | ||
| db_stop | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| # to be sure | ||
| stop_server | ||
|
|
||
| # If we use NIS then errors should be tolerated. It's up to the | ||
| # user to ensure that the mysql user is correctly setup. | ||
| # Beware that there are two ypwhich one of them needs the 2>/dev/null! | ||
| if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then | ||
| set +e | ||
| fi | ||
|
|
||
| # | ||
| # Now we have to ensure the following state: | ||
| # /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false | ||
| # /etc/group: mysql:x:101: | ||
| # | ||
| # Sadly there could any state be present on the system so we have to | ||
| # modify everything carefully i.e. not doing a chown before creating | ||
| # the user etc... | ||
| # | ||
|
|
||
| # creating mysql group if he isn't already there | ||
| if ! getent group mysql >/dev/null; then | ||
| # Adding system group: mysql. | ||
| addgroup --system mysql >/dev/null | ||
| fi | ||
|
|
||
| # creating mysql user if he isn't already there | ||
| if ! getent passwd mysql >/dev/null; then | ||
| # Adding system user: mysql. | ||
| adduser \ | ||
| --system \ | ||
| --disabled-login \ | ||
| --ingroup mysql \ | ||
| --no-create-home \ | ||
| --home /nonexistent \ | ||
| --gecos "MySQL Server" \ | ||
| --shell /bin/false \ | ||
| mysql >/dev/null | ||
| fi | ||
|
|
||
| # end of NIS tolerance zone | ||
| set -e | ||
|
|
||
| # if there's a symlink, let's store where it's pointing, because otherwise | ||
| # it's going to be lost in some situations | ||
| for dir in DATADIR LOGDIR; do | ||
| checkdir=`eval echo "$"$dir` | ||
| if [ -L "$checkdir" ]; then | ||
| mkdir -p "$UPGRADEDIR" | ||
| cp -d "$checkdir" "$UPGRADEDIR/$dir.link" | ||
| fi | ||
| done | ||
|
|
||
| # creating mysql home directory | ||
| if [ ! -d $DATADIR -a ! -L $DATADIR ]; then | ||
| mkdir $DATADIR | ||
| fi | ||
|
|
||
| # checking disc space | ||
| if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4>1000) }'; then | ||
| echo "ERROR: There's not enough space in $DATADIR/" 1>&2 | ||
| db_stop | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Since the home directory was created before putting the user into | ||
| # the mysql group and moreover we cannot guarantee that the | ||
| # permissions were correctly *before* calling this script, we fix them now. | ||
| # In case we use NIS and no mysql user is present then this script should | ||
| # better fail now than later.. | ||
| # The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is | ||
| # not chgrp'able (#318435). | ||
| set +e | ||
| chown mysql:mysql $DATADIR | ||
| find $DATADIR -follow -not -group mysql -print0 2>/dev/null \ | ||
| | xargs -0 --no-run-if-empty chgrp mysql | ||
| set -e | ||
|
|
||
| # Some files below /etc/ were possibly in the mysql-server-5.0/etch package | ||
| # before. They get overwritten by current ones to avoid unnecessary dpkg questions. | ||
| while read md5 file; do | ||
| if [ "`md5sum $file 2>/dev/null`" = "$md5 $file" ]; then | ||
| cp /usr/share/mysql-common/internal-use-only/`echo $file | sed 's�/�_�g'` $file | ||
| fi | ||
| done <<EOT | ||
| 6691f2fdc5c6d27ff0260eb79813e1bc /etc/init.d/mysql | ||
| b53b9552d44661361d39157c3c7c51d3 /etc/logrotate.d/mysql-server | ||
| 57f3e58f72582ca55100dc1ba0f1a8ae /etc/mysql/debian-start | ||
| EOT | ||
|
|
||
| db_stop | ||
|
|
||
| #DEBHELPER# | ||
|
|
||
| exit 0 |
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| . /usr/share/debconf/confmodule | ||
|
|
||
| if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi | ||
| ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } | ||
|
|
||
| #DEBHELPER# |
| @@ -0,0 +1,58 @@ | ||
| '''apport package hook for mysql-5.5 | ||
|
|
||
| (c) 2009 Canonical Ltd. | ||
| Author: Mathias Gug <mathias.gug@canonical.com> | ||
| ''' | ||
|
|
||
| import os, os.path | ||
|
|
||
| from apport.hookutils import * | ||
|
|
||
| def _add_my_conf_files(report, filename): | ||
| key = 'MySQLConf' + path_to_key(filename) | ||
| report[key] = "" | ||
| for line in read_file(filename).split('\n'): | ||
| try: | ||
| if 'password' in line.split('=')[0]: | ||
| line = "%s = @@APPORTREPLACED@@" % (line.split('=')[0]) | ||
| report[key] += line + '\n' | ||
| except IndexError: | ||
| continue | ||
|
|
||
| def add_info(report): | ||
| attach_conffiles(report, 'mysql-server-5.5', conffiles=None) | ||
| key = 'Logs' + path_to_key('/var/log/daemon.log') | ||
| report[key] = "" | ||
| for line in read_file('/var/log/daemon.log').split('\n'): | ||
| try: | ||
| if 'mysqld' in line.split()[4]: | ||
| report[key] += line + '\n' | ||
| except IndexError: | ||
| continue | ||
| key = 'Logs' + path_to_key('/var/log/kern.log') | ||
| report[key] = "" | ||
| for line in read_file('/var/log/kern.log').split('\n'): | ||
| try: | ||
| if '/usr/sbin/mysqld' in string.join(line.split()[4:]): | ||
| report[key] += line + '\n' | ||
| except IndexError: | ||
| continue | ||
| if os.path.exists('/var/log/mysql/error.log'): | ||
| key = 'Logs' + path_to_key('/var/log/mysql/error.log') | ||
| report[key] = "" | ||
| for line in read_file('/var/log/mysql/error.log').split('\n'): | ||
| report[key] += line + '\n' | ||
| attach_file(report,'/etc/apparmor.d/usr.sbin.mysqld') | ||
| _add_my_conf_files(report, '/etc/mysql/my.cnf') | ||
| for f in os.listdir('/etc/mysql/conf.d'): | ||
| _add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f)) | ||
| try: | ||
| report['MySQLVarLibDirListing'] = unicode(os.listdir('/var/lib/mysql')) | ||
| except OSError: | ||
| report['MySQLVarLibDirListing'] = unicode(False) | ||
|
|
||
| if __name__ == '__main__': | ||
| report = {} | ||
| add_info(report) | ||
| for key in report: | ||
| print '%s: %s' % (key, report[key].split('\n', 1)[0]) |