The linux server on which I'm attempting to create a MySQL database has many difficult to work with permissions. My supervisor has tried to install MySQL Workbench on the server, but has been unable to "build" the correct install (he knows much more than me about linux command line and the server we're using than I do, and we are running on a relatively short schedule). Thus, the only tool I have with which to create a MySQL relational database is the built-in MySQL Command Line.
-
Is it possible (practically speaking) to create a functioning
relational database using only SQL code in the command line, or will
I eventually need a tool such as MySQL Workbench?- If it is possible, could you please direct me to a good
resource/reference on how to do so?
- If it is possible, could you please direct me to a good
I have minimal experience with MySQL, but am familiar with databases and am generally computer-savvy. Thanks.
Best Answer
Yes, most linux system administrators only use the command lines client (or other cli tools to work with the database). Maybe the only other thing you will need for design is a text editor (for writing easily before executing), like vi(m), nano or emacs, and pen and paper.
Here it is a first crash course:
Create a database:
Change the current database:
Create your first table:
Populate your table:
Select your table:
Learn about MySQL SQL variant, in particular DDL commands, DCL and about using the command line client. There are many resources (I have just linked to wikibooks and the official MySQL documentation), but the command line client also has integrated help:
Another quick startup guide.