真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

OracleLinux7.1中安裝Mariadb-創(chuàng)新互聯(lián)

在Oracle Linux 7.1中安裝Mariadb 10.0.38,因為Mariadb是Mysql的分支,安裝操作基本類似。

讓客戶滿意是我們工作的目標,不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領域值得信任、有價值的長期合作伙伴,公司提供的服務項目有:域名注冊、網(wǎng)頁空間、營銷軟件、網(wǎng)站建設、太谷網(wǎng)站維護、網(wǎng)站推廣。

1.首先下載安裝介質mariadb-10.0.38-linux-glibc_214-x86.tar.gz 并將其上傳到服務器的/soft目錄

2.創(chuàng)建用戶與用戶組

[root@cs1 soft]# groupadd mysql

[root@cs1 soft]# useradd -g mysql mysql

3.將介質解壓到/usr/local/目錄下

[root@cs1 soft]# cd /usr/local

[root@cs1 local]# gunzip < /soft/mariadb-10.0.38-linux-glibc_214-x86.tar.gz | tar xvf -

mariadb-10.0.38-linux-glibc_214-x86/

mariadb-10.0.38-linux-glibc_214-x86/man/

mariadb-10.0.38-linux-glibc_214-x86/man/man8/

mariadb-10.0.38-linux-glibc_214-x86/man/man8/mysqld.8

........省略..........

[root@cs1 local]# ls -lrt

總用量 4

drwxr-xr-x.  2 root root    6 5月   8 2014 src

drwxr-xr-x.  2 root root    6 5月   8 2014 sbin

drwxr-xr-x.  2 root root    6 5月   8 2014 libexec

drwxr-xr-x.  2 root root    6 5月   8 2014 libdrwxr-xr-x.  2 root root    6 5月   8 2014 lib

drwxr-xr-x.  2 root root    6 5月   8 2014 include

drwxr-xr-x.  2 root root    6 5月   8 2014 games

drwxr-xr-x.  2 root root    6 5月   8 2014 etc

drwxr-xr-x.  5 root root   46 10月 12 2017 share

drwxr-xr-x.  2 root root   46 3月   9 2018 bin

drwxrwxr-x  13 1021 1004 4096 1月  31 02:40 mariadb-10.0.38-linux-glibc_214-x86

4.創(chuàng)建軟鏈接

[root@cs1 local]# ln -s mariadb-10.0.38-linux-glibc_214-x86 mysql

[root@cs1 local]# ls -lrt

總用量 4

drwxr-xr-x.  2 root root    6 5月   8 2014 src

drwxr-xr-x.  2 root root    6 5月   8 2014 sbin

drwxr-xr-x.  2 root root    6 5月   8 2014 libexec

drwxr-xr-x.  2 root root    6 5月   8 2014 libdrwxr-xr-x.  2 root root    6 5月   8 2014 lib

drwxr-xr-x.  2 root root    6 5月   8 2014 include

drwxr-xr-x.  2 root root    6 5月   8 2014 games

drwxr-xr-x.  2 root root    6 5月   8 2014 etc

drwxr-xr-x.  5 root root   46 10月 12 2017 share

drwxr-xr-x.  2 root root   46 3月   9 2018 bin

drwxrwxr-x  13 1021 1004 4096 1月  31 02:40 mariadb-10.0.38-linux-glibc_214-x86 

lrwxrwxrwx   1 root root   38 6月   4 14:43 mysql -> mariadb-10.0.38-linux-glibc_214-x86

5.確保目錄mysql能夠被用戶mysql訪問

[root@cs1 local]# cd mysql

[root@cs1 mysql]# chown -R mysql .

[root@cs1 mysql]# chgrp -R mysql .

6.在安裝Mariadb之前,必須創(chuàng)建Mariadb存放數(shù)據(jù)的目錄并初始化grant表,執(zhí)行mysql_install_db命令來安裝Mariadb,如果使用root用戶來執(zhí)行,必須包含--user選項來指定用戶,如果是mysql用戶來執(zhí)行可以忽略--user選項。使用 --basedir=path 選項指定Mariadb安裝目錄的路徑,--datadir=path選項指定Mariadb數(shù)據(jù)目錄的路徑。如果沒有指定--basedir與--datadir選項它們在/usr/local/mysql目錄下創(chuàng)建一個data目錄。

[root@cs1 mysql]# scripts/mysql_install_db --user=mysql

Installing MariaDB/MySQL system tables in './data' ...

190604 14:44:44 [Note] ./bin/mysqld (mysqld 10.0.38-MariaDB) starting as process 19627 ...

190604 14:44:45 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

190604 14:44:45 [Note] InnoDB: Using mutexes to ref count buffer pool pages

190604 14:44:45 [Note] InnoDB: The InnoDB memory heap is disabled

190604 14:44:45 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

190604 14:44:45 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

190604 14:44:45 [Note] InnoDB: Compressed tables use zlib 1.2.11

190604 14:44:45 [Note] InnoDB: Using Linux native AIO

190604 14:44:45 [Note] InnoDB: Using CPU crc32 instructions

190604 14:44:45 [Note] InnoDB: Initializing buffer pool, size = 128.0M

190604 14:44:45 [Note] InnoDB: Completed initialization of buffer pool

190604 14:44:45 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

190604 14:44:45 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

190604 14:44:45 [Note] InnoDB: Database physically writes the file full: wait...

190604 14:44:45 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB

190604 14:44:45 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB

190604 14:44:46 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

190604 14:44:46 [Warning] InnoDB: New log files created, LSN=45781

190604 14:44:46 [Note] InnoDB: Doublewrite buffer not found: creating new

190604 14:44:46 [Note] InnoDB: Doublewrite buffer created

190604 14:44:46 [Note] InnoDB: 128 rollback segment(s) are active.

190604 14:44:46 [Warning] InnoDB: Creating foreign key constraint system tables.

190604 14:44:46 [Note] InnoDB: Foreign key constraint system tables created

190604 14:44:46 [Note] InnoDB: Creating tablespace and datafile system tables.

190604 14:44:46 [Note] InnoDB: Tablespace and datafile system tables created.

190604 14:44:46 [Note] InnoDB: Waiting for purge to start

190604 14:44:46 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 0

190604 14:44:48 [Note] InnoDB: FTS optimize thread exiting.

190604 14:44:48 [Note] InnoDB: Starting shutdown...

190604 14:44:48 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool

190604 14:44:50 [Note] InnoDB: Shutdown completed; log sequence number 1616697

OK

Filling help tables...

190604 14:44:50 [Note] ./bin/mysqld (mysqld 10.0.38-MariaDB) starting as process 19661 ...

190604 14:44:50 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

190604 14:44:50 [Note] InnoDB: Using mutexes to ref count buffer pool pages

190604 14:44:50 [Note] InnoDB: The InnoDB memory heap is disabled

190604 14:44:50 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

190604 14:44:50 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

190604 14:44:50 [Note] InnoDB: Compressed tables use zlib 1.2.11

190604 14:44:50 [Note] InnoDB: Using Linux native AIO

190604 14:44:50 [Note] InnoDB: Using CPU crc32 instructions

190604 14:44:50 [Note] InnoDB: Initializing buffer pool, size = 128.0M

190604 14:44:50 [Note] InnoDB: Completed initialization of buffer pool

190604 14:44:50 [Note] InnoDB: Highest supported file format is Barracuda.

190604 14:44:50 [Note] InnoDB: 128 rollback segment(s) are active.

190604 14:44:50 [Note] InnoDB: Waiting for purge to start

190604 14:44:50 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.42-84.2 started; log sequence number 1616697

190604 14:44:50 [Note] InnoDB: FTS optimize thread exiting.

190604 14:44:50 [Note] InnoDB: Starting shutdown...

190604 14:44:51 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool

190604 14:44:53 [Note] InnoDB: Shutdown completed; log sequence number 1616707

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !

To do so, start the server, then issue the following commands:

'./bin/mysqladmin' -u root password 'new-password'

'./bin/mysqladmin' -u root -h cs1.jy.net password 'new-password'

Alternatively you can run:

'./bin/mysql_secure_installation'

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the MariaDB Knowledgebase at /tupian/20230522/ or the

MySQL manual for more instructions.

You can start the MariaDB daemon with:

cd '.' ; ./bin/mysqld_safe --datadir='./data'

You can test the MariaDB daemon with mysql-test-run.pl

cd './mysql-test' ; perl mysql-test-run.pl

Please report any problems at /tupian/20230522/Dashboard.jspa

The latest information about MariaDB is available at /tupian/20230522/

You can find additional information about the MySQL part at:

/tupian/20230522/

Consider joining MariaDB's strong and vibrant community:

/tupian/20230522/

7.因為安裝Mariadb的用戶是root用戶,而data目錄必須要被mysql用戶訪問,因此修改data目錄的用戶與組權限

[root@cs1 mysql]# chown -R root .

[root@cs1 mysql]# chown -R mysql data

8.在安裝完成后來測試Mariadb的啟動

[root@cs1 mysql]# bin/mysqld_safe --user=mysql &

[1] 19770

[root@cs1 mysql]# 190604 14:45:25 mysqld_safe Logging to '/usr/local/mysql/data/cs1.jy.net.err'.

190604 14:45:25 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

mysqld_safe是服務端工具,用于啟動mysqld,并且是mysqld的守護進程,mysqld_safe加&在后臺運行$BASEDIR/bin/mysqld_safe &。因為mysqld_safe是mysqld的守護進程,所以mysqld_safe腳本會在啟動MySQL服務器后繼續(xù)監(jiān)控其運行情況,并在其死機時重新啟動它。直接使用mysqld_safe啟動mysqld時,mysqld_safe可以使用參數(shù)選項見mysqld_safe --help,此時可以使用其他配置文件,相當于mysqld_safe把參數(shù)傳遞給mysqld。mysql.server腳本其實也是調用mysqld_safe腳本去啟動MySQL服務器的,但此時mysqld_safe不能使用參數(shù)選項即不能mysqld_safe --defaults-file這樣的模式。

9.將啟動Mariadb的腳本配置成服務通過service name start命令來啟用

[root@cs1 mysql]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

[root@cs1 mysql]# cat /etc/init.d/mysqld

[root@cs1 Packages]# service mysqld status

 SUCCESS! MariaDB running (19839)

[root@cs1 Packages]# service mysqld stop

Shutting down MariaDB... SUCCESS! 

[root@cs1 Packages]# service mysqld start

Starting MariaDB.190604 18:26:04 mysqld_safe Logging to '/usr/local/mysql/data/cs1.jy.net.err'.

190604 18:26:05 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

 SUCCESS!

10.修改root用戶密碼

-bash-4.2$ mysql

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

Your MariaDB connection id is 4

Server version: 10.0.38-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> 

MariaDB [mysql]> set password=password("123456");

Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]> exit

-bash-4.2$ mysql -u root -p

Enter password: 

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

Your MariaDB connection id is 6

Server version: 10.0.38-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> show databases;

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

| Database           |

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

| information_schema |

| mysql              |

| performance_schema |

| test               |

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

4 rows in set (0.01 sec)

MariaDB [(none)]> use mysql;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

11.使用mytop工具來監(jiān)控Mariadb,mytop在Mariadb安裝時也會自動安裝,而mysql中需要單獨安裝

-bash-4.2$ mytop --prompt -u root -d mysql

Password: 

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at (eval 13) line 3,  line 1.

Perhaps the DBD::mysql perl module hasn't been fully installed,

or perhaps the capitalisation of 'mysql' isn't right.

Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.

 at /usr/local/mysql//bin/mytop line 253.

錯誤信息說明沒有安裝perl-DBD-MySQL工具包

12.安裝perl-DBD-MySQ工具包

[root@cs1 bin]# yum install perl-DBD-MySQL

已加載插件:langpacks

Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast

file:///run/media/jy/OL-7.1%20Server.x86/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /run/media/jy/OL-7.1%20Server.x86/repodata/repomd.xml"

正在嘗試其它鏡像。

正在解決依賴關系

--> 正在檢查事務

---> 軟件包 perl-DBD-MySQL.x86.0.4.023-5.0.1.el7 將被 安裝

--> 正在處理依賴關系 libmysqlclient.so.18(libmysqlclient_18)(bit),它被軟件包 perl-DBD-MySQL-4.023-5.0.1.el7.x86 需要

--> 正在處理依賴關系 libmysqlclient.so.18()(bit),它被軟件包 perl-DBD-MySQL-4.023-5.0.1.el7.x86 需要

--> 正在檢查事務

---> 軟件包 mysql-community-libs.x86.0.5.6.23-3.el7 將被 安裝

--> 正在處理依賴關系 mysql-community-common(x86-) = 5.6.23-3.el7,它被軟件包 mysql-community-libs-5.6.23-3.el7.x86 需要

--> 正在檢查事務

---> 軟件包 mysql-community-common.x86.0.5.6.23-3.el7 將被 安裝

--> 解決依賴關系完成

依賴關系解決

============================================================================================================================================================================================================================================

 Package                                                            架構                                               版本                                                         源                                                 大小

============================================================================================================================================================================================================================================

正在安裝:

 perl-DBD-MySQL                                                     x86                                             4.023-5.0.1.el7                                              local                                             140 k

為依賴而安裝:

 mysql-community-common                                             x86                                             5.6.23-3.el7                                                 local                                             256 k

 mysql-community-libs                                               x86                                             5.6.23-3.el7                                                 local                                             2.0 M

事務概要

============================================================================================================================================================================================================================================

安裝  1 軟件包 (+2 依賴軟件包)

總下載量:2.4 M

安裝大?。?2 M

Is this ok [y/d/N]: y

Downloading packages:

Error downloading packages:

  mysql-community-common-5.6.23-3.el7.x86: [Errno 256] No more mirrors to try.

  perl-DBD-MySQL-4.023-5.0.1.el7.x86: [Errno 256] No more mirrors to try.

  mysql-community-libs-5.6.23-3.el7.x86: [Errno 256] No more mirrors to try.

出現(xiàn)不能下載相關工具包的錯誤

13.將操作系統(tǒng)ISO文件掛載到系統(tǒng)中并進入Packages目錄執(zhí)行rpm命令來安裝

root@cs1 Packages]# ls -lrt mysql*

-rw-rw-r-- 1 root root  13136 5月  14 2014 mysql-connector-java-5.1.25-3.el7.noarch.rpm

-rw-rw-r-- 1 root root   145144 8月   6 2014 mysql-connector-odbc-5.2.5-6.0.1.el7.x86.rpm

-rw-r--r-- 1 root root   4203 2月  19 2015 mysql-community-bench-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root 19378376 2月  19 2015 mysql-community-client-5.6.23-3.el7.i686.rpm

-rw-r--r-- 1 root root  3435828 2月  19 2015 mysql-community-devel-5.6.23-3.el7.i686.rpm

-rw-r--r-- 1 root root   2624 2月  19 2015 mysql-community-common-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root   262516 2月  19 2015 mysql-community-common-5.6.23-3.el7.i686.rpm

-rw-r--r-- 1 root root 19979168 2月  19 2015 mysql-community-client-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root  3543424 2月  19 2015 mysql-community-devel-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root 23060740 2月  19 2015 mysql-community-embedded-5.6.23-3.el7.i686.rpm

-rw-r--r-- 1 root root 23733580 2月  19 2015 mysql-community-embedded-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root 4916 2月  19 2015 mysql-community-embedded-devel-5.6.23-3.el7.i686.rpm

-rw-r--r-- 1 root root  2104968 2月  19 2015 mysql-community-libs-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root  2040356 2月  19 2015 mysql-community-libs-5.6.23-3.el7.i686.rpm

-rw-r--r-- 1 root root 68058508 2月  19 2015 mysql-community-embedded-devel-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root 60224180 2月  19 2015 mysql-community-server-5.6.23-3.el7.x86.rpm

-rw-r--r-- 1 root root 59280136 2月  19 2015 mysql-community-test-5.6.23-3.el7.x86.rpm

[root@cs1 Packages]# rpm -ihv mysql-community-libs-5.6.23-3.el7.x86.rpm

警告:mysql-community-libs-5.6.23-3.el7.x86.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY

錯誤:依賴檢測失?。?/p>

        mysql-community-common(x86-) = 5.6.23-3.el7 被 mysql-community-libs-5.6.23-3.el7.x86 需要

[root@cs1 Packages]# rpm -ivh mysql-community-common-5.6.23-3.el7.x86.rpm

警告:mysql-community-common-5.6.23-3.el7.x86.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY

準備中...                             ################################# [100%]

正在升級/安裝...

   1:mysql-community-common-5.6.23-3.e################################# [100%]

[root@cs1 Packages]# rpm -ihv mysql-community-libs-5.6.23-3.el7.x86.rpm

警告:mysql-community-libs-5.6.23-3.el7.x86.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY

準備中...                             ################################# [100%]

正在升級/安裝...

   1:mysql-community-libs-5.6.23-3.el7################################# [100%]

[root@cs1 Packages]# ls -lrt perl-DBD-MySQL

ls: 無法訪問perl-DBD-MySQL: 沒有那個文件或目錄

[root@cs1 Packages]# ls -lrt perl-DBD-MySQL*

-rw-rw-r-- 1 root root 143092 8月   6 2014 perl-DBD-MySQL-4.023-5.0.1.el7.x86.rpm

[root@cs1 Packages]# rpm -ivh perl-DBD-MySQL-4.023-5.0.1.el7.x86.rpm

警告:perl-DBD-MySQL-4.023-5.0.1.el7.x86.rpm: 頭V3 RSA/SHA256 Signature, 密鑰 ID ec551f03: NOKEY

準備中...                             ################################# [100%]

正在升級/安裝...

   1:perl-DBD-MySQL-4.023-5.0.1.el7   ################################# [100%]

14.執(zhí)行mytop命令來監(jiān)控Mariadb

-bash-4.2$ mytop -u root -p 123456

MariaDB on localhost (10.0.38-MariaDB)                                                                                                                                                                  up 0+01:04:21 [15:49:46]

 Queries: 170.0   qps:    0 Slow:     0.0         Se/In/Up/De(%):    06/00/00/00

 Sorts:     0 qps now:    1 Slow qps: 0.0  Threads:    2 (   1/   0) 00/00/00/00

 Handler: (R/W/U/D)     0/    0/    0/    0        Tmp: R/W/U:    89/   89/    0

 ISAM Key Efficiency: 0.0%  Bps in/out:   1.4/ 66.6   Now in/out:  22.6/ 2.9k

       Id     User         Host/IP        DB   Time     %    Cmd           State Query

       --     ----         -------        --   ----     -    ---           ----- ----------

       12     root       localhost     mysql     10   0.0  Sleep                                                                                                                                                                          

       10     root       localhost      test      0   0.0  Query            init show full processlist

到此安裝也就完成了。


網(wǎng)站名稱:OracleLinux7.1中安裝Mariadb-創(chuàng)新互聯(lián)
鏈接分享:http://weahome.cn/article/ddgojg.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部