In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to install MySQL Inception For Linux", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install MySQL Inception For Linux" this article.
The installation process is as follows:
1. Download: https://github.com/mysql-inception/inception chooses to download inception-master.zip and upload it to the server / root directory
two。 Extract and install:
# unzip inception-master.zip
# cd inception-master
# yum-y install cmake bison ncurses-devel gcc gcc-c++ openssl-devel
# mkdir / data
# mkdir-P / usr/local/inception-- here is the directory where Inception is installed. You can make your own decision according to your own situation.
# mkdir-P / data/inception-- here is the Inception data directory created. You can also make your own decision according to your own situation.
# unzip master
# cd inception-master/
# cmake.
# cmake-DWITH_DEBUG=OFF-DCMAKE_INSTALL_PREFIX=/usr/local/inception-DMYSQL_DATADIR=/data/inception-install the specified installation directory and data directory
# make & & make install
An error will be reported during compilation:
Make [2]: * [sql/CMakeFiles/sql.dir/sql_yacc.cc.o] Error 1
Make [1]: * [sql/CMakeFiles/sql.dir/all] Error 2
Make: * [all] Error 2
Solution:
After inspection, it is found that the version of bison installed is 2.1, which is lower, while the version recommended in the manual is before 2.6, and version 2.5.1 is recommended.
Go to http://ftp.gnu.org/gnu/bison/ to download bison-2.5.1.tar.gz
Compile and install after decompression, and the path after installation is / usr/local/bin/bison
After confirming that the version is 2.5.1, enter the inception-master directory again, delete CMakeCache.txt and recompile:
# cd inception-master/
# rm CMakeCache.txt
# cmake.
# cmake-DWITH_DEBUG=OFF-DCMAKE_INSTALL_PREFIX=/usr/local/inception-DMYSQL_DATADIR=/data/inception
# make
# make install
I didn't make a mistake this time, after make install
Edit the / etc/inc.cnf file and add the following:
# vim / etc/inc.cnf
[inception]
General_log=1
General_log_file=/usr/local/inception/data/inception.log
Port=6669
Socket=/data/workspace/inception_data/inc.socket
Character-set-client-handshake=0
Character-set-server=utf8
Inception_remote_system_password=123456
Inception_remote_system_user=root
Inception_remote_backup_port=3306
Inception_remote_backup_host=127.0.0.1
Inception_support_charset=utf8mb4
Inception_enable_nullable=0
Inception_check_primary_key=1
Inception_check_column_comment=1
Inception_check_table_comment=1
Inception_osc_min_table_size=1
Inception_osc_bin_dir=/data/temp
Inception_osc_chunk_time=0.1
Inception_ddl_support=1
Inception_enable_blob_type=1
Inception_check_column_default_value=1
3. Start inception (execute in the background)
[root@test1] # nohup / usr/local/inception/bin/Inception-- defaults-file=/etc/inc.cnf &
The following output from nohup indicates that the startup is successful:
[root@test1 ~] # cat nohup.out
2017-03-16 15:48:14 0 [Note] Welcome to use Inception2.1.50
2017-03-16 15:48:14 46451 [Note] Server hostname (bind-address):'*'; port: 6669
2017-03-16 15:48:14 46451 [Note] IPv6 is available.
2017-03-16 15:48:14 46451 [Note] -:: 'resolves to'::'
2017-03-16 15:48:14 46451 [Note] Server socket created on IP:':'
4. Log in to inception to test:
[root@test1] # mysql-uroot-h227.0.0.1-P6669
Welcome to the MariaDB monitor. Commands end with; or\ g.
Your MySQL connection id is 1
Server version: Inception2.1.50 1
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
MySQL [(none)] >
MySQL [(none)] >
MySQL [(none)] >
MySQL [(none)] > inception get variables
+-+
| | Variable_name | Value |
+-+
| | autocommit | OFF |
| | bind_address | * | |
| | character_set_system | utf8 |
| | character_sets_dir | / usr/local/inception/bin/share/charsets/ |
| | connect_timeout | 10 | |
| | date_format |% Y-%m-%d |
| | datetime_format |% Y-%m-%d% H:%i:%s |
| | general_log | ON |
| | general_log_file | / usr/local/inception/data/inception.log |
| | inception_check_autoincrement_datatype | ON |
| | inception_check_autoincrement_init_value | ON |
| | inception_check_autoincrement_name | ON |
| | inception_check_column_comment | ON |
| | inception_check_column_default_value | ON |
| | inception_check_dml_limit | ON |
| | inception_check_dml_orderby | ON |
| | inception_check_dml_where | ON |
| | inception_check_identifier | ON |
| | inception_check_index_prefix | ON |
| | inception_check_insert_field | ON |
| | inception_check_primary_key | ON |
| | inception_check_table_comment | ON |
| | inception_check_timestamp_default | ON |
| | inception_ddl_support | ON |
| | inception_enable_autoincrement_unsigned | ON |
| | inception_enable_blob_type | ON |
| | inception_enable_column_charset | OFF |
| | inception_enable_enum_set_bit | OFF |
| | inception_enable_foreign_key | OFF |
| | inception_enable_identifer_keyword | OFF |
| | inception_enable_not_innodb | OFF |
| | inception_enable_nullable | OFF |
| | inception_enable_orderby_rand | OFF |
| | inception_enable_partition_table | OFF |
| | inception_enable_pk_columns_only_int | OFF |
| | inception_enable_select_star | OFF |
| | inception_enable_sql_statistic | ON |
| | inception_max_char_length | 16 | |
| | inception_max_key_parts | 5 | |
| | inception_max_keys | 16 | |
| | inception_max_primary_key_parts | 5 | |
| | inception_max_update_rows | 10000 | |
| | inception_merge_alter_table | ON |
| | inception_osc_alter_foreign_keys_method | none |
| | inception_osc_bin_dir | / data/temp |
| | inception_osc_check_alter | ON |
| | inception_osc_check_interval | 5.000000 | |
| | inception_osc_check_replication_filters | ON |
| | inception_osc_chunk_size | 1000 | |
| | inception_osc_chunk_size_limit | 4.000000 | |
| | inception_osc_chunk_time | 0.100000 | |
| | inception_osc_critical_thread_connected | 1000 | |
| | inception_osc_critical_thread_running | 80 | |
| | inception_osc_drop_new_table | ON |
| | inception_osc_drop_old_table | ON |
| | inception_osc_max_lag | 3.000000 | |
| | inception_osc_max_thread_connected | 1000 | |
| | inception_osc_max_thread_running | 80 | |
| | inception_osc_min_table_size | 1 | |
| | inception_osc_on | ON |
| | inception_osc_print_none | ON |
| | inception_osc_print_sql | ON |
| | inception_osc_recursion_method | processlist |
| | inception_password |
| | inception_read_only | OFF |
| | inception_remote_backup_host | 127.0.0.1 | |
| | inception_remote_backup_port | 3306 | |
| | inception_remote_system_password | * 4086D17D857F0000F04C5A0000000000210A0078 |
| | inception_remote_system_user | root |
| | inception_support_charset | utf8mb4 |
| | inception_user |
| | interactive_timeout | 28800 | |
| | max_allowed_packet | 1073741824 | |
| | max_connect_errors | 100 | |
| | max_connections | 151 | |
| | net_buffer_length | 16384 | |
| | net_read_timeout | 30 | |
| | net_write_timeout | 60 | |
| | port | 6669 | |
| | query_alloc_block_size | 8192 | |
| | query_prealloc_size | 8192 | |
| | socket | / data/workspace/inception_data/inc.socket |
| | thread_handling | one-thread-per-connection |
| | thread_stack | 262144 | |
| | time_format |% H:%i:%s |
| | version | Inception2.1.50 |
| | version_comment | Source distribution |
| | version_compile_machine | x86room64 | |
| | version_compile_os | Linux |
| | wait_timeout | 28800 | |
+-+
90 rows in set (0.00 sec)
Output all the variables, indicating that Inception started successfully.
Attachment: (explanation of parameters of variables):
[inception]
General_log=1 # is the parameter of the native MySQL, which is used to record which statements have been executed on the Inception service, to locate some problems, and so on.
General_log_file=/usr/local/inception/data/inception.log # sets the file path written by general log
Service port of port=6669 # Inception
Socket file location of socket=/data/inception/inc.socket # Inception
Character-set-server=utf8 # mysql native parameters
# Inception Audit rules
Inception_check_autoincrement_datatype=1 # when creating a table, the type of self-incrementing column is not int or bigint Times error
Inception_check_autoincrement_init_value=1 # an error is reported if the value of the self-incrementing column is not specified as 1 when the table is created
Inception_check_autoincrement_name=1 # when creating a table, if the name of the specified self-incrementing column is not ID, an error will be reported, which is meaningful. Give a hint.
When inception_check_column_comment=1 # created the table, there was no comment in the column.
Inception_check_column_default_value=0 # check whether the new column properties should have default values when creating tables, modifying columns, and adding new columns
Does inception_check_dml_limit=1 # report an error when it uses LIMIT in the DML statement
Does inception_check_dml_orderby=1 # report an error when it uses Order By in the DML statement
Does inception_check_dml_where=1 # report an error when there is no WHERE condition in the DML statement?
Inception_check_identifier=1 # turns on and off Inception's checking of various names in SQL statements. If set to ON, if characters other than numbers, letters, or underscores are found in the name, it will report Identifier "invalidname" is invalid, valid options: [Identifier ZMague 0-9 invalidname _].
Does inception_check_index_prefix=1 # check that the index name is prefixed with "idx_" and that the unique index prefix is "uniq_"
Does inception_check_insert_field=1 # check the existence of column linked lists in insert statements?
Inception_check_primary_key=1 # when creating a table, if there is no primary key, an error will be reported
When inception_check_table_comment=1 # created the table, there was no comment on the table.
Inception_check_timestamp_default=0 # error is reported if no default value is specified for the timestamp type when creating the table
Does inception_enable_autoincrement_unsigned=1 # self-increment column want to be unsigned?
Inception_enable_blob_type=0 # checks whether BLOB fields are supported, including creating tables, modifying columns, and adding columns. Default is enabled.
Inception_enable_column_charset=0 # allows columns to set their own character sets
Does inception_enable_enum_set_bit=0 # support enum,set,bit data types?
Does inception_enable_foreign_key=0 # support foreign keys?
Inception_enable_identifer_keyword=0 # checks to see if there is an identifier written as a MySQL keyword in the SQL statement. The default value is alarm.
The storage engine specified in inception_enable_not_innodb=0 # table creation is not Innodb and does not report errors.
Inception_enable_nullable=0 # does not report an error if it is listed as NULL when creating or adding a column
Is there an error in inception_enable_orderby_rand=0 # orderby rand?
Does inception_enable_partition_table=0 # support partitioned tables?
Do you have to report an error when inception_enable_select_star=0 # Select*
Whether the inception_enable_sql_statistic=1 # setting supports statistics on the proportion of various statements executed by Inception. If this parameter is enabled, the statistics of this operation will be stored in the statistic table of the inception library in the backup database instance. Each operation corresponds to a record. The information contained in this record is the number of statements executed of various types.
Inception_max_char_length=16 # when the length of the char type is greater than this value, you are prompted to convert it to VARCHAR
Inception_max_key_parts=5 # the maximum number of columns in an index. If you exceed this number, an error will be reported.
Inception_max_keys=16 # the maximum number of indexes in a table. If you exceed this number, an error will be reported
Inception_max_update_rows=10000 # in a modification statement, the maximum number of rows expected to be affected is greater than this number, an error is reported
Inception_merge_alter_table=1 # appears in multiple statements that change the same table, reporting an error and prompting to synthesize one
# inception supports OSC parameters
Inception_osc_bin_dir=/data/temp # is used to specify the location of the pt-online-schema-change script, which cannot be modified, and is set in the configuration file
Inception_osc_check_interval=5 # corresponds to the OSC parameter-check-interval, which means Sleep time between checks for-- max-lag.
Inception_osc_chunk_size=1000 # corresponds to OSC parameter-chunk-size
Inception_osc_chunk_size_limit=4 # corresponds to OSC parameter-chunk-size-limit
Inception_osc_chunk_time=0.1 # corresponds to OSC parameter-chunk-time
Inception_osc_critical_thread_connected=1000 # corresponding parameter-- thread_connected part of critical-load
Inception_osc_critical_thread_running=80 # corresponding parameter-- thread_running part of critical-load
Inception_osc_drop_new_table=1 # corresponding parameter-- [no] drop-new-table
Inception_osc_drop_old_table=1 # corresponding parameter-- [no] drop-old-table
Inception_osc_max_lag=3 # corresponding parameter-max-lag
Inception_osc_max_thread_connected=1000 # corresponding parameter-- thread_connected part of max-load
Inception_osc_max_thread_running=80 # corresponding parameter-- thread_running part of max-load
The parameter inception_osc_min_table_size=1 # is actually a switch for OSC. If set to 0, all ALTER statements go OSC. If set to non-0, the OSC mode is used when the space occupied by the table is greater than this value. In M, the size of this table is calculated by the statement "select (DATA_LENGTH + INDEX_LENGTH) / 1024 INDEX_LENGTH 1024 from information_schema.tables where table_schema = 'dbname' and table_name =' tablename'"
Inception_osc_on=1 # A global OSC switch, which is on by default and set to OFF if you want to turn it off, so it can be modified directly.
Inception_osc_print_none=1 # is used to set the returned result set in Inception. If the standard output information of the original OSC is printed to the corresponding error information column of the result set, if it is set to 1, it will not be printed. If set to 0, it will be printed. If there is an error, it will be printed.
Inception_osc_print_sql=1 # corresponding parameter-print
# inception_user # after the user name is configured, user can not be specified in the option of connecting to Inception, so that the user name and password of the online database can not be exposed and can be used as a way for temporary use, but this user can only be used for auditing, that is, it cannot be executed even if-enable-execute is specified in the option. This is an account that can only be used for audit.
# inception_password # is a pair of the above parameter, which corresponds to the password in the option. After setting this parameter, you can not specify password in the option.
Inception_read_only=0 # sets whether the current Inception server is read-only. This is to prevent some people from mistakenly modifying some data through Inception when they have an account with permission to modify. If inception_read_only is set to ON, then even if enable-execute is turned on and has the permission to execute, it will not be executed. When the audit is completed, it will be returned.
# backup server information
Inception_remote_system_password=123456
Inception_remote_system_user=root
Inception_remote_backup_port=3306
Inception_remote_backup_host=192.168.1.54
Inception_support_charset=utf8 # indicates the character set supported when building a table or database. If more than one is needed, it is separated by a comma. The scope of influence is to create a table, set a session character set, modify the attributes of a table character set, etc.
The above is all the contents of the article "how to install MySQL Inception For Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.