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
On RHEL uses a memory efficient /etc/my.cnf file. If you install MySQL on a Debian server, edit the key_buffer_size setting in /etc/mysql/my.cnf. A small value like 2M often works well. For an ultra-tiny setup add or change the follow entries to the mysqld section:
# if your are not using the innodb table manager, then just skip it to save some memory
#skip-innodb
innodb_buffer_pool_size = 16k
key_buffer_size = 16k
myisam_sort_buffer_size = 16k
query_cache_size = 1M
Steps to upgrade MySQL in FreeBSD
Steps to upgrade MySQL version 4 to 5 in the FreeBSD :
1. Backup the existing MySQL database.
$ cd /var/db/
$ tar cvfz mysql.tar.gz mysql
2. Stop the MySQL service.
$ /usr/local/etc/rc.d/mysql-server.sh stop
3.Remove the existing MySQL Server .
pkg_delete mysql-server-4.*.*
pkg_delete mysql-client-4.*.*
Replace the ‘*’ with the version that is the server.
4. For installing the new MySQL Server, execute the following step.
$ cd /usr/ports/databases/mysql50-server && make install clean
5.Start MySQL 5.0 in the server and run the upgrade script.
$ /usr/local/etc/rc.d/mysql-server.sh start
$ /usr/local/bin/mysql_upgrade -u root -p –datadir=/var/db/mysql
You will be prompted for the new MySQL password where you can provide it.