Source Installation Overview
----------------------------------
The basic commands you must execute to install a MySQL source
distribution are:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
If you start from a source RPM, do the following:
shell> rpmbuild --rebuild --clean MySQL-VERSION.src.rpm
Set Root Password for MySQL
/usr/local/bin/mysqladmin -u root password 'new-password'
使用GRANT ... IDENTIFIED BY語(yǔ)句,來(lái)進(jìn)行授權(quán)
GRANT select,insert,delete,update on dbname.* to user@'%' IDENTIFIED BY 'manager';
這里PASSWORD()函數(shù)是不必要的,也不需要使用FLUSH PRIVILEGES來(lái)執(zhí)行確認(rèn)
posted on 2007-11-28 19:54
josson 閱讀(382)
評(píng)論(0) 編輯 收藏 所屬分類:
數(shù)據(jù)庫(kù)