Starting the Server mysql/data  for a Unix/Linux binary distribution, and  /usr/local/var  for a Unix/Linux source distribution). Look in the data directory for files with names of the form  host_name .err  and host_name .log , where  host_name  is the name of your server host. Then examine the last few lines of these files. Use  tail  to display them: Although storage engines use default values for options that you omit, Oracle recommends that you review the available options and specify explicit values for any options whose defaults are not appropriate for your installation. The default data directory location is hardcoded when the server is compiled. To determine what the default path settings are, invoke  mysqld  with the  --verbose  and  --help  options. If the data directory is located somewhere else on your system, specify that location with the  --datadir  option to mysqld  or  mysqld_safe , on the command line or in an option file. Otherwise, the server does not work properly. As an alternative to the  --datadir  option, you can specify  mysqld  the location of the base directory under which MySQL is installed with the  --basedir , and  mysqld  looks for the  data  directory there. shell>  tail  host_name .err shell>  tail  host_name .log •Specify any special options needed by the storage engines you are using. You can create a  my.cnf file and specify startup options for the engines that you plan to use. If you are going to use storage engines that support transactional tables ( InnoDB ,  NDB ), be sure that you have them configured the way you want before starting the server. If you are using  InnoDB  tables, see Section 15.8, “InnoDB Configuration”  for guidelines and Section 15.14, “InnoDB Startup Options and System Variables”  for option syntax. •Make sure that the server knows where to find the data directory. The  mysqld  server uses this directory as its current directory. This is where it expects to find databases and where it expects to write log files. The server also writes the pid (process ID) file in the data directory. To check the effect of specifying path options, invoke  mysqld  with those options followed by the  -- verbose  and  --help  options. For example, if you change location to the directory where  mysqld is installed and then run the following command, it shows the effect of starting the server with a base directory of  /usr/local : shell>  ./mysqld --basedir=/usr/local --verbose --help You can specify other options such as  --datadir  as well, but  --verbose  and  --help  must be the last options. Once you determine the path settings you want, start the server without  --verbose  and  --help . If  mysqld  is currently running, you can find out what path settings it is using by executing this command: Or: host_name  is the name of the MySQL server host. If you get  Errcode 13  (which means  Permission denied ) when starting  mysqld , this means that the privileges of the data directory or its contents do not permit server access. In this case, you change 255 •Make sure that the server can access the data directory. The ownership and permissions of the data directory and its contents must allow the server to read and modify them. shell>  mysqladmin variables shell>  mysqladmin -h  host_name  variables