Frequently Asked Questions

The NearlyFreeSpeech.NET FAQ (*)

MySQL (*)

Q. How do I access my MySQL database process from the ssh server command line?

To connect successfully, use a command similar to the following:

YourPrompt> mysql --host=example.db --user=username -p Database

Where the "username" is the database username (usually the same as your NearlyFreeSpeech.NET login, unless you have created another) and "example.db" is the database DSN you chose when creating your database and "Database" is the name of a database in your MySQL process that you have created. Using the above command line, you will be prompted for your MySQL password. The initial password was emailed to you at the time you created your process, but hopefully you've changed it since then.

To create a database in your MySQL process from the command line, use a command similar to the following:

YourPrompt> mysqladmin --host=example.db --user=username -p create Database

Using the same values as the first example, this will prompt you for your MySQL password and then create a database called Database in your MySQL process. (We'll leave the task of coming up with a database name more creative than "Database" as an exercise for the reader.)

If you need to redirect input (for example to load a MySQL dump file), you will additionally have to specify the MySQL password on the command line, like so:

YourPrompt> mysql --host=example.db --user=username --password=password Database <database.sql