码迷,mamicode.com
首页 > 数据库 > 详细

SuSE11单实例二进制安装MySQL5.7

时间:2020-06-19 16:23:22      阅读:62      评论:0      收藏:0      [点我收藏+]

标签:rac   ann   sql   没有   server   while   socket   multi   x86_64   


root@ktppd01:sqm#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root 15G 540M 14G 4% /
udev 7.8G 124K 7.8G 1% /dev
tmpfs 7.8G 76K 7.8G 1% /dev/shm
/dev/sda1 5.0G 199M 4.5G 5% /boot
/dev/mapper/rootvg-lv_tmp 9.9G 724M 8.7G 8% /tmp
/dev/mapper/rootvg-lv_usr 9.9G 4.3G 5.2G 46% /usr
/dev/mapper/rootvg-lv_var 5.0G 356M 4.4G 8% /var
/dev/mapper/rootvg-lv_oracle 20G 173M 19G 1% /oracle
/dev/mapper/rootvg-lvsqm 148G 188M 140G 1% /sqm


上传解压安装包
mv mysql-5.7.29-linux-glibc2.12-x86_64 mysql

groupadd mysql
useradd -g mysql mysql


cd /sqm/mysql/bin
root@ktppd01:bin#./mysqld --initialize-insecure --basedir=/sqm/mysql/ --datadir=/sqm/mysql/data/ --user=mysql
root@ktppd01:bin#


vim /etc/my.cnf
[mysqld]
basedir=/sqm/mysql/
datadir=/sqm/mysql/data/
socket=/tmp/mysql.sock
log_error=/sqm/mysql/log/mysql.err
user=mysql
[mysql]
socket=/tmp/mysql.sock

 

 

启动mysql数据库
root@ktppd01:mysql#cd support-files
root@ktppd01:support-files#ls
magic mysql-log-rotate mysql.server mysqld_multi.server
root@ktppd01:support-files#./mysql.server start
Starting MySQL. done
root@ktppd01:support-files#cp mysql.server /etc/init.d/mysqld
root@ktppd01:support-files#/etc/init.d/mysqld restart
Shutting down MySQL.. done
Starting MySQL. done
root@ktppd01:support-files#
验证数据库
修改环境变量
vim .bash_profile
export PATH=/sqm/mysql/bin:$PATH
source .bash_profile

 

检查依赖包

tack-5.6-90.55.x86_64.rpm 

ncurses-devel-5.6-90.55.x86_64.rpm 

 

root@ktppd01:~#rpm -qa tack-5.6-90.55
root@ktppd01:~#rpm -qa tack*
tack-5.6-90.55
root@ktppd01:~#rpm -qa ncurses-devel*
ncurses-devel-5.6-90.55
ncurses-devel-32bit-5.6-90.55

root@ktppd01:~#ln -s /usr/lib64/libncurses.so /usr/lib64/libtinfo.so.5

注:如果上面连接文件没有创建,则客户端连接MYSQL服务的时候会报如下异常信息:

error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory


root@ktppd01:~#mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.29 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> show database
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database‘ at line 1
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)

mysql>
mysql>
mysql>

SuSE11单实例二进制安装MySQL5.7

标签:rac   ann   sql   没有   server   while   socket   multi   x86_64   

原文地址:https://www.cnblogs.com/nadian-li/p/13163126.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!