RSS:
Publications
Comments

SQL Statements – Create a database

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.

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <div align="" class="" dir="" id="" lang="" style="" xml:lang=""> <embed style="" type="" id="" height="" width="" src="" object=""> <iframe width="" height="" frameborder="" scrolling="" marginheight="" marginwidth="" src=""> <img alt="" align="" border="" class="" height="" hspace="" longdesc="" vspace="" src="" style="" width="" title="" usemap=""> <map name="" id=""> <object style="" height="" width="" param="" embed=""> <param name="" value=""> <pre style="" name="" class="" lang="" width="">