1. Operating system: CentOS
2. Database: mysql-5.1.73.tar.gz
3. Task: Single-instance installation configuration Guide
Tip: There are two ways to download a database: One is the official website, the other is the domestic mirror image website; domestic mirror download resources faster than the official website, for example, we download this is the domestic Sohu mirror image:
Http://mirrors.sohu.com/mysql/MySQL-5.1/
http://mirrors.sohu.com/
The entire installation process:
[[email protected] tools] #wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73.tar.gz
[Email protected] tools]# tar zxf mysql-5.1.73.tar.gz
[email protected]]#./configure \
>--prefix=/usr/local/mysql \ #设定mysql安装路径, default is/usr/local
>--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock \ #指定mysql Socket File storage directory
>--localstatedir=/usr/local/mysql/data \ #设定mysql的文件存放位置
>--enable-assembler \ #充许使用汇编模式 (optimized performance)
>--enable-thread-safe-client \ #服务器
>--with-mysqld-user-user=mysql \
>--with-big-tables \
>--without-debug \ #使用非debug模式
>--with-pthread \ #强制使用pthread线程序库编译
>--enable-assembler \
>--with-extra-charsets=complex \
>--with-readline \
>--WITH-SSL \
>--with-embedded-server \
>--enable-local-infile \
>--with-plugins=partition,innobase \
>--with-plugin-plugin \
>--with-mysqld-ldflags=-all-static \ #服务器使用静态库 (optimized performance)
>--with-client-ldflags=-all-static #客户端使用静态库
#安装过程中报了一些错误
................................................................................
Checkingfor int8 ... no
Checkingfor uint8 ... no
Checkingfor int16 ... no
Checkingfor uint16 ... no
Checkingfor int32 ... no
Checkingfor UInt32 ... no
Checkingfor Int64 ... no
Checkingfor UInt64 ... no
Checkingfor Uchar ... no
Checkingcurses.h usability ... no
Checkingcurses.h presence ... no
Checkingfor curses.h ... no
Checkingtermcap.h usability ... no
Checkingtermcap.h presence ... no
Checkingfor termcap.h ... no
Checkingfor tgetent in-lncursesw ... no
Checkingfor tgetent in-lncurses ... no
Checkingfor tgetent in-lcurses ... no
Checkingfor tgetent in-ltermcap ... no
Checkingfor tgetent in-ltinfo ... no
Checkingfor termcap Functions Library ... configure:error:No curses/termcap libraryfound
...................................................................
# Troubleshoot the above (CentOS) Error:
[Email protected]]# yum-y Install Ncurses-devel
[Email protected]]# yum Install gcc gcc-c++
#接下来重新配置环境;
[email protected]]#./configure \
[[Email protected]]# make #编译
[[email protected]] #make install #执行
#安装完成之后, check that the installation is successful!
[Email protected]]# netstat-lnt|grep 3306 #检查3306端口是否开启了
TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
[Email protected]] # mysql-u Root-p
Enterpassword:
ERROR1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)
#登录不了的解决办法如下:
[[Email protected]~] #sudo/etc/init.d/mysqld stop
[Email protected]~] #mysqld_safe--skip-grant-tables&
[Email protected]~]# mysql-u Root MySQL
Mysql>update User Set Password=password ("Set new password") where user= ' root ';
Mysql>flush privileges; Refresh the System permissions table for immediate effect
Add:
[[email protected] tools]# RZ #结合secureCRT工具, through the RZ command upload to the service can also
[[email protected] tools]# Yum install lrzsz-y #没有安装, installed through the Yum source
This article is from the "Linux~dba~mba" blog, make sure to keep this source http://sky9896.blog.51cto.com/2330653/1600769
MySQL Single instance installation configuration Guide