Install mariadb/MySQL database server in termux | Android

What is MariaDB ?



MariaDB is a community-developed, commercially supported fork of the MySQLrelational database management system, intended to remain free and open-source software under the GNU GPL. Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation.

How to install in Termux ?

Open termux app and type following commands :

  • pkg update
  • pkg install mariadb

Now mariadb is installed successfully.
Setup MariaDB server in Termux use following command :

  • mysql_install_db


Start MariaDB server :

To start MariaDB server type :
  • mysqld
       OR
  • mysqld_safe -u root &

for access database :

To access MariaDB Database server type :
  • mysql -u root -p
it will ask for password your by default password is nothing hit enter you will login into the database server.

Stop MariaDB server :

To stop MariaDB server type :

  • pkill mysql
Now MariaDB server is stoped.

Comments


  1. hello I get an error which is Acces denied for user 'root' @ 'local host'

    ReplyDelete
    Replies
    1. Type this command

      pkill mysql
      mysqld_safe -u root&
      Mysql -u.root

      Delete
    2. First type whoami and it will give ur username, then type mysql -u (thename u got) -p
      And u shall get it

      Delete
  2. mysql -u root -p
    Access Denied for root

    ReplyDelete
  3. For access new version please you type mysql

    ReplyDelete

Post a Comment