Help Needed to Set Up Mail Server
However, I'm stuck on the section Adding Data, 1.
> Adding Data
Now that you've created the database and tables, let's add some data to MySQL. Here's how:
Add your domains to the virtual_domains table. You can add as many domains as you want in the VALUES section of the command below, but in this example you'll add just the primary domain (example.com), your hostname (hostname), your FQDN (hostname.example.com), and localhost.example.com. (You'll add localhost in a different file later). Be sure to replace example.com and hostname with your own domain name and hostname. You'll need an id value and a name value for each entry. Separate each entry with a comma (,), and close the last one with a semicolon (;).
INSERT INTO `mailserver`.`virtual_domains` (`id` ,`name`) VALUES ('1', 'example.com'), ('2', 'hostname.example.com'), ('3', 'hostname'), ('4', 'localhost.example.com');
Note
Make a note of which id goes with which domain - you'll need for the next two steps.
I typed the the code listed there and replaced the example.com with my own domain and such, but when I hit enter in PuTTy, I get this error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''mailserverdb'.'virtual_domains' ('id', 'name') VALUES ('1', 'facetedgames.c' at line 1
I've checked and double checked and I have copied the code verbatim with the proper placeholders replaced with the correct values, but I keep getting that error. It is extremely frustrating and I'm close to ripping out my hair. What is wrong?
3 Replies
It says I should use my FQDN for "hostname.example.com". Should I still use my FQDN when I add other domains when those domains aren't the same as my FQDN?