Work needs to use MySQL, installed in Linux with Yum, installation path is not controllable, it can not be customized, in order to better manage MySQL Sever, the use of source installation.
MySQL 5.5.17 installation requires the use of the CMake compilation tool, which can be installed using Yum CMake
installing MySQL DB
Create related user groups and users
Groupadd MySQL useradd–g mysql MySQL
Unzip and install the MySQL source package path (manually create the appropriate installation directory)
#mkdir /opt/mysql#chown -r mysql:mysql /opt/mysql#gunzip mysql-5.5.17.tar.gz#tar xvf mysql-5.5.17.tar#cd mysql-5.5.17cmake -dcmake_install_prefix=/opt/mysql - Dmysql_user=mysql -dmysql_tcp_port=3306 -dmysql_datadir=/opt/mysql/data -dwith_myisam_storage_ Engine=1 -dwith_innobase_storage_engine=1 -dwith_archive_storage_engine=1 -dwith_memory_storage _engine=1 -dwith_blackhole_storage_engine=1 -dwith_partition_storage_engine=1 -denabled_local_ Infile=1 -dwith_readline=1 -dwith_ssl=yes -ddefault_charset=utf8 -ddefault_collation=utf8_ general_ci -dextra_charsets=all#make#make install Initialize db# sh scripts/mysql_install_db --user=mysql --basedir=/opt/mysql --datadir=/opt/mysql/datainstalling mysql system tables ... Okfilling help tables ... Ok to start mysqld at boot time you have to copysupport-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: /opt/mysql/bin/mysqladmin -u root password ' New-password '/opt/mysql/bin/ mysqladmin -u root -h mysql password ' New-password ' Alternatively you can run:/opt/mysql/bin/mysql_secure_installation which will also give you the option of removing the testdatabases and anonymous user created by default. this isstrongly recommended for production servers. See the manual for more instructions. You can start the Mysql daemon with:cd /opt/mysql ; /opt/mysql/bin/mysqld_safe & you can test the mysql daemon with mysql-test-run.plcd /opt/mysql/ Mysql-test ; perl mysql-test-run.pl please report any problems with the /opt/mysql/scripts/mysqlbug script!
Start MySQL server as normal MySQL configuration startup mode after completion
This article is from the "DBA Sky" blog, so be sure to keep this source http://kevinora.blog.51cto.com/9406404/1665710
MySQL 5.5.17 Source Installation