强>
下文主要给大家带来二进制通用格式安装mysql-5.5.52的详细步骤,希望二进制通用格式安装mysql-5.5.52的详细步骤能够带给大家实际用处,这也是我编辑这篇文章的主要目的。好了,废话不多说,大家直接看下文吧。
基于二进制通用格式安装mysql-5.5.52
环境介绍:
Linux主机:centos6.8
mysql二进制格式包:mysql-5.5.52-linux2.6-x86_64.tar.gz
1,解压包到特定目录
[root@centos6 ~] #, tar xf mysql-5.5.52-linux2.6-x86_64.tar.gz -C /usr/地方/
2,创建软链接
[root@centos6 ~] #, ln -sv /usr/地方/mysql-5.5.52-linux2.6-x86_64/,/usr/地方/mysql “/usr/地方/mysql # 39;,→,“/usr/地方/mysql-5.5.52-linux2.6-x86_64/& # 39;
3,进入该目录,查看安装帮助,开始安装
[root@centos6 ~] #, cd /usr/地方/mysql (root@centos6 mysql) #, cat 安装二进制//根据提示到指定网站查看帮助
(root@centos6 mysql) #, groupadd mysql ,, (root@centos6 mysql) #, useradd -r -g mysql -s /bin/false mysql //原来存在则不需要执行 (root@centos6 mysql) #, chown -R mysql 。 (root@centos6 mysql) #, chgrp -R mysql 。 (root@centos6 mysql) #,。/脚本/mysql_install_db ——帮助//查看选项 我们这里不使用它默认的数据库存放位置 (root@centos6 mysql) #, mkdir -pv /mysql/数据///数据库文件最好放在,硬raid 的,LVM 上 (root@centos6 mysql) #, chown mysql: mysql /mysql/数据/(root@centos6 mysql) #, ll -d /mysql/数据/drwxr-xr-x又是;2,mysql mysql 4096年,Sep 16, 21:44 /mysql/数据/(root@centos6 mysql) #,。/脚本/mysql_install_db ——datadir=/mysql/数据/,- - -用户=mysql (root@centos6 mysql) #, ls /mysql/数据/mysql , performance_schema , test //数据库初始化时生成的三个系统的数据库文件
,
(root@centos6 mysql) #, cp 支持文件/my-medium.cnf /etc/my.cnf cp: overwrite ,“/etc/my.cnf& # 39; ?, y ,//不使用系统上默认安装的mysql数据库则可以覆盖原来的配置文件 (root@centos6 mysql) #, vim/etc/my . cnf中所做
(root@centos6 mysql) #, cp 支持文件/mysql.server /etc/摆在/mysqld.server (root@centos6 mysql) #, chkconfig ——add mysqld.server
4,测试启动
(root@centos6 mysql) #, service mysqld.server 开始 Starting MySQL . .,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (OK 才能,,) (root@centos6 mysql) #, ss -tln LISTEN ,,,,, 0,,,,,, 50岁,,,,,,,,,*:3306
启动成功
此时数据库目录下会多出许多的文件或目录
5,最后的配置
导人出文档
[root@centos6 ~] #, vim /etc/man.config MANPATH /usr/地方/mysql/man ,,祝辞,添加该行
导出头文件
[root@centos6 ~] #, ln -sv /usr/地方/mysql/include/,/usr/include/mysql “/usr/include/mysql # 39;,→,“/usr/地方/mysql/include/& # 39;
导出库文件
[root@centos6 ~] #, vim /etc/ld.so.conf.d/mysql.conf/usr/local/mysql/lib
重新加载系统库文件
[root@centos6 自由]#,ldconfig - v
导出二进制程序路径
[root@centos6 ~] #, vim /etc/profile.d/mysql.sh [root@centos6 ~) #,只/etc/profile.d/mysql.sh
对于以上关于二进制通用格式安装mysql-5.5.52的详细步骤,大家是不是觉得非常有帮助。如果需要了解更多内容,请继续关注我们的行业资讯,相信你会喜欢上这些内容的。