2007-06-02 22:48:10 Alan

架設MySQL

 啟動 MySQL:
#/etc/rc.d/init.d/mysqld start
chkconfig mysqld on

root密碼忘了:
#/etc/rc.d/init.d/mysqld stop
#/usr/bin/safe_mysqld --skip-grant-tables & mysql -u root -p mysql
update user set password=password("新密碼") where user="root" and host="localhost";
flush privileges;
quit


#/etc/rc.d/init.d/mysqld stop
#/etc/rc.d/init.d/mysqld start

安裝 MySQL:
#/etc/rc.d/init.d/mysqld stop
#apt-get remove mysql
#rm -rf /var/lib/mysql
#apt-get -y install php mysql mysql-server php-mysql php-gd
#/etc/rc.d/init.d/mysqld start


設定密碼:
mysqladmin -u root password 'password'



MySQL 官方網站:http://www.mysql.com/
MySQL 官方文件:http://dev.mysql.com/doc/