Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@archbang ablive]# pacman -Sy mysql
- :: Synchronizing package databases...
- core is up to date
- extra is up to date
- community is up to date
- :: There are 2 providers available for mysql:
- :: Repository extra
- 1) mariadb
- :: Repository community
- 2) percona-server
- Enter a number (default=1): 1
- resolving dependencies...
- looking for conflicting packages...
- Packages (4) jemalloc-1:5.1.0-1 libmariadbclient-10.1.36-1 mariadb-clients-10.1.36-1 mariadb-10.1.36-1
- Total Download Size: 11.01 MiB
- Total Installed Size: 230.44 MiB
- :: Proceed with installation? [Y/n] y
- :: Retrieving packages...
- mariadb-10.1.36-1-x86_64 11.0 MiB 2.65M/s 00:04 [####################################] 100%
- (4/4) checking keys in keyring [####################################] 100%
- (4/4) checking package integrity [####################################] 100%
- (4/4) loading package files [####################################] 100%
- (4/4) checking for file conflicts [####################################] 100%
- (4/4) checking available disk space [####################################] 100%
- :: Processing package changes...
- (1/4) installing libmariadbclient [####################################] 100%
- (2/4) installing jemalloc [####################################] 100%
- Optional dependencies for jemalloc
- perl: for jeprof [installed]
- (3/4) installing mariadb-clients [####################################] 100%
- (4/4) installing mariadb [####################################] 100%
- :: You need to initialize the MariaDB data directory prior to starting
- the service. This can be done with mysql_install_db command, e.g.:
- mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
- Optional dependencies for mariadb
- galera: for MariaDB cluster with Galera WSREP
- perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission
- :: Running post-transaction hooks...
- (1/4) Reloading system manager configuration...
- (2/4) Creating system user accounts...
- (3/4) Creating temporary files...
- (4/4) Arming ConditionNeedsUpdate...
- [root@archbang ablive]# mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
- Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
- 2018-10-03 22:42:41 140259177123776 [Note] /usr/bin/mysqld (mysqld 10.1.36-MariaDB) starting as process 1321 ...
- 2018-10-03 22:42:41 140259177123776 [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.
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Using mutexes to ref count buffer pool pages
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: The InnoDB memory heap is disabled
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Compressed tables use zlib 1.2.11
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Using Linux native AIO
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Using SSE crc32 instructions
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Initializing buffer pool, size = 128.0M
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Completed initialization of buffer pool
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Highest supported file format is Barracuda.
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: The log sequence number 0 in ibdata file do not match the log sequence number 1600617 in the ib_logfiles!
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: 128 rollback segment(s) are active.
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Waiting for purge to start
- 2018-10-03 22:42:41 140259177123776 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.39-83.1 started; log sequence number 1600617
- 2018-10-03 22:42:41 140259177123776 [Note] Recovering after a crash using mysql-bin
- 2018-10-03 22:42:41 140259177123776 [Note] Starting crash recovery...
- 2018-10-03 22:42:41 140259177123776 [Note] Crash recovery finished.
- 2018-10-03 22:42:41 140258424748800 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
- 2018-10-03 22:42:41 140258642863872 [Note] InnoDB: Dumping buffer pool(s) not yet started
- OK
- Filling help tables...
- 2018-10-03 22:42:44 140547017322432 [Note] /usr/bin/mysqld (mysqld 10.1.36-MariaDB) starting as process 1354 ...
- 2018-10-03 22:42:44 140547017322432 [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.
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Using mutexes to ref count buffer pool pages
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: The InnoDB memory heap is disabled
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Compressed tables use zlib 1.2.11
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Using Linux native AIO
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Using SSE crc32 instructions
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Initializing buffer pool, size = 128.0M
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Completed initialization of buffer pool
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Highest supported file format is Barracuda.
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: 128 rollback segment(s) are active.
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Waiting for purge to start
- 2018-10-03 22:42:44 140547017322432 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.39-83.1 started; log sequence number 1616717
- 2018-10-03 22:42:44 140546483144448 [Note] InnoDB: Dumping buffer pool(s) not yet started
- OK
- Creating OpenGIS required SP-s...
- 2018-10-03 22:42:47 140700812066752 [Note] /usr/bin/mysqld (mysqld 10.1.36-MariaDB) starting as process 1386 ...
- 2018-10-03 22:42:47 140700812066752 [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.
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Using mutexes to ref count buffer pool pages
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: The InnoDB memory heap is disabled
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Compressed tables use zlib 1.2.11
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Using Linux native AIO
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Using SSE crc32 instructions
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Initializing buffer pool, size = 128.0M
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Completed initialization of buffer pool
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Highest supported file format is Barracuda.
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: 128 rollback segment(s) are active.
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Waiting for purge to start
- 2018-10-03 22:42:47 140700812066752 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.39-83.1 started; log sequence number 1616727
- 2018-10-03 22:42:47 140700277888768 [Note] InnoDB: Dumping buffer pool(s) not yet started
- 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:
- '/usr/bin/mysqladmin' -u root password 'new-password'
- '/usr/bin/mysqladmin' -u root -h archbang password 'new-password'
- Alternatively you can run:
- '/usr/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 http://mariadb.com/kb or the
- MySQL manual for more instructions.
- You can start the MariaDB daemon with:
- cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
- You can test the MariaDB daemon with mysql-test-run.pl
- cd '/usr/mysql-test' ; perl mysql-test-run.pl
- Please report any problems at http://mariadb.org/jira
- The latest information about MariaDB is available at http://mariadb.org/.
- You can find additional information about the MySQL part at:
- http://dev.mysql.com
- Consider joining MariaDB's strong and vibrant community:
- https://mariadb.org/get-involved/
- [root@archbang ablive]# systemctl start mariadb
- [root@archbang ablive]# mysql_secure_installation
- NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
- SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
- In order to log into MariaDB to secure it, we'll need the current
- password for the root user. If you've just installed MariaDB, and
- you haven't set the root password yet, the password will be blank,
- so you should just press enter here.
- Enter current password for root (enter for none):
- OK, successfully used password, moving on...
- Setting the root password ensures that nobody can log into the MariaDB
- root user without the proper authorisation.
- Set root password? [Y/n] y
- New password:
- Re-enter new password:
- Password updated successfully!
- Reloading privilege tables..
- ... Success!
- By default, a MariaDB installation has an anonymous user, allowing anyone
- to log into MariaDB without having to have a user account created for
- them. This is intended only for testing, and to make the installation
- go a bit smoother. You should remove them before moving into a
- production environment.
- Remove anonymous users? [Y/n] n
- ... skipping.
- Normally, root should only be allowed to connect from 'localhost'. This
- ensures that someone cannot guess at the root password from the network.
- Disallow root login remotely? [Y/n] n
- ... skipping.
- By default, MariaDB comes with a database named 'test' that anyone can
- access. This is also intended only for testing, and should be removed
- before moving into a production environment.
- Remove test database and access to it? [Y/n] n
- ... skipping.
- Reloading the privilege tables will ensure that all changes made so far
- will take effect immediately.
- Reload privilege tables now? [Y/n] n
- ... skipping.
- Cleaning up...
- All done! If you've completed all of the above steps, your MariaDB
- installation should now be secure.
- Thanks for using MariaDB!
- [root@archbang ablive]# mysql -u root -p
- Enter password:
- Welcome to the MariaDB monitor. Commands end with ; or \g.
- Your MariaDB connection id is 8
- Server version: 10.1.36-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.00 sec)
- MariaDB [(none)]> use information_schema
- Database changed
- MariaDB [information_schema]> show tables;
- +---------------------------------------+
- | Tables_in_information_schema |
- +---------------------------------------+
- | ALL_PLUGINS |
- | APPLICABLE_ROLES |
- | CHARACTER_SETS |
- | COLLATIONS |
- | COLLATION_CHARACTER_SET_APPLICABILITY |
- | COLUMNS |
- | COLUMN_PRIVILEGES |
- | ENABLED_ROLES |
- | ENGINES |
- | EVENTS |
- | FILES |
- | GLOBAL_STATUS |
- | GLOBAL_VARIABLES |
- | KEY_CACHES |
- | KEY_COLUMN_USAGE |
- | PARAMETERS |
- | PARTITIONS |
- | PLUGINS |
- | PROCESSLIST |
- | PROFILING |
- | REFERENTIAL_CONSTRAINTS |
- | ROUTINES |
- | SCHEMATA |
- | SCHEMA_PRIVILEGES |
- | SESSION_STATUS |
- | SESSION_VARIABLES |
- | STATISTICS |
- | SYSTEM_VARIABLES |
- | TABLES |
- | TABLESPACES |
- | TABLE_CONSTRAINTS |
- | TABLE_PRIVILEGES |
- | TRIGGERS |
- | USER_PRIVILEGES |
- | VIEWS |
- | GEOMETRY_COLUMNS |
- | SPATIAL_REF_SYS |
- | CLIENT_STATISTICS |
- | INDEX_STATISTICS |
- | INNODB_SYS_DATAFILES |
- | TABLE_STATISTICS |
- | INNODB_SYS_TABLESTATS |
- | USER_STATISTICS |
- | INNODB_SYS_INDEXES |
- | XTRADB_RSEG |
- | INNODB_CMP_PER_INDEX |
- | INNODB_TRX |
- | CHANGED_PAGE_BITMAPS |
- | INNODB_FT_BEING_DELETED |
- | INNODB_LOCK_WAITS |
- | INNODB_LOCKS |
- | INNODB_TABLESPACES_ENCRYPTION |
- | XTRADB_INTERNAL_HASH_TABLES |
- | INNODB_SYS_FIELDS |
- | INNODB_CMPMEM_RESET |
- | INNODB_CMP |
- | INNODB_FT_INDEX_TABLE |
- | INNODB_SYS_TABLESPACES |
- | INNODB_MUTEXES |
- | INNODB_BUFFER_PAGE_LRU |
- | INNODB_SYS_FOREIGN_COLS |
- | INNODB_CMP_RESET |
- | INNODB_BUFFER_POOL_STATS |
- | INNODB_FT_INDEX_CACHE |
- | INNODB_SYS_FOREIGN |
- | INNODB_METRICS |
- | INNODB_FT_DEFAULT_STOPWORD |
- | INNODB_CMPMEM |
- | INNODB_SYS_TABLES |
- | INNODB_SYS_COLUMNS |
- | INNODB_FT_CONFIG |
- | INNODB_BUFFER_PAGE |
- | INNODB_CMP_PER_INDEX_RESET |
- | XTRADB_READ_VIEW |
- | INNODB_SYS_SEMAPHORE_WAITS |
- | INNODB_CHANGED_PAGES |
- | INNODB_FT_DELETED |
- | INNODB_TABLESPACES_SCRUBBING |
- +---------------------------------------+
- 78 rows in set (0.00 sec)
- MariaDB [information_schema]> select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME="SCHEMATA";
- +---------------+--------------------+------------+----------------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+-----------------+--------------+------------+-------+------------+----------------+
- | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT |
- +---------------+--------------------+------------+----------------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+-----------------+--------------+------------+-------+------------+----------------+
- | def | information_schema | SCHEMATA | CATALOG_NAME | 1 | | NO | varchar | 512 | 1536 | NULL | NULL | NULL | utf8 | utf8_general_ci | varchar(512) | | | select | |
- | def | information_schema | SCHEMATA | SCHEMA_NAME | 2 | | NO | varchar | 64 | 192 | NULL | NULL | NULL | utf8 | utf8_general_ci | varchar(64) | | | select | |
- | def | information_schema | SCHEMATA | DEFAULT_CHARACTER_SET_NAME | 3 | | NO | varchar | 32 | 96 | NULL | NULL | NULL | utf8 | utf8_general_ci | varchar(32) | | | select | |
- | def | information_schema | SCHEMATA | DEFAULT_COLLATION_NAME | 4 | | NO | varchar | 32 | 96 | NULL | NULL | NULL | utf8 | utf8_general_ci | varchar(32) | | | select | |
- | def | information_schema | SCHEMATA | SQL_PATH | 5 | NULL | YES | varchar | 512 | 1536 | NULL | NULL | NULL | utf8 | utf8_general_ci | varchar(512) | | | select | |
- +---------------+--------------------+------------+----------------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+-----------------+--------------+------------+-------+------------+----------------+
- 5 rows in set (0.00 sec)
- MariaDB [information_schema]> exit
- Bye
- [root@archbang ablive]#
- By SV
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement