在CentOS下安装配置MySQL-5.0.27过程(转)

近日在CentOS下安装配置成功了MySQL-5.0.27(事实上这种安装方法适合其他Linux版本),特记下来备忘。^_^
 
过程如下:
 

2. 安装

·解压

# tar xzvf mysql-5.0.27.tar.gz

·安装配置

# cd mysql-5.0.27
# mkdir /program/mysql
# ./configure --prefix=/program/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-Community --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=gbk --with-collation=gbk_chinese_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-innodb --without-ndb-debug

配置成功后会提示:

MySQL has a Web site at http://www.mysql.com/ which carries details on the
    latest release, upcoming features, and other information to make your
    work or play with MySQL more productive. There you can also find
    information about mailing lists for MySQL discussion.

    Remember to check the platform specific part of the reference manual for
    hints about installing MySQL on your platform. Also have a look at the
    files in the Docs directory.

    Thank you for choosing MySQL!

·编译

#make

过程比较长(因为配置时做了很多优化),请耐心等待。

·安装

#make install

3. 安装后的配置

# useradd mysql //添加 mysql 用户
# cd /program/mysql
# bin/mysql_install_db --user=mysql
# chown -R root:mysql .       //设置权限,注意后面有一个 "."
# chown -R mysql /var/lib/mysql   //设置 mysql 目录权限
# chgrp -R mysql .          //注意后面有一个 "."
# cp share/mysql/my-huge.cnf /etc/my.cnf
# cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld //开机自动启动 mysql。
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
# /etc/rc.d/init.d/mysqld start           //启动 MySQL
# bin/mysqladmin -u root password "password_for_root"
# service mysqld stop               //关闭 MySQL

4.参考文章

(1)CentOS 4.4 手动编译安装 apache 2.2.3+php 5.2.0+mysql 5.0.27+Zend v3.2.0+eaccelerator 0.9.5

http://www.linuxsir.org/bbs/showthread.php?t=288966

(2)L.A.M.P环境配置文档--CentOS

http://www.discuz.net/thread-495817-1-1.html

(3)LINUX下MYSQL完全安装使用指南

http://www.dvbbs.net/tech/server/2006021510045.asp

(4)一个很多MySQL版本下载的FTP:

http://ftp.gwdg.de/pub/misc/mysql/Downloads/   

 

转自:http://blog.chinaunix.net/u1/36036/showart_287237.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Centos7上安装mysql-connector-c++的步骤如下: 1. 首先,你需要下载mysql-connector-c++的安装包。你可以从MySQL官方网站上下载最新版本的mysql-connector-c++。 2. 下载完成后,解压安装包。你可以使用以下命令解压: ``` tar -zxvf mysql-connector-c++-<version>.tar.gz ``` 3. 进入解压后的目录: ``` cd mysql-connector-c++-<version> ``` 4. 接下来,你需要安装必要的依赖项。你可以使用以下命令安装: ``` sudo yum install mysql-connector-c++-devel ``` 5. 安装完成后,你可以开始编译和安装mysql-connector-c++。你可以使用以下命令: ``` ./configure make sudo make install ``` 6. 编译和安装完成后,你可以在你的代码中引入mysql-connector-c++的头文件,并使用相应的命名空间。例如: ``` #include <jdbc/mysql_connection.h> #include <jdbc/cppconn/driver.h> #include <jdbc/cppconn/exception.h> #include <jdbc/cppconn/resultset.h> #include <jdbc/cppconn/statement.h> #include <jdbc/cppconn/prepared_statement.h> ``` 7. 现在,你可以在你的代码中使用mysql-connector-c++来连接和操作MySQL数据库了。你可以参考mysql-connector-c++的官方文档和示例代码来学习如何使用它。 请注意,以上步骤仅适用于Centos7系统。如果你使用的是其他操作系统,请参考相应的文档来进行安装。\[1\]\[2\]\[3\] #### 引用[.reference_title] - *1* *3* [Centos7 安装测试MySQL Connector/C++](https://blog.csdn.net/xqs51163/article/details/123690731)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [Linux CentOS 7 安装mysql的两种方式](https://blog.csdn.net/Escorts/article/details/118941623)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值