1、概述 mysql為關係型資料庫。 mysql的分支-- mysql (自己本身) -- 2008前後的被SUN收購 SUN之後又被oracle收購 系統集成--什麼都乾(- 套解決方案) mariadb mysql被收購後,作者為了避免資料庫被壟斷,作者基於mysql的早期版本開發了mariad ...
1、概述
mysql為關係型資料庫。
mysql的分支-- mysql (自己本身) -- 2008前後的被SUN收購 SUN之後又被oracle收購
系統集成--什麼都乾(- 套解決方案)
mariadb mysql被收購後,作者為了避免資料庫被壟斷,作者基於mysql的早期版本開發了mariadb
percona-server 在歐洲,專門mysql資料庫寫手冊,
postgre SQL 自己說自己是關係型數據路行業老大的一家公司
oracle 最流行的資料庫
mssql 微軟資料庫
2、mariadb的安裝
(1) 創建用戶
[root@localhost ~]# groupadd mysql [root@localhost ~]# useradd -r -g mysql -s /sbin/nologin mysql
(2)解壓並安裝
[root@localhost ~]# tar xf mariadb-5.5.65-linux-systemd-x86_64.gz [root@localhost ~]# mv mariadb-5.5.65-linux-systemd-x86_64 /usr/local/mysql
(3)編輯my.cnf文件
[root@localhost mysql]# cp support-files/my-small.cnf /etc/my.cnf cp: overwrite ‘/etc/my.cnf’? y [root@localhost mysql]# vim /etc/my.cnf
[mysqld] port = 3306 socket = /tmp/mysql.sock skip-external-locking key_buffer_size = 16K max_allowed_packet = 1M table_open_cache = 4 sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K thread_stack = 240K basedir = /usr/local/mysql datadir = /usr/local/mysql/data innodb_file_per_table=on skip_name_resolve = on
#給mysql用戶許可權
[root@localhost mysql]# chown -R mysql.mysql /usr/local/mysql/ [root@localhost mysql]# chmod -R 755 /usr/local/mysql/
初始化mysql
[root@localhost mysql]# /usr/local/mysql/scripts/mysql_install_db --user=mysql Installing MariaDB/MySQL system tables in '/usr/local/mysql/data' ... 190910 12:38:06 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.65-MariaDB) starting as process 12547 ... OK Filling help tables... 190910 12:38:06 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.65-MariaDB) starting as process 12556 ... OK
將mysql服務添加到init.d中
[root@localhost mysql]# cd support-files/ [root@localhost support-files]# cp -a mysql.server /etc/init.d/mysqld
啟動mysql [root@localhost support-files]# /etc/init.d/mysqld start Starting MariaDB.190910 12:40:15 mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err'. 190910 12:40:15 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data . SUCCESS!