Skip to content

Command-line operation

These notes explain how to create and run SQL scripts at the command line using MySQL or MariaDB.

The process will be very similar for other database platforms with some minor variations. Using the command line successfully requires a little practice, but once you have built up some familiarity it can save you a lot of time and give you more control over what you are trying to achieve.

These notes cover

  • The Linux file system
  • Running a script
  • Using a text editor
  • Moving files between your computer and the server
  • Schema maintenance scripts