最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

MySQL infobright的安裝步驟

 更新時間:2021年04月07日 11:16:21   作者:AsiaYe  
這篇文章主要介紹了MySQL infobright的安裝步驟,幫助大家更好的理解和學(xué)習(xí)使用MySQL,感興趣的朋友可以了解下

整個安裝過程過了一遍,感覺跟MySQL的安裝差不太多。步驟如下:

1、使用"rpm -ivh  安裝包"命令來安裝一下rpm的包,如下:

[root@tk01-dba-mysql dba_mysql]# rpm -ivh infobright-4.0.7-0-x86_64-ice.rpm --prefix=/usr/local
Preparing...             ################################# [100%]
Installing infobright 4.0.7-0 (x86_64)
The installer will generate /tmp/ib4.0.7-0-install.log install trace log.
Updating / installing...
  1:infobright-4.0.7-0        ################################# [100%]
Creating/Updating datadir and cachedir
Creating user mysql and group mysql
Installing default databases
Installing MySQL system tables...
OK
Filling help tables...
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 MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/infobright-4.0.7-x86_64/bin/mysqladmin -u root password 'new-password'
/usr/local/infobright-4.0.7-x86_64/bin/mysqladmin -u root -h tk01-dba-mysql-7-197 password 'new-password'

Alternatively you can run:
/usr/local/infobright-4.0.7-x86_64/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 manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/infobright-4.0.7-x86_64 ; /usr/local/infobright-4.0.7-x86_64/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/infobright-4.0.7-x86_64/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/infobright-4.0.7-x86_64/scripts/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/

System Physical memory: 15866(MB)
Infobright optimal ServerMainHeapSize is set to 6000(MB)
Infobright optimal LoaderMainHeapSize is set to 800(MB)
Infobright server installed into folder /usr/local/infobright
Installation log file /tmp/ib4.0.7-0-install.log
--------------------------------------
To activate infobright server, please run ./postconfig.sh script from /usr/local/infobright-4.0.7-x86_64.
Example command: cd /usr/local/infobright-4.0.7-x86_64; ./postconfig.sh

我這里是將文件解壓到了/usr/local/目錄下面,如果有其他目錄,則可以使用其他目錄進行解壓,解壓后的文件如下:

[root@tk01-dba-mysql local]# ll
total 54932
drwxr-xr-x. 2 root   root    20 Oct 11 11:45 bin
drwxr-xr-x  8 root   root   297 Sep 27 09:10 cma_tcollector
drwxr-xr-x. 2 root   root    6 Apr 11 2018 etc
drwxr-xr-x. 2 root   root    6 Apr 11 2018 games
drwxr-xr-x. 2 root   root    6 Apr 11 2018 include
lrwxrwxrwx  1 root   root    34 Oct 15 21:42 infobright -> /usr/local/infobright-4.0.7-x86_64
-rw-r--r--  1 root   root 56249223 Oct 15 21:30 infobright-4.0.7-0-x86_64-ice.rpm
drwxr-xr-x 11 root   root   252 Oct 15 21:42 infobright-4.0.7-x86_64

2、根據(jù)最后一行提示,激活infobright server,運行腳本./postconfig.sh ,如下:

[root@tk01-dba-mysql infobright]# ./postconfig.sh 
Infobright post configuration
--------------------------------------
Infobright server activated.
--------------------------------------
Register your copy of ICE and receive a free copy of the User Manual (a $50 value) as well as a copy of the Bloor Research Spotlight Report "What's Cool About Columns" which explains the differences and benefits of a columnar versus row database.
Registration will require opening an HTTP connection to Infobright, do you wish to register now? [Y/N]: n
Register now http://www.infobright.org/Downloads/ICE/.

第一次運行的時候,會提醒是否注冊,選擇N,不注冊,此時再次運行這個腳本:

[root@tk01-dba-mysql infobright]# ./postconfig.sh 
Infobright post configuration
--------------------------------------
Using postconfig you can: 
--------------------------------------
(1) Move existing data directory to other location,
(2) Move existing cache directory to other location,
(3) Configure server socket,
(4) Configure server port,
(5) Relocate datadir path to an existing data directory.

Please type 'y' for option that you want or press ctrl+c for exit.

Current configuration: 

--------------------------------------
Current config file: [/etc/my-ib.cnf]
Current brighthouse.ini file: [/usr/local/infobright-4.0.7-x86_64/data/brighthouse.ini]
Current datadir: [/usr/local/infobright-4.0.7-x86_64/data]
Current CacheFolder in brighthouse.ini file: [/usr/local/infobright-4.0.7-x86_64/cache]
Current socket: [/tmp/mysql-ib.sock] 
Current port: [5029]
--------------------------------------

(1) Do you want to copy current datadir [/usr/local/infobright-4.0.7-x86_64/data] to a new location? [y/n]:y
Give new datadir path (e.g. /opt/datadirnewpath/data):/data/infobright_5029/data
(2) Option to change CacheFolder is disabled when option 1 is chosen!
(3) Do you want to change current socket [/tmp/mysql-ib.sock]? [y/n]:n
(4) Do you want to change current port [5029]? [y/n]:n
(5) Relocation is disabled when options 1-4 are chosen!

--------------------------------------
Datadir(/usr/local/infobright-4.0.7-x86_64/data) is going to be copied to /data/infobright_5029/data
--------------------------------------

Please confirm to proceed? [y/n]:y
Copying /usr/local/infobright-4.0.7-x86_64/data to /data/infobright_5029/data ...is done.
You can now remove/backup your old /usr/local/infobright-4.0.7-x86_64/data ...
Done!

此時安裝包會提示是否修改相關(guān)的目錄,按照自己的需求去修改,我這里只是簡單的改了下data盤的目錄,其他的選項都選擇的是N,這樣最終有一條提示:

Datadir(/usr/local/infobright-4.0.7-x86_64/data) is going to be copied to /data/infobright_5029/data

   一路yes,就安裝完畢了。

3、查看data文件。此時進入剛才設(shè)定的data目錄,/data/infobright_5029/data里面,查看初始化好的文件。

[root@tk01-dba-mysql data]# ll
total 16
-rw-rw---- 1 mysql mysql  0 Oct 15 21:42 bh.err
-rw-r--r-- 1 mysql mysql 1898 Oct 15 21:42 brighthouse.ini
-rw-r--r-- 1 mysql mysql  8 Oct 15 21:42 ib_data_version
drwxr-xr-x 2 mysql mysql 4096 Oct 15 21:42 mysql
drwxr-xr-x 2 mysql mysql 4096 Oct 15 21:42 sys_infobright
drwxr-xr-x 2 mysql mysql  6 Oct 15 21:42 test

4、啟動服務(wù)。安裝完軟件之后,使用自帶的工具/etc/init.d/mysqld-ib啟動服務(wù),啟動完之后可以查看相關(guān)進程,啟動方法和進程查看方法如下:

[root@tk01-dba-mysql infobright_5029]# /etc/init.d/mysqld-ib start
Starting MySQL. SUCCESS! 
[root@tk01-dba-mysql-7-195 infobright_5029]# ps -ef|grep 5029
root   78369   1 0 10:34 pts/1  00:00:00 sudo -u mysql /usr/local/infobright-4.0.7-x86_64/bin/mysqld_safe --defaults-file=/etc/my-ib.cnf --log-queries-not-using-indexes --user=mysql --pid-file=/data/infobright_5029/data/tk01-dba-mysql-7-195.pid
mysql   78372 78369 0 10:34 pts/1  00:00:00 /bin/sh /usr/local/infobright-4.0.7-x86_64/bin/mysqld_safe --defaults-file=/etc/my-ib.cnf --log-queries-not-using-indexes --user=mysql --pid-file=/data/infobright_5029/data/tk01-dba-mysql-7-195.pid
mysql   78507 78372 0 10:34 pts/1  00:00:00 /usr/local/infobright-4.0.7-x86_64/bin/mysqld --defaults-file=/etc/my-ib.cnf --basedir=/usr/local/infobright-4.0.7-x86_64 --datadir=/data/infobright_5029/data --log-queries-not-using-indexes --log-error=/data/infobright_5029/data/bh.err --pid-file=/data/infobright_5029/data/tk01-dba-mysql-7-195.pid --socket=/tmp/mysql-ib.sock --port=5029
root   78570 68493 0 10:35 pts/1  00:00:00 grep --color=auto 5029
[root@tk01-dba-mysql-7-195 infobright_5029]# 

5、創(chuàng)建root用戶的密碼,這一步和mysql很像,使用/usr/local/infobright/bin/mysqladmin創(chuàng)建密碼,方法如下:

[root@tk01-dba-mysql bin]# ./mysqladmin -uroot password '123456'
Warning: ./mysqladmin: unknown variable 'loose-local-infile=1'

6、連接數(shù)據(jù)庫,連接方法:

[root@tk01-dba-mysql bin]# mysql-ib -uroot -p123456
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.40 build number (revision)=IB_4.0.7_r16961_17249(ice) (static)

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

mysql> show databases;
+--------------------+
| Database      |
+--------------------+
| information_schema |
| BH_RSI_Repository |
| mysql       |
| sys_infobright   |
| test        |
+--------------------+
5 rows in set (0.00 sec)

mysql> show engines;
+-------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine   | Support | Comment                          | Transactions | XA  | Savepoints |
+-------------+---------+-----------------------------------------------------------+--------------+------+------------+
| BRIGHTHOUSE | DEFAULT | Brighthouse storage engine                | YES     | NO  | NO     |
| MRG_MYISAM | YES   | Collection of identical MyISAM tables           | NO      | NO  | NO     |
| CSV     | YES   | CSV storage engine                    | NO      | NO  | NO     |
| MyISAM   | YES   | Default engine as of MySQL 3.23 with great performance  | NO      | NO  | NO     |
| MEMORY   | YES   | Hash based, stored in memory, useful for temporary tables | NO      | NO  | NO     |
+-------------+---------+-----------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)

   如果不設(shè)置進入infobright的用戶名和密碼,則可以直接使用命令mysql-ib進入上述界面??梢钥吹?,默認的存儲引擎是brighthouse。到這里,infobright的安裝過程算是全部完成了。

7、導(dǎo)入數(shù)據(jù)。

    社區(qū)版的目前只能通過load data的方法進行數(shù)據(jù)導(dǎo)入,語法如下:

LOAD DATA [LOW_PRIORITY| CONCURRENT] [LOCAL] INFILE 'file_name.txt'  
[REPLACE | IGNORE]  
INTO TABLE tbl_name  
[FIELDS    
  [TERMINATED BY 'string']    
  [[OPTIONALLY] ENCLOSED BY 'char']    
  [ESCAPED BY 'char' ]  
] 
[LINES    
[STARTING BY 'string']    
[TERMINATED BY 'string']  
]  
[IGNORE number LINES]  [(col_name_or_user_var,...)]  [SET col_name = expr,...)]

其中有很多關(guān)鍵字信息,這里解釋一些重要的:

  • LOW_PRIORITY關(guān)鍵字

   如果load data語句使用了LOW_PRIORITY關(guān)鍵字,則在碰到其他會話操作相同表時,則會延遲執(zhí)行LOAD DATA語句,直到其他會話操作表結(jié)束為止。

  • replace和ignore關(guān)鍵字

 控制對現(xiàn)有的唯一鍵記錄的重復(fù)的處理。如果你指定replace,新行將代替有相同的唯一鍵值的現(xiàn)有行。如果你指定ignore,跳過有唯一鍵的現(xiàn)有行的重復(fù)行的輸入。

  • fields關(guān)鍵字

指定了文件字段的分割格式:

  • terminated by關(guān)鍵字

以什么字符作為分隔符;

  • enclosed by

字段括起字符;

  • lines

指定了每條記錄的分隔符默認為'\n'即為換行符;

   更多信息,請參考官方文檔。

   現(xiàn)在我們生成一個文本,然后寫入數(shù)據(jù):

mysql> use test;
Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| test      |
+----------------+
1 row in set (0.00 sec)

mysql> load data infile '/tmp/a.txt' ignore into table test character set utf8 fields terminated by ' ' lines terminated by '\n';       Query OK, 4 rows affected (0.04 sec)
Records: 4 Deleted: 0 Skipped: 0 Warnings: 0

mysql> system cat /tmp/a.txt
1  aaa
2  bbb
3  ccc
4  ddd

mysql> select * from test;
+------+-------+
| id  | name |
+------+-------+
|  1 |  aaa |
|  2 |  bbb |
|  3 |  ccc |
|  4 |  ddd |
+------+-------+
4 rows in set (0.00 sec)

   最終,所有的數(shù)據(jù)都導(dǎo)入了。大家可以嘗試用這種方法導(dǎo)入大量的數(shù)據(jù),然后對infobright的查詢性能進行評估。

以上就是MySQL infobright的安裝步驟的詳細內(nèi)容,更多關(guān)于MySQL infobright的安裝的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • 如何通過配置自動實現(xiàn)ValueList中hql語句的整型參數(shù)轉(zhuǎn)換

    如何通過配置自動實現(xiàn)ValueList中hql語句的整型參數(shù)轉(zhuǎn)換

    本篇文章是對通過配置自動實現(xiàn)ValueList中hql語句的整型參數(shù)轉(zhuǎn)換進行了詳細的分析介紹,需要的朋友參考下
    2013-06-06
  • MySQL數(shù)據(jù)庫卸載以及刪除所有有關(guān)信息詳細步驟

    MySQL數(shù)據(jù)庫卸載以及刪除所有有關(guān)信息詳細步驟

    在MySQL中數(shù)據(jù)刪除操作不僅僅是簡單地將某一個或多個行刪除,下面這篇文章主要給大家介紹了關(guān)于MySQL數(shù)據(jù)庫卸載以及刪除所有有關(guān)信息的詳細步驟,文中通過圖文介紹的非常詳細,需要的朋友可以參考下
    2023-06-06
  • MySQL主從原理及配置詳解

    MySQL主從原理及配置詳解

    這篇文章主要為大家詳細介紹了MySQL主從原理及配置的相關(guān)資料,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2018-03-03
  • mysql 8.0.17 安裝配置方法圖文教程

    mysql 8.0.17 安裝配置方法圖文教程

    這篇文章主要為大家詳細介紹了mysql 8.0.17 安裝配置方法圖文教程,文中安裝步驟介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2019-08-08
  • MySQL中的時區(qū)設(shè)置方式

    MySQL中的時區(qū)設(shè)置方式

    這篇文章主要介紹了MySQL中的時區(qū)設(shè)置方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2023-11-11
  • MySQL存儲過程的權(quán)限問題小結(jié)

    MySQL存儲過程的權(quán)限問題小結(jié)

    這篇文章主要介紹了MySQL存儲過程的權(quán)限問題小結(jié)及mysql 創(chuàng)建存儲過程權(quán)限問題,感興趣的朋友一起看看吧
    2018-04-04
  • Mysql 設(shè)置boolean類型的操作

    Mysql 設(shè)置boolean類型的操作

    這篇文章主要介紹了Mysql 設(shè)置boolean類型的操作,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2021-06-06
  • MySQL存儲時間類型選擇的問題講解

    MySQL存儲時間類型選擇的問題講解

    今天小編就為大家分享一篇關(guān)于MySQL存儲時間類型選擇的問題講解,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧
    2019-03-03
  • mysql中各種常見join連表查詢實例總結(jié)

    mysql中各種常見join連表查詢實例總結(jié)

    這篇文章主要介紹了mysql中各種常見join連表查詢,結(jié)合實例形式總結(jié)分析了MySQL中join連表查詢的各種常見用法及相關(guān)操作注意事項,需要的朋友可以參考下
    2020-02-02
  • windows下傻瓜式安裝mysql5.7

    windows下傻瓜式安裝mysql5.7

    本文給大家介紹的是簡單幾步輕松搞定Windows上安裝Mysql5.7,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2018-10-10

最新評論

沈丘县| 年辖:市辖区| 子洲县| 延寿县| 武功县| 四川省| 湘潭市| 阿瓦提县| 阳信县| 博罗县| 大英县| 德令哈市| 黄骅市| 长阳| 邳州市| 连南| 望谟县| 荆州市| 六安市| 光泽县| 日照市| 宁河县| 兴仁县| 丰镇市| 衡阳市| 石林| 鄂州市| 福建省| 乡宁县| 鹤山市| 沾化县| 维西| 朝阳市| 广州市| 镇原县| 信阳市| 石泉县| 北京市| 无锡市| 东山县| 比如县|