解决安装mysql动态库libstdc++.so.6、libc.so.6版本过低问题

初始化mysql报错:

./bin/mysqld: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./bin/mysqld)
./bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./bin/mysqld)
---------------------

原因:动态库版本低

[root@haughty software] strings /usr/lib/libstdc++.so.6 | grep GLIBCXX    ###查看动态库版本
并没有动态库中要求的GCC版本 “GLIBCXX_3.4.15”,所以需要进行升级一下我们的GCC版本 过程如下:
[root@haughty software] wget http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb #下载较新版本的GCC libstdc库
[root@haughty software] ar -x libstdc++6_4.7.2-5_amd64.deb #解压
[root@haughty software] tar -zxvf data.tar.gz #解压
[root@haughty software] cp usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17 /usr/lib64 #拷贝至/usr/lib64下
[root@haughty software] rm -rf /usr/lib64/libstdc++.so.6 #删除低版本库的软连接
[root@haughty software] ln -s /usr/lib64/libstdc++.so.6.0.17 /usr/lib64/libstdc++.so.6
-----------------------------------------------------------------------------------------------------------
./bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./bin/mysqld)
解决:
[root@haughty mysql]#strings /lib64/libc.so.6 |grep GLIBC
wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
tar -xvf glibc-2.15.tar.gz
tar -xvf glibc-ports-2.15.tar.gz
mv glibc-ports-2.15 glibc-2.15/ports
mkdir glibc-build-2.15
cd glibc-build-2.15
ls
../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make
make install
strings libc.so | grep GLIBC

处理问题链接:
https://blog.csdn.net/poxiaonie/article/details/74059023