ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Simple Database Creation on MariaDB or MySQL

    Scheduled Pinned Locked Moved IT Discussion
    mariadbmysqldatabaserdbms
    1 Posts 1 Posters 818 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Creating a database on MariaDB or MySQL relational databases is pretty easy using the SQL commands. We just attach to the database server using the MySQL client.

      # mysql -u root -p
      Enter password: 
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 2
      Server version: 5.5.50-MariaDB MariaDB Server
      
      Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      MariaDB [(none)]> CREATE DATABASE wp_demo;
      Query OK, 1 row affected (0.00 sec)
      
      MariaDB [(none)]> GRANT ALL PRIVILEGES ON wp_demo.* TO "demouser"@localhost
          -> IDENTIFIED BY "mypasswordsecret";
      Query OK, 0 rows affected (0.00 sec)
      
      MariaDB [(none)]> FLUSH PRIVILEGES;
      Query OK, 0 rows affected (0.00 sec)
      
      MariaDB [(none)]> EXIT
      Bye
      
      1 Reply Last reply Reply Quote 1
      • 1 / 1
      • First post
        Last post