[MariaDB]: Galera Cluster installation
You can download MariaDB Galera Linux package from the link https://downloads.mariadb.org/mariadb-galera/10.0.20/#os_group=linux_generic
[ root @ maria-galera : /mariadb ] ll -lhtr
total 142M
-rw-r–r– 1 root root 142M Aug 11 08:18 mariadb-galera-10.0.20-linux-x86_64.tar.gz
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ] tar -zxvf mariadb-galera-10.0.20-linux-x86_64.tar.gz
mariadb-galera-10.0.20-linux-x86_64/
mariadb-galera-10.0.20-linux-x86_64/README
mariadb-galera-10.0.20-linux-x86_64/CREDITS
mariadb-galera-10.0.20-linux-x86_64/COPYING
mariadb-galera-10.0.20-linux-x86_64/man/man1/mysql_client_test_embedded.1
mariadb-galera-10.0.20-linux-x86_64/man/man8/
mariadb-galera-10.0.20-linux-x86_64/man/man8/mysqld.8
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ] ll -lhtr
total 142M
drwxrwxr-x 12 1021 1004 4.0K Jun 26 11:39 mariadb-galera-10.0.20-linux-x86_64
-rw-r–r– 1 root root 142M Aug 11 08:18 mariadb-galera-10.0.20-linux-x86_64.tar.gz
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ] cd mariadb-galera-10.0.20-linux-x86_64
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] ll -lhtr
total 228K
-rw-r–r– 1 1021 1004 20K Jun 24 23:31 README-wsrep
-rw-r–r– 1 1021 1004 91K Jun 24 23:31 README
-rw-r–r– 1 1021 1004 8.5K Jun 24 23:31 INSTALL-BINARY
-rw-r–r– 1 1021 1004 8.1K Jun 24 23:31 EXCEPTIONS-CLIENT
-rw-r–r– 1 1021 1004 1.6K Jun 24 23:31 CREDITS
-rw-r–r– 1 1021 1004 26K Jun 24 23:31 COPYING.LESSER
-rw-r–r– 1 1021 1004 18K Jun 24 23:31 COPYING
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 include
drwxrwxr-x 28 1021 1004 4.0K Jun 26 11:39 share
drwxrwxr-x 11 1021 1004 4.0K Jun 26 11:39 mysql-test
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 support-files
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 sql-bench
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 scripts
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 data
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 man
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 lib
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 bin
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ] ll -lhtr
total 142M
drwxrwxr-x 12 1021 1004 4.0K Jun 26 11:39 mariadb-galera-10.0.20-linux-x86_64
-rw-r–r– 1 root root 142M Aug 11 08:18 mariadb-galera-10.0.20-linux-x86_64.tar.gz
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ] ln -s mariadb-galera-10.0.20-linux-x86_64 mysql
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ] ll -lhtr
total 142M
drwxrwxr-x 12 1021 1004 4.0K Jun 26 11:39 mariadb-galera-10.0.20-linux-x86_64
-rw-r–r– 1 root root 142M Aug 11 08:18 mariadb-galera-10.0.20-linux-x86_64.tar.gz
lrwxrwxrwx 1 root root 35 Aug 11 08:31 mysql -> mariadb-galera-10.0.20-linux-x86_64
[ root @ maria-galera : /mariadb ]
[ root @ maria-galera : /mariadb ]
root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] ll -lhrt
total 228K
-rw-r–r– 1 1021 1004 20K Jun 24 23:31 README-wsrep
-rw-r–r– 1 1021 1004 91K Jun 24 23:31 README
-rw-r–r– 1 1021 1004 8.5K Jun 24 23:31 INSTALL-BINARY
-rw-r–r– 1 1021 1004 8.1K Jun 24 23:31 EXCEPTIONS-CLIENT
-rw-r–r– 1 1021 1004 1.6K Jun 24 23:31 CREDITS
-rw-r–r– 1 1021 1004 26K Jun 24 23:31 COPYING.LESSER
-rw-r–r– 1 1021 1004 18K Jun 24 23:31 COPYING
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 include
drwxrwxr-x 28 1021 1004 4.0K Jun 26 11:39 share
drwxrwxr-x 11 1021 1004 4.0K Jun 26 11:39 mysql-test
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 support-files
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 sql-bench
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 scripts
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 data
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 man
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 lib
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 bin
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] ./scripts/mysql_install_db –user=mysql
Installing MariaDB/MySQL system tables in ‘./data’ …
150811 8:37:39 [Note] ./bin/mysqld (mysqld 10.0.20-MariaDB-wsrep) starting as process 30581 …
150811 8:37:39 [Note] WSREP: Read nil XID from storage engines, skipping position init
150811 8:37:39 [Note] WSREP: wsrep_load(): loading provider library ‘none’
150811 8:37:39 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150811 8:37:39 [Note] InnoDB: The InnoDB memory heap is disabled
150811 8:37:39 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150811 8:37:39 [Note] InnoDB: Memory barrier is not used
150811 8:37:39 [Note] InnoDB: Compressed tables use zlib 1.2.3
150811 8:37:39 [Note] InnoDB: Using Linux native AIO
150811 8:37:39 [Note] InnoDB: Using CPU crc32 instructions
150811 8:37:39 [Note] InnoDB: Initializing buffer pool, size = 128.0M
150811 8:37:39 [Note] InnoDB: Completed initialization of buffer pool
150811 8:37:39 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
150811 8:37:39 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
150811 8:37:39 [Note] InnoDB: Database physically writes the file full: wait…
150811 8:37:39 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
150811 8:37:40 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
150811 8:37:40 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
150811 8:37:40 [Warning] InnoDB: New log files created, LSN=45781
150811 8:37:40 [Note] InnoDB: Doublewrite buffer not found: creating new
150811 8:37:40 [Note] InnoDB: Doublewrite buffer created
150811 8:37:40 [Note] InnoDB: 128 rollback segment(s) are active.
150811 8:37:40 [Warning] InnoDB: Creating foreign key constraint system tables.
150811 8:37:40 [Note] InnoDB: Foreign key constraint system tables created
150811 8:37:40 [Note] InnoDB: Creating tablespace and datafile system tables.
150811 8:37:40 [Note] InnoDB: Tablespace and datafile system tables created.
150811 8:37:40 [Note] InnoDB: Waiting for purge to start
150811 8:37:40 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.24-72.2 started; log sequence number 0
150811 8:37:41 [Note] WSREP: Service disconnected.
150811 8:37:42 [Note] WSREP: Some threads may fail to exit.
150811 8:37:42 [Note] InnoDB: FTS optimize thread exiting.
150811 8:37:42 [Note] InnoDB: Starting shutdown…
150811 8:37:43 [Note] InnoDB: Shutdown completed; log sequence number 1616697
OK
Filling help tables…
150811 8:37:43 [Note] ./bin/mysqld (mysqld 10.0.20-MariaDB-wsrep) starting as process 30622 …
150811 8:37:43 [Note] WSREP: Read nil XID from storage engines, skipping position init
150811 8:37:43 [Note] WSREP: wsrep_load(): loading provider library ‘none’
150811 8:37:43 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150811 8:37:43 [Note] InnoDB: The InnoDB memory heap is disabled
150811 8:37:43 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150811 8:37:43 [Note] InnoDB: Memory barrier is not used
150811 8:37:43 [Note] InnoDB: Compressed tables use zlib 1.2.3
150811 8:37:43 [Note] InnoDB: Using Linux native AIO
150811 8:37:43 [Note] InnoDB: Using CPU crc32 instructions
150811 8:37:43 [Note] InnoDB: Initializing buffer pool, size = 128.0M
150811 8:37:43 [Note] InnoDB: Completed initialization of buffer pool
150811 8:37:43 [Note] InnoDB: Highest supported file format is Barracuda.
150811 8:37:43 [Note] InnoDB: 128 rollback segment(s) are active.
150811 8:37:43 [Note] InnoDB: Waiting for purge to start
150811 8:37:43 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.24-72.2 started; log sequence number 1616697
150811 8:37:44 [Note] WSREP: Service disconnected.
150811 8:37:45 [Note] WSREP: Some threads may fail to exit.
150811 8:37:45 [Note] InnoDB: FTS optimize thread exiting.
150811 8:37:45 [Note] InnoDB: Starting shutdown…
150811 8:37:47 [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 maria-galera 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 http://mariadb.com/kb 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 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
Support MariaDB development by buying support/new features from MariaDB
Corporation Ab. You can contact us about this at sales@mariadb.com.
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] ll -lhtr
total 228K
-rw-r–r– 1 1021 1004 20K Jun 24 23:31 README-wsrep
-rw-r–r– 1 1021 1004 91K Jun 24 23:31 README
-rw-r–r– 1 1021 1004 8.5K Jun 24 23:31 INSTALL-BINARY
-rw-r–r– 1 1021 1004 8.1K Jun 24 23:31 EXCEPTIONS-CLIENT
-rw-r–r– 1 1021 1004 1.6K Jun 24 23:31 CREDITS
-rw-r–r– 1 1021 1004 26K Jun 24 23:31 COPYING.LESSER
-rw-r–r– 1 1021 1004 18K Jun 24 23:31 COPYING
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 include
drwxrwxr-x 28 1021 1004 4.0K Jun 26 11:39 share
drwxrwxr-x 11 1021 1004 4.0K Jun 26 11:39 mysql-test
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 support-files
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 sql-bench
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 scripts
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 man
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 lib
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 bin
drwxrwxr-x 5 mysql 1004 4.0K Aug 11 08:37 data
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] cd data/
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/data ] ll -lhtr
total 109M
drwxrwxr-x 2 mysql 1004 4.0K Jun 26 11:39 test
-rw-rw—- 1 mysql mysql 48M Aug 11 08:37 ib_logfile1
drwx—— 2 mysql root 4.0K Aug 11 08:37 mysql
drwx—— 2 mysql mysql 4.0K Aug 11 08:37 performance_schema
-rw-rw—- 1 mysql mysql 52 Aug 11 08:37 aria_log_control
-rw-rw—- 1 mysql mysql 16K Aug 11 08:37 aria_log.00000001
-rw-rw—- 1 mysql mysql 48M Aug 11 08:37 ib_logfile0
-rw-rw—- 1 mysql mysql 12M Aug 11 08:37 ibdata1
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/data ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] ll -lhtr
total 228K
-rw-r–r– 1 1021 1004 20K Jun 24 23:31 README-wsrep
-rw-r–r– 1 1021 1004 91K Jun 24 23:31 README
-rw-r–r– 1 1021 1004 8.5K Jun 24 23:31 INSTALL-BINARY
-rw-r–r– 1 1021 1004 8.1K Jun 24 23:31 EXCEPTIONS-CLIENT
-rw-r–r– 1 1021 1004 1.6K Jun 24 23:31 CREDITS
-rw-r–r– 1 1021 1004 26K Jun 24 23:31 COPYING.LESSER
-rw-r–r– 1 1021 1004 18K Jun 24 23:31 COPYING
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 include
drwxrwxr-x 28 1021 1004 4.0K Jun 26 11:39 share
drwxrwxr-x 11 1021 1004 4.0K Jun 26 11:39 mysql-test
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 support-files
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 sql-bench
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 scripts
drwxrwxr-x 4 1021 1004 4.0K Jun 26 11:39 man
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 lib
drwxrwxr-x 2 1021 1004 4.0K Jun 26 11:39 bin
drwxrwxr-x 5 mysql 1004 4.0K Aug 11 08:37 data
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] ./bin/mysqld_safe –user=mysql &
[1] 30875
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] 150811 08:39:16 mysqld_safe Logging to ‘/mariadb/mariadb-galera-10.0.20-linux-x86_64/data/maria-galera.err’.
150811 08:39:17 mysqld_safe Starting mysqld daemon with databases from /mariadb/mariadb-galera-10.0.20-linux-x86_64/data
150811 08:39:17 mysqld_safe WSREP: Running position recovery with –log_error=’/mariadb/mariadb-galera-10.0.20-linux-x86_64/data/wsrep_recovery.9Z6O0O’ –pid-file=’/mariadb/mariadb-galera-10.0.20-linux-x86_64/data/maria-galera-recover.pid’
150811 08:39:19 mysqld_safe WSREP: Recovered position 00000000-0000-0000-0000-000000000000:-1
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] ps -ef | grep mysql
root 30875 21298 0 08:39 pts/2 00:00:00 /bin/sh ./bin/mysqld_safe –user=mysql
mysql 30986 30875 0 08:39 pts/2 00:00:00 /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin/mysqld –basedir=/mariadb/mariadb-galera-10.0.20-linux-x86_64 –datadir=/mariadb/mariadb-galera-10.0.20-linux-x86_64/data –plugin-dir=/mariadb/mariadb-galera-10.0.20-linux-x86_64/lib/plugin –user=mysql –log-error=/mariadb/mariadb-galera-10.0.20-linux-x86_64/data/maria-galera.err –pid-file=maria-galera.pid –wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
root 31080 21298 0 08:39 pts/2 00:00:00 grep mysql
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] cat /mariadb/mariadb-galera-10.0.20-linux-x86_64/data/maria-galera.err
150811 08:39:17 mysqld_safe Starting mysqld daemon with databases from /mariadb/mariadb-galera-10.0.20-linux-x86_64/data
150811 08:39:17 mysqld_safe WSREP: Running position recovery with –log_error=’/mariadb/mariadb-galera-10.0.20-linux-x86_64/data/wsrep_recovery.9Z6O0O’ –pid-file=’/mariadb/mariadb-galera-10.0.20-linux-x86_64/data/maria-galera-recover.pid’
nohup: ignoring input
150811 8:39:17 [Note] /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin/mysqld (mysqld 10.0.20-MariaDB-wsrep) starting as process 30950 …
150811 08:39:19 mysqld_safe WSREP: Recovered position 00000000-0000-0000-0000-000000000000:-1
150811 8:39:19 [Note] /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin/mysqld (mysqld 10.0.20-MariaDB-wsrep) starting as process 30986 …
150811 8:39:19 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150811 8:39:19 [Note] InnoDB: The InnoDB memory heap is disabled
150811 8:39:19 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150811 8:39:19 [Note] InnoDB: Memory barrier is not used
150811 8:39:19 [Note] InnoDB: Compressed tables use zlib 1.2.3
150811 8:39:19 [Note] InnoDB: Using Linux native AIO
150811 8:39:19 [Note] InnoDB: Using CPU crc32 instructions
150811 8:39:19 [Note] InnoDB: Initializing buffer pool, size = 128.0M
150811 8:39:19 [Note] InnoDB: Completed initialization of buffer pool
150811 8:39:19 [Note] InnoDB: Highest supported file format is Barracuda.
150811 8:39:19 [Note] InnoDB: 128 rollback segment(s) are active.
150811 8:39:19 [Note] InnoDB: Waiting for purge to start
150811 8:39:19 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.24-72.2 started; log sequence number 1616885
150811 8:39:19 [Note] Plugin ‘FEEDBACK’ is disabled.
150811 8:39:19 [Warning] Failed to create a socket for IPv6 ‘::’: errno: 97.
150811 8:39:19 [Note] Server socket created on IP: ‘0.0.0.0’.
150811 8:39:19 [Note] Event Scheduler: Loaded 0 events
150811 8:39:19 [Note] WSREP: Read nil XID from storage engines, skipping position init
150811 8:39:19 [Note] WSREP: wsrep_load(): loading provider library ‘none’
150811 8:39:19 [Note] /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin/mysqld: ready for connections.
Version: ‘10.0.20-MariaDB-wsrep’ socket: ‘/tmp/mysql.sock’ port: 3306 MariaDB Server, wsrep_25.10.r4144
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64 ] cd bin/
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ] pwd
/mariadb/mariadb-galera-10.0.20-linux-x86_64/bin
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ] echo “export PATH=$PATH:/mariadb/mariadb-galera-10.0.20-linux-x86_64/bin” >> ~/.bashrc ; source ~/.bashrc; env | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/mariadb/mariadb-galera-10.0.20-linux-x86_64/bin
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin ] cd ../support-files/
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] cp mysql.server /etc/init.d/mysql
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] ll -lhtr
total 92K
-rw-r–r– 1 1021 1004 1.3K Jun 24 23:32 magic
-rwxr-xr-x 1 1021 1004 2.2K Jun 25 00:15 wsrep_notify
-rw-r–r– 1 1021 1004 3.4K Jun 25 00:15 wsrep.cnf
-rwxr-xr-x 1 1021 1004 13K Jun 25 00:15 mysql.server
-rwxr-xr-x 1 1021 1004 839 Jun 25 00:15 mysql-log-rotate
-rwxr-xr-x 1 1021 1004 1.1K Jun 25 00:15 mysqld_multi.server
-rw-r–r– 1 1021 1004 2.8K Jun 25 00:15 my-small.cnf
-rw-r–r– 1 1021 1004 4.8K Jun 25 00:15 my-medium.cnf
-rw-r–r– 1 1021 1004 4.8K Jun 25 00:15 my-large.cnf
-rw-r–r– 1 1021 1004 20K Jun 25 00:15 my-innodb-heavy-4G.cnf
-rw-r–r– 1 1021 1004 4.8K Jun 25 00:15 my-huge.cnf
-rwxr-xr-x 1 1021 1004 1.2K Jun 25 00:15 binary-configure
drwxrwxr-x 3 1021 1004 4.0K Jun 26 11:39 SELinux
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] chmod +x /etc/init.d/mysql
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] chkconfig –add mysql
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] chkconfig –level 345 mysql on
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] diff mysql.server /etc/init.d/mysql
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] ll -lhtr /etc/init.d/mysql
-rwxr-xr-x 1 root root 13K Aug 11 08:44 /etc/init.d/mysql
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] service mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL SUCCESS!
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] ps -ef | grep mysql
root 30875 21298 0 08:39 pts/2 00:00:00 /bin/sh ./bin/mysqld_safe –user=mysql
mysql 30986 30875 0 08:39 pts/2 00:00:00 /mariadb/mariadb-galera-10.0.20-linux-x86_64/bin/mysqld –basedir=/mariadb/mariadb-galera-10.0.20-linux-x86_64 –datadir=/mariadb/mariadb-galera-10.0.20-linux-x86_64/data –plugin-dir=/mariadb/mariadb-galera-10.0.20-linux-x86_64/lib/plugin –user=mysql –log-error=/mariadb/mariadb-galera-10.0.20-linux-x86_64/data/maria-galera.err –pid-file=maria-galera.pid –wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
root 32117 21298 0 08:45 pts/2 00:00:00 grep mysql
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/support-files ] mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.0.20-MariaDB-wsrep MariaDB Server, wsrep_25.10.r4144
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| test |
+——————–+
4 rows in set (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> exit
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/data ] 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] y
… Success!
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] y
… Success!
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 @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/data ]
[ root @ maria-galera : /mariadb/mariadb-galera-10.0.20-linux-x86_64/data ]