MySQL infobright installation steps

MySQL infobright installation steps

I went through the entire installation process and felt that it was not much different from the installation of MySQL. Here are the steps:

1. Use the "rpm -ivh installation package" command to install the rpm package, as follows:

[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
It 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

I have unzipped the files to the /usr/local/ directory. If there are other directories, you can use other directories to unzip them. The unzipped files are as follows:

[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. According to the last line of prompts, activate the infobright server and run the script ./postconfig.sh as follows:

[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/.

When you run it for the first time, you will be prompted to register. Select N to not register. Then run the script again:

[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 (eg /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!

At this point, the installation package will prompt whether to modify the relevant directories. Modify them according to your needs. I simply changed the directory of the data disk here, and selected N for other options. In this way, there is a prompt in the end:

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

Click yes all the way and the installation is complete.

3. Check the data file. Now enter the data directory just set, /data/infobright_5029/data, and check the initialized files.

[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. Start the service. After installing the software, use the built-in tool /etc/init.d/mysqld-ib to start the service. After starting, you can view the related processes. The startup method and process viewing method are as follows:

[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. Create a password for the root user. This step is very similar to mysql. Use /usr/local/infobright/bin/mysqladmin to create a password. The method is as follows:

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

6. Connect to the database, connection method:

[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)

If you do not set a username and password to enter infobright, you can directly use the command mysql-ib to enter the above interface. As you can see, the default storage engine is brighthouse. At this point, the installation process of infobright is complete.

7. Import data.

The community version can currently only import data through the load data method. The syntax is as follows:

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,...)]

There are many keywords in it, here are some important ones:

  • LOW_PRIORITY keyword

If the LOAD DATA statement uses the LOW_PRIORITY keyword, if other sessions operate on the same table, the execution of the LOAD DATA statement will be delayed until the other sessions complete the table operations.

  • replace and ignore keywords

Controls the handling of duplicates of existing unique key records. If you specify replace, the new row will replace existing rows with the same unique key value. If you specify ignore, input of duplicate rows for existing rows that have unique keys is skipped.

  • fields keyword

Specifies the file field segmentation format:

  • terminated by keyword

What character is used as the separator?

  • enclosed by

Field enclosing characters;

  • lines

The default separator for each record is '\n', which is a newline character.

For more information, please refer to the official documentation.

Now we generate a text and then write the data:

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)

Finally, all the data was imported. You can try to import a large amount of data using this method and then evaluate the query performance of infobright.

The above is the detailed content of the installation steps of MySQL infobright. For more information about the installation of MySQL infobright, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Infobright, an open source MySQL data warehouse solution
  • Solution to the error message when importing data with special characters in infobright

<<:  You may need a large-screen digital scrolling effect like this

>>:  A brief discussion on JavaScript shallow copy and deep copy

Recommend

How to define data examples in Vue

Preface In the development process, defining vari...

Detailed installation tutorial of mysql 5.7 under CentOS 6 and 7

You always need data for development. As a server...

Solution to forgetting mysql password under linux

The problem is as follows: I entered the command ...

SQL implementation of LeetCode (182. Duplicate mailboxes)

[LeetCode] 182.Duplicate Emails Write a SQL query...

25 fresh useful icon sets for download abroad

1. E-Commerce Icons 2. Icon Sweets 2 3. Mobile Ph...

How to represent various MOUSE shapes

<a href="http://" style="cursor...

How to use default values ​​for variables in SASS

Variables defined in SASS, the value set later wi...

How to use less in WeChat applet (optimal method)

Preface I am used to writing less/sass, but now I...

Learn one minute a day to use Git server to view debug branches and fix them

Debug branch During the normal development of a p...

Table related arrangement and Javascript operation table, tr, td

Table property settings that work well: Copy code ...

Use docker to build kong cluster operation

It is very simple to build a kong cluster under t...