网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

CentOS6下编译安装mySQL5的过程-创新互联

本篇内容介绍了“CentOS 6下编译安装mySQL5的过程”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

创新互联公司服务项目包括钦南网站建设、钦南网站制作、钦南网页制作以及钦南网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,钦南网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到钦南省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

一,准备工作
     1,快速安装安装 CentOS6,安装时选择最小化安装.
     2,安装编译时需要的库文件,这时可以选择做光盘yum
       [root@admin share] # cd /media/
       [root@admin media] # mkdir CentOS
       [root@admin media] # mount /dev/cdrom /media/CentOS
       [root@admin media]# cd /etc/yum.repos.d/
       [root@admin yum.repos.d] # mv CentOS-Base.repo      CentOS-Base.repo.bak
       [root@admin yum.repos.d] # mv CentOS-Debuginfo.repo    CentOS-Debuginfo.repo.bak
        至此,用光盘做的yum就可用了;
      [root@admin ~]#yum --enablerepo=c6-media install ncurses*  gcc* perl* -y
      3,准备好安装包. (这里以 mysql-5.0.56.tar.gz举例)
      4,添加mysql 用户
     [root@admin ~]#groupadd mysql
     [root@admin ~]#useradd -g mysql mysql -s /bin/nologin
 
二,正式安装
      1. [root@admin software]#tar zxvf mysql-5.0.56.tar.gz   
      2. [root@admin software]# cd mysql-5.0.56
      3. [root@admin mysql-5.0.56]# ./configure  --prefix=/usr/local/mysql  --localstatedir=/data/mysql --enable-assembler --                  enable-static --with-mysqld-user=mysql --with-big-tables --enable-thread-safe-client --                enable-local-infile --with-charset-utf8 --with-extra-charsets=all
      4. [root@admin mysql-5.0.56]# make && make install
      5. [root@admin mysql-5.0.56]# cp support-files/my-medium.cnf /etc/my.cnf
      6. [root@adim share]# cd /usr/local/mysql/
      7. [root@admin mysql]# bin/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:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
 
Alternatively you can run:
/usr/local/mysql/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 /usr/local/mysql ; /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
 
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
 
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
 
 
   8. [root@admin mysql]# chown -R mysql.mysql /data/mysql/
   9. [root@admin mysql]#  share/mysql/mysql.server start
Starting MySQL SUCCESS!                           #--------------> 看到如此,便知道安装成功了.
  10. [root@admin mysql]# netstat  -tunlp | grep mysql
      tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      13193/mysqld

三. 后绪工作
 1.[root@admin ~]# ln -s  /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
 2.[root@admin ~]# ln -s  /usr/local/mysql/bin/mysql /usr/sbin/mysql
 3.[root@admin ~]# ln -s  /usr/local/mysql/bin/mysqladmin /usr/sbin/mysqladmin
 4.[root@admin ~]# ln -s  /usr/local/mysql/bin/mysqldump /usr/sbin/mysqldump
 5.[root@admin ~]# mysql -uroot -p
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.56-log Source distribution
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql>

“CentOS 6下编译安装mySQL5的过程”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!


当前题目:CentOS6下编译安装mySQL5的过程-创新互联
网站网址:http://bjjierui.cn/article/dcspji.html

其他资讯