Linux安装mysql

要在centos上安装mysql,这些知识还不是很了解,找了一些资料分享一下

1、下载mysql-5.5.3-m3.tar.gz,并且解压.
tar -xzvf mysql-5.1.36.tar.gz

2、添加mysql组,新建mysql用户
groupadd mysql
useradd -g mysql mysql

3、进入目录
cd mysql-5.5.3-m3/

4、配置
./configure --prefix=/usr/local/webserver/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg

注:我在这里出现了错误:

configure.am: error: in `/usr/local/soft/mysql-5.5.3-m3':

configure.am: error: no acceptable C compiler found in $PATH

See `config.log' for more details.

解决:

 因为是centos linux,默认可以采用yum方式安装,则采用如下命令安装gcc编译器即可:

# yum -y install gcc


安装mysql时No curses/termcap library found

checking for termcap functions library... configure: error: No curses/termcap library found

解决:

wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
cd ncurses-5.6
./configure �Cprefix=/usr �Cwith-shared �Cwithout-debug
make
make install clean

你可能感兴趣的:(linux,centos,mysql安装)