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.
- Log in to MySQL by typing:
- mysql -u username -p
- If you wish to see existing databases, type:
- show databases;
- Now, we can create the new database. We will call the database “thisDatabase:”
- create database thisDatabase;
- 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.