• Skip to secondary menu
  • Skip to content
  • Skip to primary sidebar

Question2Answer

Question2Answer Tips, Plugins and Themes

  • Home
  • Plugins
  • Themes
  • Demo v1.8
  • Q2A Hosting
  • Q2A Testing Team
  • Sites
  • Meta Q2A

Create a MySQL Database via Command Line

MySQL is one of the most popular database used as a backend by many applications, including Question2Answer. You can create MySQL using phpMyAdmin or using command line. Here are some instruction about how to create MySQL database via command line.

Create a MySQL Database

Login to MySQL first.

mysql -u <username> -p 

You will see a MySQL prompt that looks like this

mysql>

Create a MySQL database Command

mysql> create database mydb;

Add user with strong password for database, this command will create mydbadmin users also

mysql> grant usage on *.* to mydbadmin@localhost identified by 'yourPassword';

Grant all permissions for mydbadmin user

mysql> grant all privileges on mydb.* to mydbadmin@localhost;

View All MySQL Databases

mysql> show databases;

Above command will show result like

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
| mydb               |
+--------------------+
4 rows in set (0.00 sec)

You can use above credentials in qa-config.php to install Question2Answer.

Filed Under: How-to

Love Question2Answer? Join testing team

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Question2Answer.org (official site) is a free and open source php/MySql platform for Q&A sites.
Download Q2A (v1.7.5 stable)

About Q2A.info

This site is a collection of Plugins and Themes for Question2Answer platform.

Get Plugin/Theme updates

Demo

Q2A v1.8 (Github)
Plugins Demo Site

Plugin Authors

  • Amiya Sahu
  • Arjun Suresh
  • donShakespeare
  • Gabriel Zanetti
  • Gurjyot
  • NoahY
  • ProThoughts
  • Q2A Market
  • q2apro.com
  • Scott
  • Copyright © 2019 ยท Question2Answer.info
    Contact . Support