第一次在Linux(Ubuntu 10.10)上安装MySQL,还是费了一些周折,总算基本理清思路了。先说说我最终成功安装的步骤,即在Ubuntu 10.10里下载mysql源码,编译安装。当前mysql版本是5.5.20,我的系统版本是ubuntu 10.101下载源码:在官方网站,选择:MySQL Community Server--download选择 sourcecode,前面几个都是什么rpm,最后一个是我觉得应该下载的包
| Generic Linux (Architecture Independent), Compressed TAR Archive |
| 5.5.20 | 23.2M | Download |
| (mysql-5.5.20.tar.gz) |
2下载完成,解压缩。里面有个安装说明文件:INSTALL-SOURCE打开,里面这一段是核心安装步骤:(命令前都加
sudo执行!)# Preconfiguration setup 首先是添加一个用户组
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz 解压缩源码包
shell> cd mysql-VERSION 切换到源码包目录
shell> cmake . 执行cmake,产生mk文件(没有cmake,sudo apt-get install cmake)
shell> make 编辑
shell> make install 安装
# End of source-build specific instructions -----------ok,安装完成了哦
# Postinstallation setup ----下面是配置mysql
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql ---执行内部mysql安装(
参看红线下方执行结果)
shell> chown -R root .
shell> chown -R mysql data
# Next command is optional --字面意思:下面这个命令可选
shell> cp support-files/my-medium.cnf /etc/my.cnf 复制mysql配置文件
shell> bin/mysqld_safe --user=mysql & 启动数据库
# Next command is optional --字面意思:下面这个命令可选
shell> cp support-files/mysql.server /etc/init.d/mysql.server 设置自启动
按照这个就能完整安装了3安装完并且配置完,进去看一下在/usr/local/mysql 目录,执行root@ www.linuxidc.com -laptop:/usr/local/mysql# ./bin/mysql -u root -S /tmp/mysql.sock -p
正常登录,提示:
- Server version: 5.5.20-log Source distribution
-
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
-
- Oracle is a registered trademark of Oracle Corporation and/or its
- affiliates. Other names may be trademarks of their respective
- owners.
-
- Type "help;" or "h" for help. Type "c" to clear the current input statement.
-
- mysql>
4官方网站有个gui工具,可以下载试一下:MySQL Workbench (GUI Tool)
在Ubuntu 10平台上MySQL 5.5的编译安装如何解决MySQL 5.5的中文乱码问题相关资讯 MySQL安装教程
- RedHat 6.3 源码安装 MySQL-5.5.29 (12/27/2012 11:18:51)
- Hadoop集群(第10期)_MySQL关系数 (12/23/2012 12:57:58)
- Ubuntu 12.10 下MySQL 5.1.65 解压 (12/05/2012 08:48:43)
| - CentOS上MySQL安装配置操作说明 (12/26/2012 15:52:34)
- Linux下编译安装MySQL5.5 (12/16/2012 10:38:17)
- CentOS 6.3安装MySQL 5.5 (11/29/2012 08:18:36)
|
本文评论 查看全部评论 (0)