starmud said:
I just need to know if it's possible to have a database called starmud in FreeBSD?
In theory, it is possible.
Install
databases/mysql56-server from the ports, and initialize it and set it up for hosting the database
starmud for the user
starmud.
The obstacle here is, that databases are not simply empty big containers, databases are structured. And you need to provide the structure. For this reason software packets provide either a SQL database template file that the user (i.e. you) must load into
mysql for setting up the database(s), or the software comes with an initialization function that is either called implicitly on the first run or explicitly before the first run by the way of a separate command.
If you neither got a SQL template file nor know of an initialization routine, and eventually don't know anybody else who got either of these facilities, then simply forget it -- trial and error will lead you straight into the middle of nowhere. I don't know anything about
StarMUD -- yesterday I thought: "perhaps a dingy star" -- so, I certainly can't be of any help with that.
starmud said:
Or if I should rename starmud to a different name that will allow for a connection to whatever database that's available.
Let's assume that there is a database server in the net, e.g. with the host address
starmud-db.example.com, and it provides the database
starmud for the user
starmud, having the password
starpwd, then you would change line 56 of the file
db.c to:
Code:
...
if (mysql_real_connect(dbh, "starmud-db.example.com", "starmud", "starpwd", "starmud", 0, NULL, 0) == NULL) {
mysql_close(dbh);
error("Unable to connect to SQL database.\n");
}
...
If you got only the IP address, then replace the second parameter by
"ip.ip.ip.ip". If the server is not listening on the standard port
3306, then you need to pass the actual port number instead of
0 by the sixth parameter.
After the changes, you need to re-compile the DB connector.