Unix Postinstallation Procedures
137
To check the effect of specifying path options, invoke
mysqld
with those options followed by the
--
verbose
[425]
and
--help
[400]
options. For example, if you change location into 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
[404]
as well, but
--verbose
[425]
and
--
help
[400]
must be the last options.
Once you determine the path settings you want, start the server without
--verbose
[425]
and
--
help
[400]
.
If
mysqld
is currently running, you can find out what path settings it is using by executing this
command:
shell>
mysqladmin variables
Or:
shell>
mysqladmin -h host_name variables
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
the permissions for the involved files and directories so that the server has the right to use them. You
can also start the server as
root
, but this raises security issues and should be avoided.
On Unix, change location into the data directory and check the ownership of the data directory and
its contents to make sure the server has access. For example, if the data directory is
/usr/local/
mysql/var
, use this command:
shell>
ls -la /usr/local/mysql/var
If the data directory or its files or subdirectories are not owned by the login account that you use for
running the server, change their ownership to that account. If the account is named
mysql
, use these
commands:
shell>
chown -R mysql /usr/local/mysql/var
shell>
chgrp -R mysql /usr/local/mysql/var
If it possible that even with correct ownership, MySQL may fail to start up if there is other security
software running on your system that manages application access to various parts of the file system. In
this case, you may need to reconfigure that software to enable
mysqld
to access the directories it uses
during normal operation.
If the server fails to start up correctly, check the error log. Log files are located in the data directory
(typically
C:\Program Files\MySQL\MySQL Server 5.0\data
on Windows,
/usr/local/
mysql/data
for a Unix binary distribution, and
/usr/local/var
for a Unix 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. On Unix,
you can use
tail
to display them:
shell>
tail host_name.err
shell>
tail host_name.log
The error log should contain information that indicates why the server could not start. For example, you
might see something like this in the log:
000729 14:50:10 bdb: Recovery function for LSN 1 27595 failed
000729 14:50:10 bdb: warning: ./test/t1.db: No such file or directory
000729 14:50:10 Can't init databases
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...