CentOS下安裝社群版本MySQL5.5.8
需要安裝Mysql5.5.8時,請參閱本文件。
安裝Mysql5.5.8服務,提供公司CSFDP測試環境。正式環境也採用該版本的mysql
1.1.環境
PC機:IntelE5300 記憶體4G 硬碟500G
Mysql5.5.8
cmake2.8.3
2.1.安裝cmake
shell>tar zxvf cmake-2.8.3.tar.gz
shell>cd cmake-2.8.3
shell>./configure
shell>make
shell>make install
2.2. 安裝mysql
shell>tar zxvf mysql-5.5.8.tar.gz
shell>cd mysql-5.5.8
shell>cmake . \
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql \
-DCOMMUNITY_BUILD:BOOL=ON \
-DENABLED_PROFILING:BOOL=ON \
-DENABLE_DEBUG_SYNC:BOOL=OFF \
-DINSTALL_LAYOUT:STRING=STANDALONE \
-DMYSQL_DATADIR:PATH=/usr/local/mysql/data \
-DMYSQL_MAINTAINER_MODE:BOOL=OFF \
-DWITH_EMBEDDED_SERVER:BOOL=ON \
-DWITH_EXTRA_CHARSETS:STRING=all \
-DWITH_SSL:STRING=bundled \
-DWITH_UNIT_TESTS:BOOL=OFF \
-DWITH_ZLIB:STRING=bundled \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_COMMENT=dancebear \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-LH
shell>make && make install
shell>groupadd mysql
shell>useradd -g mysql mysql
shell>mkdir /usr/local/mysql/conf
shell>mkdir /usr/local/mysql/var
shell>cd /usr/local/mysql
shell>cp support-files/my-huge.cnf conf/my.cnf
shell>chown -R root:mysql /usr/local/mysql
shell>/usr/local/mysql/scripts/mysql_install_db--basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --skip-name-resolve--user=mysql --defaults-file=/usr/local/mysql/conf/my.cnf--pid-file=/usr/local/mysql/var/mysql.pid--socket=/usr/local/mysql/var/mysql.sock
shell>ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
shell>ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/
shell>ln -s /usr/local/mysql/bin/mysqld_safe /usr/bin/
shell>ln -s /usr/local/mysql/share/mysql/mysql.server/usr/bin/
shell>ln -s /usr/local/mysql/bin/mysqldump /usr/bin/
3 mysql自動啟動指令碼
shell>cp /usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld
shell>chmod 755 /etc/init.d/mysqld
shell>chkconfig –-add mysqld
shell>chkconfig –-level 345 mysqld on
修改配置檔案/etc/init.d/mysqld,新增安裝mysql的路徑
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
可以使用以下命令啟停mysql服務或檢視當前mysql服務狀態
shell>/etc/init.d/mysqld start
shell>/etc/init.d/mysqld stop
shell>/etc/init.d/mysqld status
4 root密碼
shell>/usr/local/mysql/bin/mysqladmin –u root password‘password’
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26230597/viewspace-755492/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 安裝centOS版本oracleCentOSOracle
- CentOS 下多版本 PHP 的安裝與配置CentOSPHP
- Centos Stream 9 安裝Docker 23.0.2 社群版安裝教程。CentOSDocker
- centos7安裝mongodb 4.2社群版CentOSMongoDB
- Centos下安裝ffmpegCentOS
- centos下安裝dockerCentOSDocker
- Centos下安裝cassandraCentOS
- Linux(Centos7)安裝Docker 社群(ce)版LinuxCentOSDocker
- Centos下安裝mariaDB方法CentOS
- centos 下docker映象安裝CentOSDocker
- CentOS下安裝pip 18.0CentOS
- CentOS下tomcat安裝配置CentOSTomcat
- Centos7下安裝配置最新版本Jenkins(2.452.3)CentOSJenkins
- CentOS 下編譯安裝 NginxCentOS編譯Nginx
- CentOS 下編譯安裝 apacheCentOS編譯Apache
- centos7下安裝ffmpegCentOS
- centos7下安裝 dockerCentOSDocker
- CentOS7 下安裝 ElasticsearchCentOSElasticsearch
- centos7下安裝phpCentOSPHP
- centos7下docker安裝CentOSDocker
- centos7 下安裝 nodejsCentOSNodeJS
- centos 下 安裝 node,nginx, mysqlCentOSNginxMySql
- Kubernetes: CentOS上如何安裝指定版本的KubernetesCentOS
- 如何在CentOS 7中安裝和配置OrientDB社群版CentOS
- Centos7.6下安裝配置JenkinsCentOSJenkins
- CentOS 6.5下快速安裝MySQL 5.7.17CentOSMySql
- CentOS 下安裝 wrk 壓測工具CentOS
- Centos下Elasticsearch安裝詳細教程CentOSElasticsearch
- CentOS 8.2下VNC安裝與配置CentOSVNC
- CentOS下使用rpm包安裝MySQLCentOSMySql
- centos7下cobbler安裝配置CentOS
- 3.1-centos6.5下安裝dockerCentOSDocker
- CentOS 7.0下使用yum安裝MySQLCentOSMySql
- mac 下用vmware fusion 安裝centosMacCentOS
- CentOS 7.4 下安裝Python3.6CentOSPython
- azkaban在centos下的部署安裝CentOS
- Centos 7下下載和安裝dockerCentOSDocker
- Hadoop CDH版本安裝和啟動(CentOS7)HadoopCentOS
- CentOS7下安裝Mysql8.4CentOSMySql