I was going through the specifications for loading data into and from MySQL tables at dev.mysql, when I came across the specifications for the local option in the load infile data command. It says that if local is not used, then if a file name with no leading components is given, the server looks for the file in the database directory of the default database. Can anyone tell me what is meant by default database here, and how to set one? Can it be set from within MySQL itself, or through some server directive?
I was going through the specifications for loading data into and from MySQL tables
Share
The default database is the one you called with a
USEclause or specified at login time. If you useSELECT * FROM tablenameas opposed toSELECT * FROM databasename.tablenameyou also use the default database.Edit
Just to make that clear: The default database is not a static thing – it is defined only for a defined point in time on a defined session – e.g. such as the PIT and session where you start the
load data infilecommand.