Install DB
do these as mysvc01 user.
location of MariaDB SW in this docoment : /engn001/mysvc01/mariadb-10.0.26
location of my.cnf in this document: /engn001/mysvc01/MARIASVC/my.cnf
Install DB
use mysql_install_db
$ cd /engn001/mysvc01/mariadb-10.0.26
$ ./scripts/mysql_install_db --defaults-file=/engn001/mysvc01/MARIASVC/my.cnf
Start DB
use mysqld_safe
$ cd /engn001/mysvc01/mariadb-10.0.26
$ ./bin/mysqld_safe --defaults-file=/engn001/mysvc01/MARIASVC/my.cnf &
Change password of root
use mysqladmin
$ cd /engn001/mysvc01/mariadb-10.0.26
$ ./bin/mysqladmin --defaults-file=/engn001/mysvc01/MARIASVC/my.cnf -u root password NEW_PASSWORD
DB connection test
$ /engn001/mysvc01/mariadb-10.0.26/bin/mysql -S /engn001/mysvc01/MARIASVC/mysqld.sock -uroot -pNEW_PASSWORD
MariaDB [(none)]> select version();
+-----------------+
| version() |
+-----------------+
| 10.1.14-MariaDB |
+-----------------+
cleanup unnecessary user and schema
$ /engn001/mysvc01/mariadb-10.0.26/bin/mysql -S /engn001/mysvc01/MARIASVC/mysqld.sock -uroot -pNEW_PASSWORD
MariaDB [(none)]> select host, user, password from mysql.user;
+-----------+------+-------------------------------------------+
| host | user | password |
+-----------+------+-------------------------------------------+
| localhost | root | *CC619458B2AE531A9F2124687774910B35B15568 |
| 127.0.0.1 | root | |
| ::1 | root | |
| localhost | | |
+-----------+------+-------------------------------------------+
MariaDB [(none)]> delete from mysql.user where password = '';
Query OK, 3 rows affected (0.00 sec)
MariaDB [(none)]> commit;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> drop schema test;
Query OK, 0 rows affected (0.00 sec)