Tutorial by Examples

Create a DATABASE. Note that the shortened word SCHEMA can be used as a synonym. CREATE DATABASE Baseball; -- creates a database named Baseball If the database already exists, Error 1007 is returned. To get around this error, try: CREATE DATABASE IF NOT EXISTS Baseball; Similarly, DROP DATA...
You must create your own database, and not use write to any of the existing databases. This is likely to be one of the very first things to do after getting connected the first time. CREATE DATABASE my_db; USE my_db; CREATE TABLE some_table; INSERT INTO some_table ...; You can reference your...
The following databases exist for MySQL's use. You may read (SELECT) them, but you must not write (INSERT/UPDATE/DELETE) the tables in them. (There are a few exceptions.) mysql -- repository for GRANT info and some other things. information_schema -- The tables here are 'virtual' in the sense ...
If the administrator creates your database for you when setting up your permissions, you can begin using it. Otherwise, you need to create it yourself: mysql> CREATE DATABASE menagerie; Under Unix, database names are case sensitive (unlike SQL keywords), so you must always refer to your datab...

Page 1 of 1