1. Unzip to/usr/local/mysqlgroupaddmysqluseradd-gmysqlmysqlcd/usr/local/mysqlchown-Rmysql.chgrp-Rmysql.chown-Rroot.chown-Rmysqldatacp/usr/local/mysql/support-files/mysql. se under Ubuntu
1. Unzip the package to/usr/local/mysql In Ubuntu.
Groupadd mysql
Useradd-g mysql
Cd/usr/local/mysql
Chown-R mysql.
Chgrp-R mysql.
Chown-R root.
Chown-R mysql data
Cp/usr/local/mysql/support-files/mysql. server/etc/init. d/mysqld
Cp/usr/local/mysql/support-files/my-huge.cnf/etc/my. cnf
2. modify my. cnf
Nano/etc/my. cnf
Add
Basedir =/usr/local/mysql
Datadir =/home/mysql
3. initialize the database
Scripts/mysql_install_db -- user = mysql
4. Start
Bin/mysqld_safe -- user = mysql &
Change Password
Mysql> use mysql
Mysql> UPDATE user SET password = PASSWORD ('root') WHERE user = 'root ';
Mysql> flush privileges;
Mysql> exit
5. Set Automatic startup
Apt-get install chkconfig
Chkconfig -- add mysqld
Chkconfig mysqld on
6. Add mysql to path
Nano/etc/profile
Add this sentence before umask
Export PATH = $ PATH:/usr/local/mysql/bin
7. restart the system
Reboot