summaryrefslogtreecommitdiff
path: root/support-files/debian/mysql-server.postinst
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-07 04:55:17 +0300
committerunknown <monty@donna.mysql.com>2000-09-07 04:55:17 +0300
commitbee9933ab83729e6ca2f2826706b1ab5b985df87 (patch)
treecd775f59b4803ef23e407df9d47af3ae7b517a13 /support-files/debian/mysql-server.postinst
parentaaca0e3c6bd71a7b34fcb3a137ab1113a20dca1f (diff)
downloadmariadb-git-bee9933ab83729e6ca2f2826706b1ab5b985df87.tar.gz
Small bug fixes
support-files/mysql.server-sys5.sh: Change mode to -rw-rw-r-- Docs/manual.texi: Added information about BeOS, Access 2000, AIX and user links client/mysql.cc: Fixed SOURCE to work on windows client/mysqldump.c: Strip of white space configure.in: Fix for AIX include/dbug.h: Assert handling include/my_pthread.h: Ia64 needs more thread stack than other processors include/my_sys.h: More comments myisam/mi_key.c: Fixed wrong key length checks mysql.proj: update mysys/charset.c: Cleanup mysys/mf_keycache.c: Moved SEC_LINK to file that used it mysys/my_static.h: Moved SEC_LINK to file that used it scripts/Makefile.am: Fix for debian scripts/mysql_install_db.sh: Cleanup sql/gen_lex_hash.cc: Better values sql/ha_berkeley.cc: Fix of reading of unique key sql/handler.cc: Fix memory allocation bug sql/mysqld.cc: Fix for Ia64 sql/share/charsets/latin1.conf: Fixed sortorder back to scandinavian. sql/sql_yacc.yy: FULL shouldn't be a keyword support-files/Makefile.am: Fix for debian support-files/mysql.server.sh: Cleanups
Diffstat (limited to 'support-files/debian/mysql-server.postinst')
-rw-r--r--support-files/debian/mysql-server.postinst44
1 files changed, 44 insertions, 0 deletions
diff --git a/support-files/debian/mysql-server.postinst b/support-files/debian/mysql-server.postinst
new file mode 100644
index 00000000000..ef2f32dac19
--- /dev/null
+++ b/support-files/debian/mysql-server.postinst
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+update-rc.d mysql defaults 50 >/dev/null
+
+#--------
+update-alternatives --install /usr/sbin/mysqld mysqld /usr/sbin/mysqld-static 10
+
+#--------
+
+DOFIX=0
+if [ ! -e /var/mysql/data/mysql/tables_priv.frm -a -d /var/mysql/data/mysql ]; then
+ DOFIX=1
+fi
+
+#--------
+i=`grep '^mysql:' /etc/group`
+if [ "x${i}" == "x" ]; then
+ groupadd mysql || true
+fi
+
+i=`grep '^mysql:' /etc/passwd`
+if [ "x${i}" == "x" ]; then
+ useradd -g mysql -d /var/mysql/data -s /noexists mysql || true
+fi
+
+#--------
+
+if [ ! -d /var/mysql/data/mysql ]; then
+ install -d /var/mysql/data || true
+ /usr/sbin/mysql_install_db || true
+ chown -R mysql.mysql /var/mysql
+fi
+
+#--------
+/etc/init.d/mysql start || true
+
+if [ $DOFIX -eq 1 ]; then
+ echo "***************************************"
+ echo " Now, fix tables for MySQL 3.22.11...."
+ echo " if you set root passwd, please in..."
+ echo -n " ? MySQL root passwd ? : "
+ read pass dumy
+ /usr/sbin/mysql_fix_privilege_tables $pass
+fi