{"action":"created","issue":{"url":"https://api.github.com/repos/ottok/mariadb-10.0/issues/13","labels_url":"https://api.github.com/repos/ottok/mariadb-10.0/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ottok/mariadb-10.0/issues/13/comments","events_url":"https://api.github.com/repos/ottok/mariadb-10.0/issues/13/events","html_url":"https://github.com/ottok/mariadb-10.0/pull/13","id":60795110,"number":13,"title":"Add mysql rundir","user":{"login":"grooverdan","id":462287,"avatar_url":"https://avatars.githubusercontent.com/u/462287?v=3","gravatar_id":"","url":"https://api.github.com/users/grooverdan","html_url":"https://github.com/grooverdan","followers_url":"https://api.github.com/users/grooverdan/followers","following_url":"https://api.github.com/users/grooverdan/following{/other_user}","gists_url":"https://api.github.com/users/grooverdan/gists{/gist_id}","starred_url":"https://api.github.com/users/grooverdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grooverdan/subscriptions","organizations_url":"https://api.github.com/users/grooverdan/orgs","repos_url":"https://api.github.com/users/grooverdan/repos","events_url":"https://api.github.com/users/grooverdan/events{/privacy}","received_events_url":"https://api.github.com/users/grooverdan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-12T10:01:46Z","updated_at":"2015-03-12T10:06:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ottok/mariadb-10.0/pulls/13","html_url":"https://github.com/ottok/mariadb-10.0/pull/13","diff_url":"https://github.com/ottok/mariadb-10.0/pull/13.diff","patch_url":"https://github.com/ottok/mariadb-10.0/pull/13.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/ottok/mariadb-10.0/issues/comments/78452657","html_url":"https://github.com/ottok/mariadb-10.0/pull/13#issuecomment-78452657","issue_url":"https://api.github.com/repos/ottok/mariadb-10.0/issues/13","id":78452657,"user":{"login":"grooverdan","id":462287,"avatar_url":"https://avatars.githubusercontent.com/u/462287?v=3","gravatar_id":"","url":"https://api.github.com/users/grooverdan","html_url":"https://github.com/grooverdan","followers_url":"https://api.github.com/users/grooverdan/followers","following_url":"https://api.github.com/users/grooverdan/following{/other_user}","gists_url":"https://api.github.com/users/grooverdan/gists{/gist_id}","starred_url":"https://api.github.com/users/grooverdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grooverdan/subscriptions","organizations_url":"https://api.github.com/users/grooverdan/orgs","repos_url":"https://api.github.com/users/grooverdan/repos","events_url":"https://api.github.com/users/grooverdan/events{/privacy}","received_events_url":"https://api.github.com/users/grooverdan/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T10:06:49Z","updated_at":"2015-03-12T10:06:49Z","body":"cleanup\r\n<pre>\r\napt-get -y purge mariadb-server-10.0 && rm -rf /etc/mysql/debian-start  /etc/mysql/conf.d/tokudb.cnf  /etc/mysql/debian.cnf /var/lib/mysql/\r\n\r\ndpkg -l |fgrep mariadb ; find /etc/mysql/ /var/lib/mysqlii  mariadb-client                 10.0.17-1~exp2            all          MariaDB database client (metapackage depending on the latest version)\r\nii  mariadb-client-10.0            10.0.17-1~exp2            amd64        MariaDB database client binaries\r\nii  mariadb-client-core-10.0       10.0.17-1~exp2            amd64        MariaDB database core client binaries\r\nii  mariadb-common                 10.0.17-1~exp2            all          MariaDB common metapackage\r\nii  mariadb-server-core-10.0       10.0.17-1~exp2            amd64        MariaDB database core server files\r\n/etc/mysql/\r\n/etc/mysql/my.cnf\r\n/etc/mysql/mariadb.cnf\r\n/etc/mysql/conf.d\r\n/etc/mysql/conf.d/.keepme\r\n/etc/mysql/mariadb.conf.d\r\n/etc/mysql/mariadb.conf.d/mysqld_safe.cnf\r\n/etc/mysql/mariadb.conf.d/mysqld.cnf\r\n/etc/mysql/mariadb.conf.d/client.cnf\r\nfind: `/var/lib/mysql': No such file or directory\r\n</pre>\r\n\r\nrepackage\r\n<pre>\r\nroot@spaceman:~# rm -rf c && mkdir c && dpkg -x mariadb-server-10.0_10.0.17-1~exp2_amd64.deb c  && dpkg -e  mariadb-server-10.0_10.0.17-1~exp2_amd64.deb c/DEBIAN  && cp /share/software_projects/mariadb-10.0-git-ottofork/debian/mariadb-server-10.0.postinst c/DEBIAN/postinst && rm -f /var/lib/dpkg/info/mariadb-server-core-10.0.* && dpkg -b c x.deb                                                       \r\ndpkg-deb: building package `mariadb-server-10.0' in `x.deb'.\r\n</pre>\r\n\r\ninstall\r\n<pre>\r\nroot@spaceman:~# dpkg -i x.deb          \r\nSelecting previously unselected package mariadb-server-10.0.\r\ndpkg: warning: files list file for package 'mariadb-server-core-10.0' missing; assuming package has no files currently installed\r\n(Reading database ... 44691 files and directories currently installed.)\r\nPreparing to unpack x.deb ...\r\nlocale: Cannot set LC_CTYPE to default locale: No such file or directory\r\nlocale: Cannot set LC_MESSAGES to default locale: No such file or directory\r\nlocale: Cannot set LC_ALL to default locale: No such file or directory\r\ndf: Warning: cannot read table of mounted file systems: No such file or directory\r\nUnpacking mariadb-server-10.0 (10.0.17-1~exp2) ...\r\nSetting up mariadb-server-10.0 (10.0.17-1~exp2) ...\r\n+ . /usr/share/debconf/confmodule\r\n++ '[' '!' '' ']'\r\n++ PERL_DL_NONLAZY=1\r\n++ export PERL_DL_NONLAZY\r\n++ '[' '' ']'\r\n++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/mariadb-server-10.0.postinst configure ''\r\nlocale: Cannot set LC_CTYPE to default locale: No such file or directory\r\nlocale: Cannot set LC_MESSAGES to default locale: No such file or directory\r\nlocale: Cannot set LC_ALL to default locale: No such file or directory\r\n+ . /usr/share/debconf/confmodule\r\n++ '[' '!' 1 ']'\r\n++ '[' -z '' ']'\r\n++ exec\r\n++ '[' '' ']'\r\n++ exec\r\n++ DEBCONF_REDIR=1\r\n++ export DEBCONF_REDIR\r\n+ '[' -n '' ']'\r\n+ export PATH=/usr/lib64/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin\r\n+ PATH=/usr/lib64/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin\r\n+ ERR_LOGGER='logger -p daemon.err -t mysqld_safe -i'\r\n+ set -o pipefail\r\n+ MYSQL_BOOTSTRAP='/usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam --plugin-load-add=auth_socket'\r\n+ set +e\r\n+ invoke stop\r\n+ '[' -x /usr/sbin/invoke-rc.d ']'\r\n+ invoke-rc.d mysql stop\r\n[ ok ] Stopping MariaDB database server: mysqld.\r\n+ set -e\r\n+ case \"$1\" in\r\n+ mysql_statedir=/usr/share/mysql\r\n+ mysql_datadir=/var/lib/mysql\r\n+ mysql_logdir=/var/log/mysql\r\n+ mysql_rundir=/var/run/mysqld\r\n+ mysql_cfgdir=/etc/mysql\r\n+ mysql_upgradedir=/var/lib/mysql-upgrade\r\n+ '[' '!' -d /usr/share/mysql -a '!' -L /usr/share/mysql ']'\r\n+ '[' '!' -d /var/lib/mysql -a '!' -L /var/lib/mysql ']'\r\n+ '[' '!' -d /var/log/mysql -a '!' -L /var/log/mysql ']'\r\n+ set +e\r\n+ chown -R 0:0 /usr/share/mysql\r\n+ chown -R mysql /var/lib/mysql\r\n+ chown -R mysql:adm /var/log/mysql\r\n+ chmod 2750 /var/log/mysql\r\n+ set -e\r\n+ db_set mariadb-server/postrm_remove_database false\r\n+ _db_cmd 'SET mariadb-server/postrm_remove_database' false\r\n+ _db_internal_IFS=' \r\n'\r\n+ IFS=' '\r\n+ printf '%s\\n' 'SET mariadb-server/postrm_remove_database false'\r\n+ IFS=' \r\n'\r\n+ IFS='\r\n'\r\n+ read -r _db_internal_line\r\n+ RET='10 mariadb-server/postrm_remove_database doesn'\\''t exist'\r\n+ case ${_db_internal_line%%[   ]*} in\r\n+ return 10\r\n+ true\r\n+ rm -f '/var/lib/mysql/debian-*.flag'\r\n+ touch /var/lib/mysql/debian-10.0.flag\r\n+ set +e\r\n+ bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql --disable-log-bin\r\n+ logger -p daemon.err -t mysqld_safe -i\r\nmn+ set -e\r\n+ dc=/etc/mysql/debian.cnf                                                                                                            \r\n++ fgrep debian-sys-maint /etc/mysql/debian.cnf                                                                                       \r\n+ '[' '!' -e /etc/mysql/debian.cnf -o -n '' ']'\r\n+ '[' '!' -d /etc/mysql ']'\r\n+ '[' -e /etc/mysql/debian.cnf ']'\r\n+ oldconf=\r\n+ umask 066\r\n+ cat /dev/null\r\n+ umask 022\r\n+ echo '# Automatically generated for Debian scripts. DO NOT TOUCH!'\r\n+ echo '[client]'\r\n+ echo 'host     = localhost'\r\n+ echo 'user     = root'\r\n+ echo 'password = '\r\n+ echo 'socket   = /var/run/mysqld/mysqld.sock'\r\n+ echo '[mysql_upgrade]'\r\n+ echo 'host     = localhost'\r\n+ echo 'user     = root'\r\n+ echo 'password = '\r\n+ echo 'socket   = /var/run/mysqld/mysqld.sock'\r\n+ echo 'basedir  = /usr'\r\n+ chown 0:0 /etc/mysql/debian.cnf\r\n+ chmod 0600 /etc/mysql/debian.cnf\r\n++ /bin/echo -e 'USE mysql;\\n' 'SET sql_log_bin=0;\\n' 'ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '\\'''\\'' NOT NULL;'\r\n+ password_column_fix_query='USE mysql;\r\n SET sql_log_bin=0;\r\n ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '\\'''\\'' NOT NULL;'\r\n+ echo 'USE mysql;\r\n SET sql_log_bin=0;\r\n ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '\\'''\\'' NOT NULL;'\r\n+ /usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam --plugin-load-add=auth_socket\r\n+ logger -p daemon.err -t mysqld_safe -i\r\n++ /bin/echo -e 'SET sql_mode='\\'''\\'', sql_log_bin=0;\\n' 'DELETE FROM mysql.user WHERE user='\\''debian-sys-maint'\\'' AND host='\\''localhost'\\'';'\r\n+ replace_query='SET sql_mode='\\'''\\'', sql_log_bin=0;\r\n DELETE FROM mysql.user WHERE user='\\''debian-sys-maint'\\'' AND host='\\''localhost'\\'';'\r\n++ /bin/echo -e 'USE mysql;\\n' 'SET sql_log_bin=0;\\n' 'CREATE TABLE IF NOT EXISTS 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' 'INSTALL PLUGIN unix_socket SONAME '\\''auth_socket'\\'';\\n'\r\n+ install_plugins='USE mysql;\r\n SET sql_log_bin=0;\r\n CREATE TABLE IF NOT EXISTS 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'\\'';\r\n INSTALL PLUGIN unix_socket SONAME '\\''auth_socket'\\'';'\r\n+ set +e\r\n+ echo 'USE mysql;\r\n SET sql_log_bin=0;\r\n CREATE TABLE IF NOT EXISTS 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'\\'';\r\n INSTALL PLUGIN unix_socket SONAME '\\''auth_socket'\\'';'\r\n+ /usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam --plugin-load-add=auth_socket\r\n+ logger -p daemon.err -t mysqld_safe -i\r\n+ set -e\r\n+ set_mysql_rootpw\r\n++ mktemp\r\n+ tfile=/tmp/tmp.4DPx72GbqJ\r\n+ '[' '!' -f /tmp/tmp.4DPx72GbqJ ']'\r\n+ cat\r\n+ '[' '' = online ']'\r\n+ /usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam --plugin-load-add=auth_socket\r\n+ retval=0\r\n+ rm -f /tmp/tmp.4DPx72GbqJ\r\n+ return 0\r\n+ '[' -e ']'\r\n+ rm -f\r\n+ set +e\r\n+ echo 'SET sql_mode='\\'''\\'', sql_log_bin=0;\r\n DELETE FROM mysql.user WHERE user='\\''debian-sys-maint'\\'' AND host='\\''localhost'\\'';'\r\n+ /usr/sbin/mysqld --bootstrap --user=mysql --disable-log-bin --skip-grant-tables --default-storage-engine=myisam --plugin-load-add=auth_socket\r\n+ logger -p daemon.err -t mysqld_safe -i\r\n+ set -e\r\n+ '[' configure = configure ']'\r\n+ test_passwordless_root_login\r\n+ mysql --no-defaults -u root -h localhost\r\n+ '[' '' = yes ']'\r\n+ db_stop\r\n+ echo STOP\r\n+ exit 0\r\nProcessing triggers for man-db (2.7.0.2-5) ...\r\n</pre>\r\n\r\ntest:\r\n<pre>\r\nroot@spaceman:~# /etc/init.d/mysql start\r\ndf: Warning: cannot read table of mounted file systems: No such file or directory\r\n[ ok ] Starting MariaDB database server: mysqld.\r\nroot@spaceman:~# mysql\r\nWelcome to the MariaDB monitor.  Commands end with ; or \\g.\r\nYour MariaDB connection id is 8\r\nServer version: 10.0.17-MariaDB-1~exp2 (Debian)\r\n\r\nCopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.\r\n\r\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\r\n\r\nMariaDB [(none)]> show grants;\r\n+------------------------------------------------------------------------------------------------+\r\n| Grants for root@localhost                                                                      |\r\n+------------------------------------------------------------------------------------------------+\r\n| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION |\r\n| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION                                  |\r\n+------------------------------------------------------------------------------------------------+\r\n2 rows in set (0.00 sec)\r\n\r\nMariaDB [(none)]> \r\n</pre>"}}