mysql binaryVInstall
时间:2022-03-10 17:23
下载mysql
1.下载:在http://dev.mysql.com/downloads/mysql/官网上下载mysql-5.5.28-linux2.6-i686.tar.gz.
2.解压
tar -xvf mysql-5.5.28-linux2.6-i686.tar.gz
3.移动到/usr/local/mysql
mv mysql-5.5.28-linux2.6-i686 /usr/local/ ln -s mysql-5.5.28-linux2.6-i686/ mysql
4.安装依赖的lib包:执行/usr/local/bin/mysql/bin/mysqld,报错
/usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
使用apt-cache search libaio,找到如下软件源
libaio-dev - Linux kernel AIO access library - development files libaio1 - Linux kernel AIO access library - shared library libaio1-dbg - Linux kernel AIO access library - debugging symbols
使用apt-get install libaio1.
配置用户,目录
shell> groupadd mysql shell> useradd -r -g mysql mysql shell> cd /usr/local/mysql shell> chown -R mysql . shell> chgrp -R mysql .
初始化mysql
mysql binaryVInstall,布布扣,bubuko.com