Thought and Freedom

Articles for those who think. By Terry Pearson

SQL Statements – Create a database

without comments

As mentioned in earlier posts, SQL is an extremely important part of web development. Below is instruction on how to create a database in SQL. This is based on a Linux MySQL DBMS, but it should work (or be very similar) on other versions of SQL as well.

  1. Log in to MySQL by typing:
    • mysql -u username -p
  2. If you wish to see existing databases, type:
    • show databases;
  3. Now, we can create the new database. We will call the database “thisDatabase:”
    • create database thisDatabase;
  4. Then we need to assign permissions to a user. This can be a new or an existing user. We will use the user name, terry. The password will be set to password:
    • GRANT ALL ON thisDatabase.* TO terry@localhost IDENTIFIED BY “password”;

Congratulations, your database is set up. This is something that you will need to use if you are installing a content management system like WordPress, Drupal, or Xoops. You can read more about creating a database by clicking here.

Related posts:

  1. Internet Movie Database Have you ever had a discussion with your friends about a movie, and just can’t remember what the movie was about. Or maybe you are trying to figure out what...

Written by Terry Pearson

December 20th, 2006 at 10:12 pm

Posted in Programming,SQL

Leave a Reply


Creative Commons License
Terry Pearson - The Blog by Terry Pearson
is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.