# useradd -r -g mysql mysql-- 添加mysql用户
# cd /usr/local
# tar zxvf /path/to/mysql-VERSION-OS.tar.gz-- 解压二进制安装包
# ln -s full-path-to-mysql-VERSION-OS mysql-- 创建软链接
# cd mysql
# chown -R mysql .-- 修改目录所属的拥有者
# chgrp -R mysql .-- 修改目录所属的用户组
# scripts/mysql_install_db --user=mysql-- 执行数据库安装命令Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h bcserver4utest password 'new-password'
Alternatively you can run:
./bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
# chown -R root .
# chown -R mysql data
# cp support-files/my-medium.cnf /etc/my.cnf-- [可选]复制配置文件