Creating a MySQL Database from Terminal or Command Line

The following assumes you have a successful installation of MySQL on OS X or Linux:

mysqladmin -u root -p create database_name_development
Enter password: 
mysql -u root --password=root_user_password create database_name_development
VN:F [1.9.22_1171]
Rating: 3.2/5 (6 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 4 votes)
Creating a MySQL Database from Terminal or Command Line, 3.2 out of 5 based on 6 ratings
Facebook Twitter Email

One Comment to “Creating a MySQL Database from Terminal or Command Line”

  1. Vladimir 6 April 2011 at 12:31 pm #

    Thank you! It’s exactly what I was searching for.

    Does exists any command available in Terminal to list all available databases?

    VA:F [1.9.22_1171]
    Rating: 2.8/5 (5 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 3 votes)

Leave a Reply