Frequently Asked Questions

The NearlyFreeSpeech.NET FAQ (*)

MySQL (*)

How do I get a MySQL process?

Ok, I have a MySQL process. How do I create a database?

What is the DSN (hostname) I should use to connect to my MySQL database?

What is the difference between a MySQL process and a MySQL database?

If I lose my MySQL admin user password, can you help me get it back?

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

How do I access my MySQL database from my own computer?

Where can I find more information on properly creating MySQL users?

What are the default databases present in my MySQL process?

Why do I have to pay for a stopped MySQL process?

When I change my member password, do my MySQL passwords change too?

Why do I get an error "Cannot log in to the MySQL server" when I try to log in to phpMyAdmin?

What does the MySQL Error Can't connect to local MySQL server through socket '.../mysql.sock' (2) mean? (or socket 'please_see_the_faq')

When I try to log in to phpMyAdmin I get the error "the username was not provided." What should I do?

Why shouldn't I use my MySQL admin username from my web site?

What 'Host' value should I use when creating MySQL users?

How can I make automatic backups of MySQL?

How do I enable or disable InnoDB for my MySQL process?

How can I remove my MySQL process?

What username and password do I use to administer my MySQL process?

How do I upgrade MariaDB to a newer version?

There is no in-place upgrade between MariaDB major versions; it is too risky and too irreversible. To upgrade, create a new process and migrate your data from the old process to the new process. This approach removes the risk of an upgrade failure, and ensures you can "roll back" if the upgrade fails.

Follow these steps:

  1. Create a new MySQL process from the MySQL tab of our member interface.
  2. Create the necessary MySQL users to support your applications on your new process using its admin user. (What a great time to change/upgrade those passwords!)
  3. Backup the relevant database(s) containing your data. Do not back up the mysql database or any synthetic databases like information_schema or performance_schema.
  4. Restore the backups to the new process, using its admin login and password.
  5. Update your application(s) to use the right DSN and password for the new process. (Save the old values in case you need to roll back.)
  6. Test and confirm that absolutely everything you care about is working.
  7. Disable auto-restart on the old process.
  8. Stop the old process.
  9. Test and confirm that absolutely everything you care about is working again.
  10. Wait a week just in case. (Optional, but highly recommended.)
  11. Delete the old process once you're adequately convinced the upgrade is a success.

The recommended way to backup and restore MySQL data is to use the ssh command line, but it can also be done via phpMyAdmin if you prefer.

To do step 3 from the command line, first complete steps 1 and 2, then make the backup with a command like this for MariaDB 10.x or newer:

YourPrompt> mysqldump --user=exampleuser --host=exampleold.db -p --lock-all-tables --databases exampledb1 exampledb2 exampledb3 >migrate.sql

If (and only if) your old process is running MariaDB 5.3, then use this command instead:

YourPrompt> mysqldump --user=exampleuser --host=exampleold.db -p --lock-all-tables --default-charset=latin1 --databases exampledb1 exampledb2 exampledb3 >migrate.sql

In either case, the command is all one line, starting with mysqldump. Replace exampleuser with your MySQL administrator username. Replace exampleold.db with the name of your original MySQL process. Replace exampledb1 through exampledb3 with the names of all of your relevant databases in the process, as described in step 3 above.

Running this command will prompt you for the password. On success, it will produce no other output.

For step 4, load the backed-up data into the new process with a command like this:

YourPrompt> mysql --user=exampleuser --host=examplenew.db -p <migrate.sql

Replace exampleuser with your MySQL administrator username for the new process. Replace examplenew.db with the name of the new process you created in step 1.

This command will also prompt you for the password when you run it, and should produce no other output.

Provided that all works, continue with step 5.

What does it mean that my MySQL process is "damaged?"

Why do newly-created MySQL processes seem so expensive?

How do I enable or disable MySQL logs?