MySQL Error Log File
The error log contains information indicating when mysqld was started and stopped and also any critical errors that occur while the server is running.
If mysqld notices a table that needs to be automatically checked or repaired, it writes a message to the error log.
On some operating systems, the error log contains a stack trace if mysqld dies.
You can specify where mysqld writes the error log with the –log-error[=file_name] option.
If no file_name value is given, mysqld uses the name host_name.err by default and writes the file in the data directory.
On Windows, error output is always written to the .err file if –console is not given.
If you use mysqld_safe to start mysqld, mysqld_safe arranges for mysqld to write error messages to a log file or to syslog mysqld_safe has three error-logging options, –syslog, –skip-syslog, and –log-error.
Connecting to and Disconnecting from the MySQL Server
you should be able to connect like this:
shell> mysql -h host -u user -p
Enter password: ********
host and user represent the host name where your MySQL server is running and the user name of your MySQL account. Substitute appropriate values for your setup.
The ******** represents your password; enter it when mysql displays the Enter password: prompt.
If that works, you should see some introductory information followed by a mysql> prompt:
shell> mysql -h host -u user -p
The mysql> prompt tells you that mysql is ready for you to enter commands.
MySQL Server and Server-Startup Programs
mysqld — The MySQL Server
mysqld_safe — MySQL Server Startup Script
mysql.server — MySQL Server Startup Script
mysqld_multi — Manage Multiple MySQL Servers
The mysqld program has many options that can be specified at startup. For a complete list of options, run this command:
shell> mysqld –verbose –help
Webmin behaves differently depending on the operating system or Linux distribution that you have installed, and the particular version that you are running.
The correct OS is always automatically detected at installation time or provided by the installer, but it is quite possible that your system may be upgraded during the lifetime of the system.
If this happens, Webmin will not automatically detect the upgrade - you must tell it by following these steps :
- Click on the Operating System and Environment icon on the module’s main page.
- Select your Unix vendor and version from the New operating system list.
- Hit the Save button to have Webmin start using it.
The operating system and version detected at installation time determines the default values for module configurations, as each flavor of Unix uses different locations and formats for the various config files that Webmin manages.
However, changing your OS by following the steps above will not adjust any of these configuration settings. Instead, it will just determine which ones are used for modules installed in future. Usually this is not a problem, as most OS upgrades will not change the locations of files and programs.
However, some modules may need to be manually configured after an upgrade - for example, you may need to change the print system used by the Printer Administration module if the old OS version used LPRng and the new version uses CUPS.
Setting up logging
Like most web servers, Webmin can be configured to create a lot file in the standard CLF format the records every request it receives. As well, it also creates a log of actions performed by users, such as the creation of a DNS zone or the deletion of a Unix group. This actions log can even include the details of every file changed and command run by each action, so that you can see what Webmin is doing under the hood.
Basic logging is enabled by default, but you can configure it further by following these steps :
- Click on the Logging icon on the main page.
- If Disable logging is selected then Webmin will write no logs at all. However, you should choose Enable logging to activate it.
- If the Log resolved hostnames box is checked the log file will contain actual client hostnames instead of IP addresses. This can cause problems if reverse DNS lookups take a long time on your network, as one will need to be done for each request.
- To prevent the log files from becoming too large, Webmin can be configured to truncate them periodically. To enable this feature, select the Clear logfiles every box and enter a number of hours into the adjacent text field.
- To limit action logging to only specific users, select the Only log actions by option and choose some users from the list next to it. This can be handy if most of your users can only perform tasks that you don’t care much about, and you want to log only actions taken by the more powerful administrators instead.
- To limit action logging to only specific modules, select the Only log actions in option and choose one or more modules from its list.
- To enable the logging of file changes and commands run for each action, check the *Log changes made to files by each action *box. This will take up more disk space, but provides some very useful and interesting information.
- Hit the Save button to activate the changes.