MySQL5.5.8安装

一、软件包

a) cmake-2.8.3.tar.gz

b) mysql-5.5.8.tar.gz

二、安装步骤

a) Tar zxvf cmake-2.8.3.tar.gz

b) Cd cmake-2.8.3

c) ./bootstrap

d) Make

e) Make install

f) Tar zxvf mysql-5.5.8.tar.gz

g) Cd mysql-5.5.8

h) 配置参数

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5 \

-DINSTALL_DATADIR=/usr/local/mysql5/data \

-DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci \

-DEXTRA_CHARSETS=all \

-DWITH_SSL=system \

-DWITH_EMBEDDED_SERVER=1 \

-DENABLED_LOCAL_INFILE=1 \

-DWITH_MYISAM_STORAGE_ENGINE=1

i) Make

j) Make install

k) Useradd mysql –d /dev/null –s /sbin/nologin

l) Chown –R mysql:mysql /usr/local/mysql5/

m) Chown –r mysql:mysql /usr/local/mysql5/data

n) Cp ./support-files/my-medium.cnf /etc/my.cnf

o) Chown 744 ./scripts/mysql_install_db

p) ./scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql5 –datadir=/usr/local/mysql5/data

q) Chown –R mysql:mysql /usr/local/mysql5/data

r) /usr/local/mysql5/bin/mysqld_safe –user=mysql&

s) /usr/local/mysql5/bin/mysql –uroot

t) Mysql>use mysql;

u) Mysql>update user set password=password(‘123456’) where user=’root’;

v) Cp ./support-files/mysql.server /etc/init.d/mysql5

w) Chkconfig –add mysql5

x) Chkconfig mysql5 on

y) Service mysql5 restart

三、附件

a) 编译选项说明

编译选项说明:

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql5 //安装目录

-DINSTALL_DATADIR=/usr/local/mysql5/data //数据库存放目录

-DDEFAULT_CHARSET=utf8 //使用utf8字符

-DDEFAULT_COLLATION=utf8_general_ci //校验字符

-DEXTRA_CHARSETS=all //安装所有扩展字符集

-DWITH_SSL=system //使用SSL加密 (bundled)

-DWITH_EMBEDDED_SERVER=1 //编译成embedded mysql library

-DENABLED_LOCAL_INFILE=1 //允许从本地导入数据

-DWITH_MYISAM_STORAGE_ENGINE=1 //安装myisam引擎

b) Mysql>show engines;

+--------------------+---------+------------------------------------------------------------+--------------+------+------------+

| Engine | Support | Comment | Transactions | XA | Savepoints |

+--------------------+---------+------------------------------------------------------------+--------------+------+------------+

| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |

| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |

| CSV | YES | CSV storage engine | NO | NO | NO |

| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |

| MyISAM | YES | MyISAM storage engine | NO | NO | NO |

| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |

+--------------------+---------+------------------------------------------------------------+--------------+------+------------+

6 rows in set (0.01 sec)

转载于:https://www.cnblogs.com/witer666/archive/2011/01/04/1925360.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值