- 论坛徽章:
- 0
|
再次感谢rardge的答复,但是问题还是没有解决,我打开mysql_install_db,内容如下:
1:#!/bin/sh
2:# Copyright (C) 2002-2003 MySQL AB
3:# For a more info consult the file COPYRIGHT distributed with this file.
4:
5:# This scripts creates the privilege tables db, host, user, tables_priv,
6:# columns_priv, procs_priv in the mysql database, as well as the func table.
7:#
8:# All unrecognized arguments to this script are passed to mysqld.
9:
10:in_rpm=0
11:windows=0
12:defaults=""
13:user=""
14:
15:case "$1" in
16: --no-defaults|--defaults-file=*|--defaults-extra-file=*)
17: defaults="$1"; shift
18: ;;
19:esac
20:
21:parse_arguments() {
22: # We only need to pass arguments through to the server if we don't
23: # handle them here. So, we collect unrecognized options (passed on
24: # the command line) into the args variable.
25: pick_args=
26: if test "$1" = PICK-ARGS-FROM-ARGV
27: then
28: pick_args=1
29: shift
30: fi
31:
32: for arg do
33: case "$arg" in
34: --force) force=1 ;;
35: --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
36: --ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
37: --user=*)
38: # Note that the user will be passed to mysqld so that it runs
39: # as 'user' (crucial e.g. if log-bin=/some_other_path/
40: # where a chown of datadir won't help)
41: user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
42: --skip-name-resolve) ip_only=1 ;;
43: --verbose) verbose=1 ;;
44: --rpm) in_rpm=1 ;;
45: --windows) windows=1 ;;
46: *)
47: if test -n "$pick_args"
48: then
49: # This sed command makes sure that any special chars are quoted,
50: # so the arg gets passed exactly to the server.
51: args="$args "`echo "$arg" | sed -e 's,\([^a-zA-Z0-9_.-]\),\\\\\1,g'`
52: fi
53: ;;
54: esac
55: done
56:}
57:
58:# Get first arguments from the my.cfg file, groups [mysqld] and
59:# [mysql_install_db], and then merge with the command line arguments
60:if test -x ./bin/my_print_defaults
61:then
62: print_defaults="./bin/my_print_defaults"
63:elif test -x ./extra/my_print_defaults
64:then
65: print_defaults="./extra/my_print_defaults"
66:elif test -x ./bin/my_print_defaults
67:then
68: print_defaults="./bin/my_print_defaults"
69:elif test -x ./bin/mysql_print_defaults
70:then
71: print_defaults="./bin/mysql_print_defaults"
72:else
73: print_defaults="my_print_defaults"
74:fi
75:
76:args=
77:ldata=
78:execdir=
79:bindir=
80:basedir=
81:force=0
82:verbose=0
83:fill_help_tables=""
84:
85:parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
86:parse_arguments PICK-ARGS-FROM-ARGV "$@"
87:
88:test -z "$ldata" && ldata=./data
89:if test -z "$basedir"
90:then
91: basedir=.
92: bindir=./bin
93: execdir=./bin
94: pkgdatadir=./support-files
95:else
96: bindir="$basedir/bin"
97: if test -x "$basedir/libexec/mysqld"
98: then
99: execdir="$basedir/libexec"
100: elif test -x "$basedir/sbin/mysqld"
101: then
102: execdir="$basedir/sbin"
103: else
104: execdir="$basedir/bin"
105: fi
106:fi
107:
.
.
.
我将77行的ldat该为了ldata=./data,还是提示
mkdir: 无法创建目录‘/var/lib/mysql/mysql’: 权限不够
chmod: 无法取得 ‘/var/lib/mysql/mysql’ 的属性: 没有那个文件或目录
mkdir: 无法创建目录‘/var/lib/mysql/test’: 权限不够
chmod: 无法取得 ‘/var/lib/mysql/test’ 的属性: 没有那个文件或目录
等错误,后来有查了写资料,好象/etc/my.cnf下有一些mysql的路径设置,我看了一下,就是上面的这些路径,
会不会是mysql_install_db中某个选项设置默认从/etc/my.cnf下找路径啊,如果是的话,如何修改啊,
再次感谢!!! |
|