本篇内容介绍了“CentOS下怎么安装MySQL5.1”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
01
1.包
02
wget http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.63.tar.gz
03
2.解压
04
tar zvxf ./mysql-5.1.63.tar.gz
05
3.配置configure
06
./configure --prefix=/usr/local/mysql
07 www.2cto.com
--with-charset=utf8
08
--with-extra-charsets=all
09
--with-tcp-port=3306
10
--with-unix-socket-path=/tmp/mysql.sock
11
--with-mysqld-user=mysqld
12
--with-federated-storage-engine
13
--with-mysqld-user=mysqld
14
--with-plugins=innobase,myisam
15
--enable-assembler
16
--without-isam
17
--with-client-ldflags=-all-static
18
19
{
20
出现checking for termcap functions library... configure: error: No curses/termcap library found
21
curses/termcap 库没有安装
22
下载wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
23
解压 tar zxvf ncurses-5.9.tar.gz
24
进入目录 sudo ./configure --prefix=/usr --with-shared --without-debug
25
编译,安装 make , make install
26 www.2cto.com
}
27
4.编译,安裝
28
make
29
make install
30
5.创建用户和组.配置
31
groupadd mysql
32
useradd -g mysql mysql
33
cp support-files/my-media.cnf /etc/my.cnf
34
mkdir /usr/local/mysql/var
35
36
修改MySQL 数据目录的 ownership
37
chown -R mysql /usr/local/mysql /usr/lib/mysql /usr/share/mysql
38
chgrp -R mysql /usr/local/mysql /usr/lib/mysql /usr/share/mysql
39
www.2cto.com
40
6.安装,启动,进入.
41
/usr/local//bin/mysql_install_db
42
/user/local/mysql/bin/mysqld_safe
43
/user/local/mysql/bin/mysql -u root
44
7.添加启动项
45
mv /usr/local/mysqlshare/mysql/mysql.server /etc/init.d/mysql
46
chmod 775 /etc/init.d/mysql
47
chkconfig --add mysql
“CentOS下怎么安装MySQL5.1”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。