/etc/init.d/中的文件命名为mysql
cp好各种文件后
./mysql_install_db --user=mysql --datadir=/usr/local/mysql/data/mysql --basedir /usr/local/mysql
设置密码
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h ubuntu password 'new-password'
开启守护进程(我不知道什么鬼)
/usr/local/mysql/bin/mysqld_safe &
测试守护进程
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
启动mysql服务
service mysqld start
然后你就可以登录了,在basedir下输入
bin/mysql --user=root -p
以上为本小白拙见