Guest User

Untitled

a guest
Apr 13th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.63 KB | None | 0 0
  1. Setting up mysql-server-5.0 (5.0.38-0ubuntu1.1) ...
  2.  
  3. . /usr/share/debconf/confmodule
  4. + . /usr/share/debconf/confmodule
  5. #!/bin/sh
  6. # This is a shell library to interface to the Debian configuration management
  7. # system.
  8.  
  9. ###############################################################################
  10. # Initialization.
  11.  
  12. # Check to see if a FrontEnd is running.
  13. if [ ! "$DEBIAN_HAS_FRONTEND" ]; then
  14. PERL_DL_NONLAZY=1
  15. export PERL_DL_NONLAZY
  16. # Since there is no FrontEnd, this program execs a FrontEnd.
  17. # It will then run a new copy of $0 that can talk to it.
  18. if [ "$DEBCONF_USE_CDEBCONF" ]; then
  19. exec /usr/lib/cdebconf/debconf $0 "$@"
  20. else
  21. exec /usr/share/debconf/frontend $0 "$@"
  22. fi
  23. fi
  24. ++ '[' '!' '' ']'
  25. ++ PERL_DL_NONLAZY=1
  26. ++ export PERL_DL_NONLAZY
  27. ++ '[' '' ']'
  28. ++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/mysql-server-5.0.postinst configure 5.0.38-0ubuntu1
  29.  
  30. . /usr/share/debconf/confmodule
  31. + . /usr/share/debconf/confmodule
  32. #!/bin/sh
  33. # This is a shell library to interface to the Debian configuration management
  34. # system.
  35.  
  36. ###############################################################################
  37. # Initialization.
  38.  
  39. # Check to see if a FrontEnd is running.
  40. if [ ! "$DEBIAN_HAS_FRONTEND" ]; then
  41. PERL_DL_NONLAZY=1
  42. export PERL_DL_NONLAZY
  43. # Since there is no FrontEnd, this program execs a FrontEnd.
  44. # It will then run a new copy of $0 that can talk to it.
  45. if [ "$DEBCONF_USE_CDEBCONF" ]; then
  46. exec /usr/lib/cdebconf/debconf $0 "$@"
  47. else
  48. exec /usr/share/debconf/frontend $0 "$@"
  49. fi
  50. fi
  51. ++ '[' '!' 1 ']'
  52.  
  53. # Only do this once.
  54. if [ -z "$DEBCONF_REDIR" ]; then
  55. # Redirect standard output to standard error. This prevents common
  56. # mistakes by making all the output of the postinst or whatever
  57. # script is using this library not be parsed as confmodule commands.
  58. #
  59. # To actually send something to standard output, send it to fd 3.
  60. exec 3>&1
  61. if [ "$DEBCONF_USE_CDEBCONF" ]; then
  62. exec 1>&5
  63. else
  64. exec 1>&2
  65. fi
  66. DEBCONF_REDIR=1
  67. export DEBCONF_REDIR
  68. fi
  69. ++ '[' -z '' ']'
  70. ++ exec
  71. ++ '[' '' ']'
  72. ++ exec
  73. ++ DEBCONF_REDIR=1
  74. ++ export DEBCONF_REDIR
  75.  
  76. ###############################################################################
  77. # Commands.
  78.  
  79. _db_cmd () {
  80. IFS=' ' printf '%s\n' "$*" >&3
  81. # Set to newline to get whole line.
  82. IFS='
  83. ' read -r _db_internal_line
  84. # Disgusting, but it's the only good way to split the line,
  85. # preserving all other whitespace.
  86. RET="${_db_internal_line#[! ][ ]}"
  87. case ${_db_internal_line%%[ ]*} in
  88. 1) # escaped data
  89. RET="$(printf '%s' "$RET" | debconf-escape -u)"
  90. return 0
  91. ;;
  92. esac
  93. return ${_db_internal_line%%[ ]*}
  94. }
  95.  
  96. db_capb () { _db_cmd "CAPB $@"; }
  97. db_set () { _db_cmd "SET $@"; }
  98. db_reset () { _db_cmd "RESET $@"; }
  99. db_title () { _db_cmd "TITLE $@"; }
  100. db_input () { _db_cmd "INPUT $@"; }
  101. db_beginblock () { _db_cmd "BEGINBLOCK $@"; }
  102. db_endblock () { _db_cmd "ENDBLOCK $@"; }
  103. db_go () { _db_cmd "GO $@"; }
  104. db_get () { _db_cmd "GET $@"; }
  105. db_register () { _db_cmd "REGISTER $@"; }
  106. db_unregister () { _db_cmd "UNREGISTER $@"; }
  107. db_subst () { _db_cmd "SUBST $@"; }
  108. db_fset () { _db_cmd "FSET $@"; }
  109. db_fget () { _db_cmd "FGET $@"; }
  110. db_purge () { _db_cmd "PURGE $@"; }
  111. db_metaget () { _db_cmd "METAGET $@"; }
  112. db_version () { _db_cmd "VERSION $@"; }
  113. db_clear () { _db_cmd "CLEAR $@"; }
  114. db_settitle () { _db_cmd "SETTITLE $@"; }
  115. db_previous_module () { _db_cmd "PREVIOUS_MODULE $@"; }
  116. db_info () { _db_cmd "INFO $@"; }
  117. db_progress () { _db_cmd "PROGRESS $@"; }
  118.  
  119. # An old alias for input.
  120. db_text () {
  121. db_input $@
  122. }
  123.  
  124. # Cannot read a return code, since there is none and it would block.
  125. db_stop () {
  126. echo STOP >&3
  127. }
  128.  
  129. if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
  130. + '[' -n '' ']'
  131. ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
  132.  
  133. export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
  134. + export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin
  135. + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/bin:/usr/bin
  136.  
  137. # This command can be used as pipe to syslog. With "-s" it also logs to stderr.
  138. ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
  139. + ERR_LOGGER='logger -p daemon.err -t mysqld_safe -i'
  140.  
  141. invoke() {
  142. if [ -x /usr/sbin/invoke-rc.d ]; then
  143. invoke-rc.d mysql $1
  144. else
  145. /etc/init.d/mysql $1
  146. fi
  147. }
  148.  
  149. MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --skip-bdb --skip-innodb "
  150. + MYSQL_BOOTSTRAP='/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --skip-bdb --skip-innodb '
  151.  
  152. test_mysql_access() {
  153. mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
  154. }
  155.  
  156. # call with $1 = "online" to connect to the server, otherwise it bootstraps
  157. set_mysql_rootpw() {
  158. # forget we ever saw the password. don't use reset to keep the seen status
  159. db_set mysql-server/root_password ""
  160.  
  161. tfile=`mktemp`
  162. if [ ! -f "$tfile" ]; then
  163. return 1
  164. fi
  165.  
  166. # this avoids us having to call "test" or "[" on $rootpw
  167. cat << EOF > $tfile
  168. USE mysql;
  169. UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
  170. FLUSH PRIVILEGES;
  171. EOF
  172. if grep -q 'PASSWORD("")' $tfile; then
  173. retval=0
  174. elif [ "$1" = "online" ]; then
  175. mysql --no-defaults -u root -h localhost <$tfile >/dev/null
  176. retval=$?
  177. else
  178. $MYSQL_BOOTSTRAP <$tfile
  179. retval=$?
  180. fi
  181. rm -f $tfile
  182. return $retval
  183. }
  184.  
  185. # This is necessary because mysql_install_db removes the pid file in /var/run
  186. # and because changed configuration options should take effect immediately.
  187. # In case the server wasn't running at all it should be ok if the stop
  188. # script fails. I can't tell at this point because of the cleaned /var/run.
  189. set +e; invoke stop; set -e
  190. + set +e
  191. + invoke stop
  192. + '[' -x /usr/sbin/invoke-rc.d ']'
  193. + invoke-rc.d mysql stop
  194. * Stopping MySQL database server mysqld
  195. ...done.
  196. + set -e
  197.  
  198. case "$1" in
  199. configure)
  200. mysql_cnf=/etc/mysql/my.cnf
  201. mysql_datadir=/usr/share/mysql
  202. mysql_statedir=/var/lib/mysql
  203. mysql_rundir=/var/run/mysqld
  204. mysql_logdir=/var/log
  205. mysql_cfgdir=/etc/mysql
  206. mysql_newlogdir=/var/log/mysql
  207. mysql_upgradedir=/var/lib/mysql-upgrade
  208.  
  209. # first things first, if the following symlink exists, it is a preserved
  210. # copy the old data dir from a mysql upgrade that would have otherwise
  211. # been replaced by an empty mysql dir. this should restore it.
  212. for dir in DATADIR LOGDIR; do
  213. if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi
  214. savelink="$mysql_upgradedir/$dir.link"
  215. if [ -L "$savelink" ]; then
  216. # If the targetdir was a symlink before we upgraded it is supposed
  217. # to be either still be present or not existing anymore now.
  218. if [ -L "$targetdir" ]; then
  219. rm "$savelink"
  220. elif [ ! -d "$targetdir" ]; then
  221. mv "$savelink" "$targetdir"
  222. else
  223. # this should never even happen, but just in case...
  224. mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX`
  225. echo "this is very strange! see $mysql_tmp/README..." >&2
  226. mv "$targetdir" "$mysql_tmp"
  227. cat << EOF > "$mysql_tmp/README"
  228.  
  229. if you're reading this, it's most likely because you had replaced /var/lib/mysql
  230. with a symlink, then upgraded to a new version of mysql, and then dpkg
  231. removed your symlink (see #182747 and others). the mysql packages noticed
  232. that this happened, and as a workaround have restored it. however, because
  233. /var/lib/mysql seems to have been re-created in the meantime, and because
  234. we don't want to rm -rf something we don't know as much about, we're going
  235. to leave this unexpected directory here. if your database looks normal,
  236. and this is not a symlink to your database, you should be able to blow
  237. this all away.
  238.  
  239. EOF
  240. fi
  241. fi
  242. rmdir $mysql_upgradedir 2>/dev/null || true
  243. done
  244.  
  245. # Ensure the existence and right permissions for the database and
  246. # log files.
  247. if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi
  248. if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi
  249. if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi
  250. # When creating an ext3 jounal on an already mounted filesystem like e.g.
  251. # /var/lib/mysql, you get a .journal file that is not modifyable by chown.
  252. # The mysql_datadir must not be writable by the mysql user under any
  253. # circumstances as it contains scripts that are executed by root.
  254. set +e
  255. chown -R 0.0 $mysql_datadir
  256. chown -R mysql $mysql_statedir
  257. chown -R mysql $mysql_rundir
  258. chown -R mysql:adm $mysql_newlogdir; chmod 2750 $mysql_newlogdir;
  259. for i in log err; do
  260. touch $mysql_logdir/mysql.$i
  261. chown mysql:adm $mysql_logdir/mysql.$i
  262. chmod 0640 $mysql_logdir/mysql.$i
  263. done
  264. set -e
  265.  
  266. # This is important to avoid dataloss when there is a removed
  267. # mysql-server version from Woody lying around which used the same
  268. # data directory and then somewhen gets purged by the admin.
  269. db_set mysql-server/postrm_remove_database false || true
  270.  
  271. # So that mysql-server (4.0) can check if it's safe to install.
  272. touch $mysql_statedir/debian-5.0.flag
  273.  
  274. # On dist-upgrades, we ensure that the old_password setting is updated
  275. # before passwords are changed. Except for that my.cnf is taboo!
  276. db_get mysql-server-5.0/need_sarge_compat_done || true
  277. if [ "$RET" = "false" ]; then
  278. db_get mysql-server-5.0/need_sarge_compat
  279. echo -e "# created by debconf\n[mysqld]\nold_passwords = $RET" > /etc/mysql/conf.d/old_passwords.cnf
  280. fi
  281. db_set mysql-server-5.0/need_sarge_compat_done true
  282.  
  283. # initiate databases. Output is not allowed by debconf :-(
  284. # Debian: beware of the bashisms...
  285. # Debian: can safely run on upgrades with existing databases
  286. set +e
  287. /bin/bash /usr/bin/mysql_install_db --rpm 2>&1 | $ERR_LOGGER
  288. if [ "$?" != "0" ]; then
  289. echo "ATTENTION: An error has occured. More info is in the syslog!"
  290. fi
  291. set -e
  292.  
  293. ## On every reconfiguration the maintenance user is recreated.
  294. #
  295. # - It is easier to regenerate the password every time but as people
  296. # use fancy rsync scripts and file alteration monitors, the existing
  297. # password is used and existing files not touched.
  298. # - The mysqld statement is like that in mysql_install_db because the
  299. # server is not already running. This has some implications:
  300. # - The amount of newlines and semicolons in the query is important!
  301. # - GRANT is not possible with --skipt-grant-tables and "INSERT
  302. # (user,host..) VALUES" is not --ansi compliant
  303. # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo.
  304. # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv
  305. # may not be present as old Woody 3.23 databases did not have it and the
  306. # admin might not already have run mysql_upgrade which adds them.
  307. # As the binlog cron scripts to need at least the Super_priv, I do first
  308. # the old query which always succeeds and then the new which may or may not.
  309.  
  310. # recreate the credentials file if not present or without mysql_upgrade stanza
  311. dc=$mysql_cfgdir/debian.cnf;
  312. if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then
  313. pass="`sed -n 's/password *= *// p' $dc | head -n 1`"
  314. else
  315. pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
  316. if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
  317. cat /dev/null > $dc
  318. echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
  319. echo "[client]" >>$dc
  320. echo "host = localhost" >>$dc
  321. echo "user = debian-sys-maint" >>$dc
  322. echo "password = $pass" >>$dc
  323. echo "socket = $mysql_rundir/mysqld.sock" >>$dc
  324. echo "[mysql_upgrade]" >>$dc
  325. echo "user = debian-sys-maint" >>$dc
  326. echo "password = $pass" >>$dc
  327. echo "socket = $mysql_rundir/mysqld.sock" >>$dc
  328. echo "basedir = /usr" >>$dc
  329. fi
  330. # If this dir chmod go+w then the admin did it. But this file should not.
  331. chown 0:0 $dc
  332. chmod 0600 $dc
  333.  
  334. # update privilege and timezone tables
  335. password_column_fix_query=`/bin/echo -e \
  336. "USE mysql\n" \
  337. "ALTER TABLE user CHANGE password Password varchar(41) collate utf8_bin NOT NULL default ''"`;
  338. replace_query=`/bin/echo -e \
  339. "USE mysql\n" \
  340. "REPLACE INTO user SET " \
  341. " host='localhost', user='debian-sys-maint', password=password('$pass'), " \
  342. " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
  343. " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
  344. " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
  345. " Index_priv='Y', Alter_priv='Y' __EXTRA_PRIVS__"`;
  346. extra_privs=`/bin/echo -e \
  347. ", Show_db_priv='Y' " \
  348. ", Super_priv='Y' " \
  349. ", Create_tmp_table_priv='Y' " \
  350. ", Lock_tables_priv='Y' " \
  351. ", Execute_priv='Y' " \
  352. ", Repl_slave_priv='Y' " \
  353. ", Repl_client_priv='Y' "`;
  354.  
  355. # Upgrade password column format before the root password gets set.
  356. echo "$password_column_fix_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
  357.  
  358. db_get mysql-server/root_password && rootpw="$RET"
  359. if ! set_mysql_rootpw; then
  360. password_error="yes"
  361. fi
  362.  
  363. echo "$replace_query" | sed "s/__EXTRA_PRIVS__//" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
  364. set +e
  365. echo "$replace_query" | sed "s/__EXTRA_PRIVS__/$extra_privs/" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
  366. set -e
  367. mysql_tzinfo_to_sql /usr/share/zoneinfo/ 2>&1 | egrep -v 'Skipping it.$' | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
  368.  
  369. # The Sarge package "mysql-server" which used to include the mysqld daemon
  370. # may still be in unselected-configured state (i.e. after a remove but not
  371. # purge) in which case its now obsolete cronscript has to be moved away.
  372. for i in /etc/cron.daily/mysql-server /etc/cron.daily/mysql-server-41 /etc/mysql/debian-log-rotate.conf; do
  373. if [ -f $i ]; then mv $i $i.dpkg-old; fi
  374. done
  375. ;;
  376.  
  377. abort-upgrade|abort-remove|abort-configure)
  378. ;;
  379.  
  380. *)
  381. echo "postinst called with unknown argument '$1'" 1>&2
  382. exit 1
  383. ;;
  384. esac
  385. + case "$1" in
  386. + mysql_cnf=/etc/mysql/my.cnf
  387. + mysql_datadir=/usr/share/mysql
  388. + mysql_statedir=/var/lib/mysql
  389. + mysql_rundir=/var/run/mysqld
  390. + mysql_logdir=/var/log
  391. + mysql_cfgdir=/etc/mysql
  392. + mysql_newlogdir=/var/log/mysql
  393. + mysql_upgradedir=/var/lib/mysql-upgrade
  394. + for dir in DATADIR LOGDIR
  395. + '[' DATADIR = DATADIR ']'
  396. + targetdir=/var/lib/mysql
  397. + savelink=/var/lib/mysql-upgrade/DATADIR.link
  398. + '[' -L /var/lib/mysql-upgrade/DATADIR.link ']'
  399. + rmdir /var/lib/mysql-upgrade
  400. + true
  401. + for dir in DATADIR LOGDIR
  402. + '[' LOGDIR = DATADIR ']'
  403. + targetdir=/var/log/mysql
  404. + savelink=/var/lib/mysql-upgrade/LOGDIR.link
  405. + '[' -L /var/lib/mysql-upgrade/LOGDIR.link ']'
  406. + rmdir /var/lib/mysql-upgrade
  407. + true
  408. + '[' '!' -d /var/lib/mysql -a '!' -L /var/lib/mysql ']'
  409. + '[' '!' -d /var/lib/mysql/mysql -a '!' -L /var/lib/mysql/mysql ']'
  410. + '[' '!' -d /var/log/mysql -a '!' -L /var/log/mysql ']'
  411. + set +e
  412. + chown -R 0.0 /usr/share/mysql
  413. + chown -R mysql /var/lib/mysql
  414. + chown -R mysql /var/run/mysqld
  415. + chown -R mysql:adm /var/log/mysql
  416. + chmod 2750 /var/log/mysql
  417. + for i in log err
  418. + touch /var/log/mysql.log
  419. + chown mysql:adm /var/log/mysql.log
  420. + chmod 0640 /var/log/mysql.log
  421. + for i in log err
  422. + touch /var/log/mysql.err
  423. + chown mysql:adm /var/log/mysql.err
  424. + chmod 0640 /var/log/mysql.err
  425. + set -e
  426. + db_set mysql-server/postrm_remove_database false
  427. + _db_cmd 'SET mysql-server/postrm_remove_database' false
  428. + IFS=' '
  429. + printf '%s\n' 'SET mysql-server/postrm_remove_database false'
  430. + IFS='
  431. '
  432. + read -r _db_internal_line
  433. + RET='10 mysql-server/postrm_remove_database doesn'\''t exist'
  434. + case ${_db_internal_line%%[ ]*} in
  435. + return 10
  436. + true
  437. + touch /var/lib/mysql/debian-5.0.flag
  438. + db_get mysql-server-5.0/need_sarge_compat_done
  439. + _db_cmd 'GET mysql-server-5.0/need_sarge_compat_done'
  440. + IFS=' '
  441. + printf '%s\n' 'GET mysql-server-5.0/need_sarge_compat_done'
  442. + IFS='
  443. '
  444. + read -r _db_internal_line
  445. + RET=true
  446. + case ${_db_internal_line%%[ ]*} in
  447. + return 0
  448. + '[' true = false ']'
  449. + db_set mysql-server-5.0/need_sarge_compat_done true
  450. + _db_cmd 'SET mysql-server-5.0/need_sarge_compat_done' true
  451. + IFS=' '
  452. + printf '%s\n' 'SET mysql-server-5.0/need_sarge_compat_done true'
  453. + IFS='
  454. '
  455. + read -r _db_internal_line
  456. + RET='value set'
  457. + case ${_db_internal_line%%[ ]*} in
  458. + return 0
  459. + set +e
  460. + /bin/bash /usr/bin/mysql_install_db --rpm
  461. + logger -p daemon.err -t mysqld_safe -i
  462. + '[' 0 '!=' 0 ']'
  463. + set -e
  464. + dc=/etc/mysql/debian.cnf
  465. fgrep mysql_upgrade $dc 2>/dev/null
  466. ++ fgrep mysql_upgrade /etc/mysql/debian.cnf
  467. + '[' -e /etc/mysql/debian.cnf -a -n '[mysql_upgrade]' ']'
  468. sed -n 's/password *= *// p' $dc | head -n 1
  469. ++ sed -n 's/password *= *// p' /etc/mysql/debian.cnf
  470. ++ head -n 1
  471. + pass=MNM28tHZWURQCvfs
  472. + chown 0:0 /etc/mysql/debian.cnf
  473. + chmod 0600 /etc/mysql/debian.cnf
  474. /bin/echo -e "USE mysql\n" "ALTER TABLE user CHANGE password Password varchar(41) collate utf8_bin NOT NULL default ''"
  475. ++ /bin/echo -e 'USE mysql\n' 'ALTER TABLE user CHANGE password Password varchar(41) collate utf8_bin NOT NULL default '\'''\'''
  476. + password_column_fix_query='USE mysql
  477. ALTER TABLE user CHANGE password Password varchar(41) collate utf8_bin NOT NULL default '\'''\'''
  478. /bin/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' __EXTRA_PRIVS__"
  479. ++ /bin/echo -e 'USE mysql\n' 'REPLACE INTO user SET ' ' host='\''localhost'\'', user='\''debian-sys-maint'\'', password=password('\''MNM28tHZWURQCvfs'\''), ' ' 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'\'' __EXTRA_PRIVS__'
  480. + replace_query='USE mysql
  481. REPLACE INTO user SET host='\''localhost'\'', user='\''debian-sys-maint'\'', password=password('\''MNM28tHZWURQCvfs'\''), 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'\'' __EXTRA_PRIVS__'
  482. /bin/echo -e ", Show_db_priv='Y' " ", Super_priv='Y' " ", Create_tmp_table_priv='Y' " ", Lock_tables_priv='Y' " ", Execute_priv='Y' " ", Repl_slave_priv='Y' " ", Repl_client_priv='Y' "
  483. ++ /bin/echo -e ', Show_db_priv='\''Y'\'' ' ', Super_priv='\''Y'\'' ' ', Create_tmp_table_priv='\''Y'\'' ' ', Lock_tables_priv='\''Y'\'' ' ', Execute_priv='\''Y'\'' ' ', Repl_slave_priv='\''Y'\'' ' ', Repl_client_priv='\''Y'\'' '
  484. + extra_privs=', Show_db_priv='\''Y'\'' , Super_priv='\''Y'\'' , Create_tmp_table_priv='\''Y'\'' , Lock_tables_priv='\''Y'\'' , Execute_priv='\''Y'\'' , Repl_slave_priv='\''Y'\'' , Repl_client_priv='\''Y'\'' '
  485. + echo 'USE mysql
  486. ALTER TABLE user CHANGE password Password varchar(41) collate utf8_bin NOT NULL default '\'''\'''
  487. + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --skip-bdb --skip-innodb
  488. + logger -p daemon.err -t mysqld_safe -i
  489. + db_get mysql-server/root_password
  490. + _db_cmd 'GET mysql-server/root_password'
  491. + IFS=' '
  492. + printf '%s\n' 'GET mysql-server/root_password'
  493. + IFS='
  494. '
  495. + read -r _db_internal_line
  496. + RET=
  497. + case ${_db_internal_line%%[ ]*} in
  498. + return 0
  499. + rootpw=
  500. + set_mysql_rootpw
  501. + db_set mysql-server/root_password ''
  502. + _db_cmd 'SET mysql-server/root_password' ''
  503. + IFS=' '
  504. + printf '%s\n' 'SET mysql-server/root_password '
  505. + IFS='
  506. '
  507. + read -r _db_internal_line
  508. + RET='value set'
  509. + case ${_db_internal_line%%[ ]*} in
  510. + return 0
  511. mktemp
  512. ++ mktemp
  513. + tfile=/tmp/tmp.zVCtyM9269
  514. + '[' '!' -f /tmp/tmp.zVCtyM9269 ']'
  515. + cat
  516. + grep -q 'PASSWORD("")' /tmp/tmp.zVCtyM9269
  517. + retval=0
  518. + rm -f /tmp/tmp.zVCtyM9269
  519. + return 0
  520. + echo 'USE mysql
  521. REPLACE INTO user SET host='\''localhost'\'', user='\''debian-sys-maint'\'', password=password('\''MNM28tHZWURQCvfs'\''), 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'\'' __EXTRA_PRIVS__'
  522. + sed s/__EXTRA_PRIVS__//
  523. + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --skip-bdb --skip-innodb
  524. + logger -p daemon.err -t mysqld_safe -i
  525. + set +e
  526. + echo 'USE mysql
  527. REPLACE INTO user SET host='\''localhost'\'', user='\''debian-sys-maint'\'', password=password('\''MNM28tHZWURQCvfs'\''), 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'\'' __EXTRA_PRIVS__'
  528. + sed 's/__EXTRA_PRIVS__/, Show_db_priv='\''Y'\'' , Super_priv='\''Y'\'' , Create_tmp_table_priv='\''Y'\'' , Lock_tables_priv='\''Y'\'' , Execute_priv='\''Y'\'' , Repl_slave_priv='\''Y'\'' , Repl_client_priv='\''Y'\'' /'
  529. + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --skip-bdb --skip-innodb
  530. + logger -p daemon.err -t mysqld_safe -i
  531. + set -e
  532. + mysql_tzinfo_to_sql /usr/share/zoneinfo/
  533. + egrep -v 'Skipping it.$'
  534. + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --skip-bdb --skip-innodb
  535. + logger -p daemon.err -t mysqld_safe -i
  536. + for i in /etc/cron.daily/mysql-server /etc/cron.daily/mysql-server-41 /etc/mysql/debian-log-rotate.conf
  537. + '[' -f /etc/cron.daily/mysql-server ']'
  538. + for i in /etc/cron.daily/mysql-server /etc/cron.daily/mysql-server-41 /etc/mysql/debian-log-rotate.conf
  539. + '[' -f /etc/cron.daily/mysql-server-41 ']'
  540. + for i in /etc/cron.daily/mysql-server /etc/cron.daily/mysql-server-41 /etc/mysql/debian-log-rotate.conf
  541. + '[' -f /etc/mysql/debian-log-rotate.conf ']'
  542.  
  543. # Automatically added by dh_installinit
  544. if [ -x "/etc/init.d/mysql-ndb-mgm" ]; then
  545. update-rc.d mysql-ndb-mgm defaults 17 23 >/dev/null || exit $?
  546. fi
  547. + '[' -x /etc/init.d/mysql-ndb-mgm ']'
  548. + update-rc.d mysql-ndb-mgm defaults 17 23
  549. # End automatically added section
  550. # Automatically added by dh_installinit
  551. if [ -x "/etc/init.d/mysql-ndb" ]; then
  552. update-rc.d mysql-ndb defaults 18 22 >/dev/null || exit $?
  553. fi
  554. + '[' -x /etc/init.d/mysql-ndb ']'
  555. + update-rc.d mysql-ndb defaults 18 22
  556. # End automatically added section
  557. # Automatically added by dh_installinit
  558. if [ -x "/etc/init.d/mysql" ]; then
  559. update-rc.d mysql defaults 19 21 >/dev/null
  560. if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  561. invoke-rc.d mysql start || exit $?
  562. else
  563. /etc/init.d/mysql start || exit $?
  564. fi
  565. fi
  566. + '[' -x /etc/init.d/mysql ']'
  567. + update-rc.d mysql defaults 19 21
  568. which invoke-rc.d 2>/dev/null
  569. ++ which invoke-rc.d
  570. + '[' -x /usr/sbin/invoke-rc.d ']'
  571. + invoke-rc.d mysql start
  572. * Starting MySQL database server mysqld
  573. ...fail!
  574. invoke-rc.d: initscript mysql, action "start" failed.
  575. + exit 1
  576. dpkg: error processing mysql-server-5.0 (--configure):
  577. subprocess post-installation script returned error exit status 1
  578. dpkg: dependency problems prevent configuration of mysql-server:
  579. mysql-server depends on mysql-server-5.0; however:
  580. Package mysql-server-5.0 is not configured yet.
  581. dpkg: error processing mysql-server (--configure):
  582. dependency problems - leaving unconfigured
  583. Errors were encountered while processing:
  584. mysql-server-5.0
  585. mysql-server
  586. E: Sub-process /usr/bin/dpkg returned an error code (1)
Add Comment
Please, Sign In to add comment