SOURCES: mysql.init, mysql-init_db.sql (REMOVED), mysql-init_db-da...
glen
glen at pld-linux.org
Fri Mar 9 14:38:35 CET 2007
Author: glen Date: Fri Mar 9 13:38:35 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use mysql_create_system_tables to initialize database
---- Files affected:
SOURCES:
mysql.init (1.110 -> 1.111) , mysql-init_db.sql (1.5 -> NONE) (REMOVED), mysql-init_db-data.sql (1.4 -> NONE) (REMOVED)
---- Diffs:
================================================================
Index: SOURCES/mysql.init
diff -u SOURCES/mysql.init:1.110 SOURCES/mysql.init:1.111
--- SOURCES/mysql.init:1.110 Thu Mar 8 16:19:36 2007
+++ SOURCES/mysql.init Fri Mar 9 14:38:30 2007
@@ -349,25 +349,6 @@
busy
TMP=/tmp TMPDIR=/tmp
- # Install this in the user table, too
- hostname="`hostname --fqdn 2> /dev/null | tr -d '[:space:]'`"
- [ -z "$hostname" ] && hostname="localhost-unknown"
-
- # Check if hostname is valid
- if [ -z "$hostname" ]; then
- deltext
- fail
- nls "Sorry, the host name is not configured."
- nls "Please configure the 'hostname' command to return a hostname."
- exit 1
- elif ! hostname -i >/dev/null 2>&1; then
- deltext
- fail
- nls "Sorry, the host '%s' could not be looked up." "$hostname"
- nls "Please configure the 'hostname' command to return a correct hostname."
- exit 1
- fi
-
mkdir -p "$MYSQL_DATA_DIR"
# Using mysql:mysql for MYSQL_CLUSTER_DIR is creating SECURITY hole, root:root is proper
chown root:root "$MYSQL_CLUSTER_DIR"
@@ -392,10 +373,7 @@
cat > $MYSQL_DATA_DIR/mysql-init.sql <<-EOF
CREATE DATABASE mysql;
- use mysql;
- $(sed -e "s, at ENGINE@,$BASE_TABLETYPE," /usr/share/mysql/init_db.sql)
- $(sed -e "s,\$hostname,$hostname,g" /usr/share/mysql/init_db-data.sql)
- "
+ $(/usr/sbin/mysql_create_system_tables real)
EOF
ok=0
@@ -411,7 +389,6 @@
This is done (after starting database; press enter when asked for password) with:
/usr/bin/mysqladmin -u mysql -S $MYSQL_SOCKET password 'password'
-/usr/bin/mysqladmin -h $hostname -u mysql -S $MYSQL_SOCKET password 'password'
/usr/bin/mysqladmin -u mysql_logrotate -S $MYSQL_SOCKET password 'password'
NOTE: mysql_logrotate password should be placed to $MYSQL_CONFIG in
@@ -425,6 +402,8 @@
fail
cat << END_OF_MSG
Installation of grant tables FAILED!
+
+The initialization SQL script was preserved at $MYSQL_DATA_DIR/mysql-init.sql
Examine the logs in /var/log/mysql for more information. You can
also try to start the mysqld daemon with:
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/mysql.init?r1=1.110&r2=1.111&f=u
More information about the pld-cvs-commit
mailing list