1.     安装环境

1.1.  目的

安装Mysql5.5.10服务,提供公司XXXX测试环境。正式环境也采用该版本的mysql

1.2. 硬件环境

PC机:IntelE5300 内存4G 硬盘500G

1.3. 软件环境

Mysql5.5.10

cmake2.8.3

2.    安装

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.10.tar.gz

shell>cd mysql-5.5.10

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.    安装后配置

3.1. 设置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

3.2.       设置root密码

[root@ldap-mysql-svn-trac test]# mysqladmin-uroot password 'mysql'

3.3.       错误解决

110331 11:55:00 mysqld_safe Starting mysqld daemon with databasesfrom /usr/local/mysql/data

/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist

110331 11:55:00 [ERROR] Can't open the mysql.plugin table. Pleaserun mysql_upgrade to create it.

110331 11:55:00 InnoDB: The InnoDB memory heap is disabled

110331 11:55:00 InnoDB: Mutexes and rw_locks use InnoDB's ownimplementation

110331 11:55:00 InnoDB: Compressed tables use zlib 1.2.5

110331 11:55:00 InnoDB: Initializing buffer pool, size = 128.0M

110331 11:55:00 InnoDB: Completed initialization of buffer pool

110331 11:55:00 InnoDB: highest supported file format is Barracuda.

110331 11:55:00  InnoDB:Waiting for the background threads to start

110331 11:55:01 InnoDB: 1.1.5 started; log sequence number 1595675

110331 11:55:01 [ERROR] /usr/local/mysql/bin/mysqld: unknown option'--skip-locking'

110331 11:55:01 [ERROR] Aborting

110331 11:55:01  InnoDB:Starting shutdown...

110331 11:55:02  InnoDB:Shutdown completed; log sequence number 1595675

110331 11:55:02 [Note] /usr/local/mysql/bin/mysqld: Shutdowncomplete

【解决方案】:

[root@ldap-mysql-svn-trac mysql]# scripts/mysql_install_db--user=mysql

Installing MySQL system tables...

110331 13:21:15 [ERROR] ./bin/mysqld: unknown option'--skip-locking'

110331 13:21:15 [ERROR] Aborting

110331 13:21:15 [Note] ./bin/mysqld: Shutdown complete

Installation of system tables failed!  Examine the logs in

./data for more information.

You can try to start the mysqld daemon with:

shell> ./bin/mysqld--skip-grant &

and use the command line tool ./bin/mysql

to connect to the mysql database and look at the grant tables:

shell> ./bin/mysql-u root mysql

mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log

gives you a log in ./data that may be helpful.

Please consult the MySQL manual section

'Problems running mysql_install_db', and the manual section that

describes problems on your OS. Another information source are the

MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if

you do mail us, you MUST use the ./bin/mysqlbug script!

然后,servicemysqld start

[root@ldap-mysql-svn-tracmysql]# service mysqld start

StartingMySQL.                                           [  OK  ]

[root@ldap-mysql-svn-tracmysql]#

在Centos 5.4上安装Mysql5.5.10 (整理以前的工作文档)的更多相关文章

  1. CentOS 6.9上安装mysql-5.6.36

    CentOS 6.9上安装mysql-5.6.36 1.准备数据存放的文件系统 新建一个逻辑卷,并将其挂载至特定目录即可.这里不再给出过程. 这里假设其逻辑卷的挂载目录为/data,而后需要创建/da ...

  2. CentOS 6.9上安装mysql-5.6.37

    CentOS 6.9上安装mysql-5.6.37 1.准备数据存放的文件系统 新建一个逻辑卷,并将其挂载至特定目录即可.这里不再给出过程. 这里假设其逻辑卷的挂载目录为/data,而后需要创建/da ...

  3. centOS 6.5上安装mysql5.7压缩版

    mysql-5.7.10-linux-glibc2.5-i686.tar.gz是目前最新版,二进制发布包,适合各种32为版本的发型版Linux,由于只有一个包,解压后配配就行,很方便,比较符合我的风格 ...

  4. 在centos上安装mysql5.7的三种方法

    带OS信息的是已编译的二进制文件,不带OS信息的是源码包 mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz 二进制包 mysql-5.5.51.tar.gz 源码包 ...

  5. CentOS 6.5上安装MySQL-Cluster

    参考博文: CentOS 6.2下MySQL Cluster 7.2 配置数据库集群 CentOS 6.5上安装MySQL-Cluster 7.3.4过程笔记--下一步学习 MySQL Cluster ...

  6. CentOS6.7上安装Mysql5.7

    CentOS6.7上安装Mysql5.7 2017年07月22日 18:27:05 阅读数:564 环境的配置总是令人作呕,所以这次表明版本条件: 首先,这是一台新机器 其次,CentOS版本如下: ...

  7. CentOS 6.9上安装Mysql 5.7.18 安装

    CentOS 6.9上安装Mysql 5.7.18 安装 下载地址:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-linux-g ...

  8. 在CentOS或RHEL上安装Nux Dextop仓库

    介绍 Nux Dextop是类似CentOS.RHEL.ScientificLinux的第三方RPM仓库(比如:Ardour,Shutter等等).目前,Nux Dextop对CentOS/RHEL ...

  9. 在 CentOS7 上安装 MySQL5.7

    在 CentOS7 上安装 MySQL5.7 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建 ...

随机推荐

  1. 【课程分享】深入浅出嵌入式linux系统移植开发 (环境搭建、uboot的移植、嵌入式内核的配置与编译)

    深入浅出嵌入式linux系统移植开发 (环境搭建.uboot的移植.嵌入式内核的配置与编译) 亲爱的网友,我这里有套课程想和大家分享,假设对这个课程有兴趣的,能够加我的QQ2059055336和我联系 ...

  2. 竖向折叠二级导航JS代码(可防刷新ul/li结构)

    <html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    ...

  3. Codeforces Round #315 (Div. 2A) 569A Music (模拟)

    题目:Click here 题意:(据说这个题的题意坑了不少人啊~~~)题目一共给了3个数---- T 表示歌曲的长度(s).S 表示下载了歌曲的S后开始第一次播放(也就是说S秒的歌曲是事先下载好的) ...

  4. Easyui中tree组件实现搜索定位功能及展开节点定位

    这几天遇到个input + tree  实现搜索功能的需求,在这里贴出来供大家参考下,如果你有更好的实现效果希望不腻赐教! 首先给大家看看效果     小二 上图  : 需要的部件知识: easyui ...

  5. USACO Money Systems Dp 01背包

    一道经典的Dp..01背包 定义dp[i] 为需要构造的数字为i 的所有方法数 一开始的时候是这么想的 for(i = 1; i <= N; ++i){ for(j = 1; j <= V ...

  6. POJ 2187 旋转卡壳 + 水平序 Graham 扫描算法 + 运算符重载

    水平序 Graham 扫描算法: 计算二维凸包的时候可以用到,Graham 扫描算法有水平序和极角序两种. 极角序算法能一次确定整个凸包, 但是计算极角需要用到三角函数,速度较慢,精度较差,特殊情况较 ...

  7. 打工心态废掉了很多人,包括你吗?(你把现在这家公司的业务都弄清楚、弄懂了吗?君子报仇十年不晚!不离不弃!)good

    我只拿这点钱,凭什么去做那么多工作,我傻呀. 我为公司干活,公司付我一份报酬,等价交换而已,我不欠谁的. 我只要对得起这份薪水就行了,多一点我都不干,做了也白做. 工作嘛,又不是为自己干,说得过去就行 ...

  8. perl 安装 ZooKeeper模块

    1072 ./configure --libdir=/usr/lib 1073 make 1074 make install 1075 cpan ZooKeeper [root@wx03 c]# pe ...

  9. C# 课堂总结1-二进制转换

    一.目的:便于计算机表示,稳定性好,符合逻辑运算,真为1,假为0. 二.各进制表示方法: 2进制:0,1 8进制:0-7 16进制:0-9,A,B,C,D,E,F 二.转换方法: 1.各进制转换为10 ...

  10. 【CSDN博客之星评选】我为什么坚持写博客

    今天无意中在CSDN的博客之星评选活动看到自己竟然是候选人之一,真的是十分的惊讶也十分的高兴.对于喜欢写东西.喜欢分享的我来说,已经忍不住用文字来记录一下今天的美好心情,同时也让我回想起我是如何开始在 ...