日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

宝塔Linux怎么安装Mariadb,如何在linux上面安装mariadb总结

發布時間:2025/3/8 linux 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 宝塔Linux怎么安装Mariadb,如何在linux上面安装mariadb总结 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、下載MariaDB(mariadb-5.5.31.tar.gz)

[root@zabbix_server opt]# wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz

2、安裝MariaDB

[root@zabbix_server opt]# tar xzvf mariadb-5.5.31.tar.gz

[root@zabbix_server cmake-2.8.5]# cd cmake-2.8.5

[root@zabbix_server cmake-2.8.5]# ./bootstrap

[root@zabbix_server cmake-2.8.5]# make

[root@zabbix_server cmake-2.8.5]# make install

3、安裝MariaDB所需軟件包

yum install libaio-devel -y

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mariamysql

-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1

-DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8

-DDEFAULT_COLLATION=utf8_general_ci -DWITH_DEBUG=0

-DBUILD_CONFIG=mysql_release -DFEATURE_SET=community

-DWITH_EMBEDDED_SERVER=OFF

cp support-files/my-innodb-heavy-4G.cnf /etc/my.cnf

/usr/local/mariamysql/scripts/mysql_install_db

--basedir=/usr/local/mariamysql/ --datadir=/usr/local/mariamysql/data/

--user=mysql

/usr/local/mariamysql/bin/mysqld_safe --user=mysql &

4、查看mariadb是否安裝成功

[root@zabbix_server mariadb-5.5.31]# ps -ef | grep mysql

root 9010 17846 0 16:08 pts/0 00:00:00 /bin/sh /usr/local/mariamysql/bin/mysqld_safe --user=mysql

mysql 9459 9010 0 16:08 pts/0 00:00:01 /usr/local/mariamysql/bin/mysqld --basedir=/usr/local/mariamysql --datadir=/data/database --plugin-dir=/usr/local/mariamysql/lib/plugin --user=mysql --log-error=/data/database/zabbix_server.err --open-files-limit=40960 --pid-file=zabbix_server.pid --socket=/data/database/mysql.sock --port=3306

root 10391 17846 0 16:16 pts/0 00:00:00 grep mysql

[root@zabbix_server mariadb-5.5.31]# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 41

Server version: 5.5.31-MariaDB-log MariaDB Server

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

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

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

root@zabbix ((none)) > show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| zabbix |

+--------------------+

3 rows in set (0.00 sec)

root@zabbix ((none)) >

總結

以上是生活随笔為你收集整理的宝塔Linux怎么安装Mariadb,如何在linux上面安装mariadb总结的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。