数据库系统 DBS:
A.数据库管理系统(DataBase Management System, DBMS): (面试题) SQL(RDS托管型关系型数据库)关系型数据库
ORACLE
Oracle MySQL
DB2(IBM)
SQL-server(MS)
Mysql
MariaDB
Percona server(taobao)
B.DBA:工程师
systemctl stop firewalld
systemctl enable firewalld
setenforce 0
vim /etc/selinux/config SELINUX=disabled --开机禁用selinux
wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-server-5.7.25-1.el7.x86_64.rpm
wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-client-5.7.25-1.el7.x86_64.rpm
wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-common-5.7.25-1.el7.x86_64.rpm
wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-libs-5.7.25-1.el7.x86_64.rpm
yum install -y net-tools.x86_64 libaio.x86_64 perl.x86_64
yum remove -y mariadb-libs.x86_64
yum install -y mysql-community*(一般会和mariadb产生冲突,需要卸载)
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld
grep ‘password‘ /var/log/mysqld.log
mysqladmin -uroot -p‘es,W;ya(K1Th‘ password ‘QianFeng@123‘
mysql -uroot -p‘QianFeng@123‘
show databases;
yum -y install ncurses ncurses-devel openssl-devel bison gcc gcc-c++ make cmake
wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
tar xvf mysql-5.7.19.tar.gz(先得到软件包)
cd mysql-5.7.19
mv ../boost_1_59_0.tar.gz .
tar xf boost_1_59_0.tar.gz(先得到软件包)
cmake . -DWITH_BOOST=boost_1_59_0/ -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc -DMYSQL_DATADIR=/usr/local/mysql/data -DINSTALL_MANDIR=/usr/share/man -DMYSQL_TCP_PORT=3306 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DEXTRA_CHARSETS=all -DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1
make
make install
cd /usr/local/mysql
mkdir mysql-files
chown -R mysql.mysql /usr/local/mysql
/usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
/usr/local/mysql/bin/mysql_ssl_rsa_setup --datadir=/usr/local/mysql/data
mv /etc/my.cnf ~
vim /etc/my.cnf
[mysqld]
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
service mysqld start
ps aux |grep mysqld
/usr/local/mysql/bin/mysql -u root -p‘x/dwiQ2<l:hb‘
/usr/local/mysql/bin/mysqladmin -u root -p ‘x/dwiQ2<l:hb‘ password ‘QinFeng@123‘
show databases;
原文:https://blog.51cto.com/u_15135903/2704252