Insane
Eaglenet logo
24/7 updates on happenings in africa
*LORDEAGLE 2015-07-04 19:53
This command lists all the MySQL databases on your computer. Since you've just installed MySQL, there will just be a few default databases, similar to the following:
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

Copy code
Now that you know how to send commands to your MySQL server, you're ready to create your own database and start adding data to it. You'll do this in the following sections.
When you're finished with the MySQL Monitor, you can quit it by typingexitat the prompt and pressingEnter.
If you're not comfortable with the command line, there are other ways to administer MySQL and issue commands. MySQL Workbenchis a free graphical app that can connect to any MySQL server and administer it. There's also the web-based phpMyAdmin, which is included in many LAMP/WAMP/MAMP packages
Creating a database
Let's create a simple database for an imaginary book store. At yourmysql>prompt, type the following and pressEnter:
create database bookstore;
If all goes well, you'll see something like this:
Query OK, 1 row affected (0.05 sec)
MySQL has now created your database. You can check this by typingshow databasesagain:[code]mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| bookstore         |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

Copy code

Congratulations — you've just created your first MySQL database! Hope The above tutorial was helpful?
    ·
  • rated(0)
Oniline