| [root@node2 dr-elephant-2.0.4]# systemctl start mariadb.service [root@node2 dr-elephant-2.0.4]# systemctl status mariadb.service ● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: active (running) since Wed 2016-07-27 11:08:32 CST; 10s ago Process: 20074 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS) Process: 19986 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 20073 (mysqld_safe) CGroup: /system.slice/mariadb.service ├─20073 /bin/sh /usr/bin/mysqld_safe --basedir=/usr └─20230 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log ... Jul 27 11:08:29 node2.dcom mariadb-prepare-db-dir[19986]: The latest information about MariaDB is available at http://mariadb.org/. Jul 27 11:08:29 node2.dcom mariadb-prepare-db-dir[19986]: You can find additional information about the MySQL part at: Jul 27 11:08:29 node2.dcom mariadb-prepare-db-dir[19986]: http://dev.mysql.com Jul 27 11:08:29 node2.dcom mariadb-prepare-db-dir[19986]: Support MariaDB development by buying support/new features from MariaDB Jul 27 11:08:29 node2.dcom mariadb-prepare-db-dir[19986]: Corporation Ab. You can contact us about this at sales@mariadb.com. Jul 27 11:08:29 node2.dcom mariadb-prepare-db-dir[19986]: Alternatively consider joining our community based development effort: Jul 27 11:08:29 node2.dcom mariadb-prepare-db-dir[19986]: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/ Jul 27 11:08:29 node2.dcom mysqld_safe[20073]: 160727 11:08:29 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. Jul 27 11:08:29 node2.dcom mysqld_safe[20073]: 160727 11:08:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Jul 27 11:08:32 node2.dcom systemd[1]: Started MariaDB database server. [root@node2 dr-elephant-2.0.4]# mysql -u root //这里是之前配置过无密码登陆的 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 5.5.44-MariaDB MariaDB Server 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)]> -> \h General information about MariaDB can be found at http://mariadb.org List of all MySQL commands: Note that all text commands must be first on line and end with ';' ? (\?) Synonym for `help'. clear (\c) Clear the current input statement. connect (\r) Reconnect to the server. Optional arguments are db and host. delimiter (\d) Set statement delimiter. edit (\e) Edit command with $EDITOR. ego (\G) Send command to mysql server, display result vertically. exit (\q) Exit mysql. Same as quit. go (\g) Send command to mysql server. help (\h) Display this help. nopager (\n) Disable pager, print to stdout. notee (\t) Don't write into outfile. pager (\P) Set PAGER [to_pager]. Print the query results via PAGER. print (\p) Print current command. prompt (\R) Change your mysql prompt. quit (\q) Quit mysql. rehash (\#) Rebuild completion hash. source (\.) Execute an SQL script file. Takes a file name as an argument. status (\s) Get status information from the server. system (\!) Execute a system shell command. tee (\T) Set outfile [to_outfile]. Append everything into given outfile. use (\u) Use another database. Takes database name as argument. charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. warnings (\W) Show warnings after every statement. nowarning (\w) Don't show warnings after every statement. For server side help, type 'help contents' MariaDB [(none)]> create database drelephant; Query OK, 1 row affected (0.01 sec) MariaDB [(none)]> print; -------------- print -------------- unknown [elephant]> connect drelephant; Connection id: 5 Current database: drelephant MariaDB [drelephant]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | drelephant | | mysql | | performance_schema | | test | +--------------------+ 5 rows in set (0.00 sec) MariaDB [drelephant]> use drelephant; Database changed MariaDB [drelephant]> show tables; +-----------------------------------+ | Tables_in_drelephant | +-----------------------------------+ | play_evolutions | | yarn_app_heuristic_result | //出现这些个表格说明drelephant安装配置成功了 | yarn_app_heuristic_result_details | | yarn_app_result | +-----------------------------------+ 4 rows in set (0.00 sec) MariaDB [drelephant]> |