4.修改文件属组及拥有者权限
[root@TEST mysql]# pwd
/usr/local/mysql
[root@TEST mysql]# ll
total 92
drwxr-xr-x 2 503 users 4096 Oct 5 2006 bin
-rwxr-xr-x 1 503 users 801 Oct 5 2006 configure
-rw-r--r-- 1 503 users 19071 Oct 4 2006 COPYING
drwxr-x--- 4 503 users 4096 Oct 5 2006 data
drwxr-xr-x 2 503 users 4096 Oct 5 2006 docs
-rw-r--r-- 1 503 users 5806 Oct 5 2006 EXCEPTIONS-CLIENT
drwxr-xr-x 2 503 users 4096 Oct 5 2006 include
-rw-r--r-- 1 503 users 7752 Oct 5 2006 INSTALL-BINARY
drwxr-xr-x 2 503 users 4096 Oct 5 2006 lib
drwxr-xr-x 4 503 users 4096 Oct 5 2006 man
drwxr-xr-x 7 503 users 4096 Oct 5 2006 mysql-test
-rw-r--r-- 1 503 users 1380 Oct 4 2006 README
drwxr-xr-x 2 503 users 4096 Oct 5 2006 scripts
drwxr-xr-x 3 503 users 4096 Oct 5 2006 share
drwxr-xr-x 5 503 users 4096 Oct 5 2006 sql-bench
drwxr-xr-x 2 503 users 4096 Oct 5 2006 support-files
drwxr-xr-x 2 503 users 4096 Oct 5 2006 tests
[root@TEST mysql]# chown -R root . -------把当前目录下所有文件的拥有者修改为root
[root@TEST mysql]# ll
total 92
drwxr-xr-x 2 root users 4096 Oct 5 2006 bin
-rwxr-xr-x 1 root users 801 Oct 5 2006 configure
-rw-r--r-- 1 root users 19071 Oct 4 2006 COPYING
drwxr-x--- 4 root users 4096 Oct 5 2006 data
drwxr-xr-x 2 root users 4096 Oct 5 2006 docs
-rw-r--r-- 1 root users 5806 Oct 5 2006 EXCEPTIONS-CLIENT
drwxr-xr-x 2 root users 4096 Oct 5 2006 include
-rw-r--r-- 1 root users 7752 Oct 5 2006 INSTALL-BINARY
drwxr-xr-x 2 root users 4096 Oct 5 2006 lib
drwxr-xr-x 4 root users 4096 Oct 5 2006 man
drwxr-xr-x 7 root users 4096 Oct 5 2006 mysql-test
-rw-r--r-- 1 root users 1380 Oct 4 2006 README
drwxr-xr-x 2 root users 4096 Oct 5 2006 scripts
drwxr-xr-x 3 root users 4096 Oct 5 2006 share
drwxr-xr-x 5 root users 4096 Oct 5 2006 sql-bench
drwxr-xr-x 2 root users 4096 Oct 5 2006 support-files
drwxr-xr-x 2 root users 4096 Oct 5 2006 tests
[root@TEST mysql]# chown -R mysql data ---------- 把data目录拥有者修改为mysql
[root@TEST mysql]# ll
total 92
drwxr-xr-x 2 root users 4096 Oct 5 2006 bin
-rwxr-xr-x 1 root users 801 Oct 5 2006 configure
-rw-r--r-- 1 root users 19071 Oct 4 2006 COPYING
drwxr-x--- 4 mysql users 4096 Oct 5 2006 data
drwxr-xr-x 2 root users 4096 Oct 5 2006 docs
-rw-r--r-- 1 root users 5806 Oct 5 2006 EXCEPTIONS-CLIENT
drwxr-xr-x 2 root users 4096 Oct 5 2006 include
-rw-r--r-- 1 root users 7752 Oct 5 2006 INSTALL-BINARY
drwxr-xr-x 2 root users 4096 Oct 5 2006 lib
drwxr-xr-x 4 root users 4096 Oct 5 2006 man
drwxr-xr-x 7 root users 4096 Oct 5 2006 mysql-test
-rw-r--r-- 1 root users 1380 Oct 4 2006 README
drwxr-xr-x 2 root users 4096 Oct 5 2006 scripts
drwxr-xr-x 3 root users 4096 Oct 5 2006 share
drwxr-xr-x 5 root users 4096 Oct 5 2006 sql-bench
drwxr-xr-x 2 root users 4096 Oct 5 2006 support-files
drwxr-xr-x 2 root users 4096 Oct 5 2006 tests
[root@TEST mysql]# chgrp -R mysql . ----------把当前目当下所有文件的属组修改为mysql
[root@TEST mysql]# ll
total 92
drwxr-xr-x 2 root mysql 4096 Oct 5 2006 bin
-rwxr-xr-x 1 root mysql 801 Oct 5 2006 configure
-rw-r--r-- 1 root mysql 19071 Oct 4 2006 COPYING
drwxr-x--- 4 mysql mysql 4096 Oct 5 2006 data
drwxr-xr-x 2 root mysql 4096 Oct 5 2006 docs
-rw-r--r-- 1 root mysql 5806 Oct 5 2006 EXCEPTIONS-CLIENT
drwxr-xr-x 2 root mysql 4096 Oct 5 2006 include
-rw-r--r-- 1 root mysql 7752 Oct 5 2006 INSTALL-BINARY
drwxr-xr-x 2 root mysql 4096 Oct 5 2006 lib
drwxr-xr-x 4 root mysql 4096 Oct 5 2006 man
drwxr-xr-x 7 root mysql 4096 Oct 5 2006 mysql-test
-rw-r--r-- 1 root mysql 1380 Oct 4 2006 README
drwxr-xr-x 2 root mysql 4096 Oct 5 2006 scripts
drwxr-xr-x 3 root mysql 4096 Oct 5 2006 share
drwxr-xr-x 5 root mysql 4096 Oct 5 2006 sql-bench
drwxr-xr-x 2 root mysql 4096 Oct 5 2006 support-files
drwxr-xr-x 2 root mysql 4096 Oct 5 2006 tests
5.启动mysql(可惜出错了-_-)
[root@TEST mysql]# bin/mysqld_safe --user=mysql &
[1] 11222
[root@TEST mysql]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
080410 15:08:06 mysqld ended
[1]+ Done bin/mysqld_safe --user=mysql