首先..


cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf

如果mysql只開放本機使用的話,在/etc/my.cnf加入
[mysqld]
[...]
bind-address=127.0.0.1
讓mysql只監聽lookback介面

如果不想開socket監聽可以加入
[mysqld]
[...]
skip networking

my.cnf內就有寫到
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!


接下來是備份,mysqldump只能備份沒運作的資料庫
可以利用mysqlhotcopy來熱備份,需要裝mysql-scripts
用法:
mysqlhotcopy –u 帳號 –p 密碼 dbname path

需要一開始就打入密碼...

比較好的方法是在my.cnf加入
[mysqlhotcopy]
user=帳號
password=密碼
然後chmod my.cnf

參考網址:
http://www.real-blog.com/linux-bsd-notes/16
http://douzi.org/wp/archives/46

文章標籤
全站熱搜
創作者介紹
創作者 darren2000 的頭像
darren2000

四個字 堅持到底

darren2000 發表在 痞客邦 留言(0) 人氣(185)