MySQL4Mac and environment variable version: mysql-5.1.41-osx10.5-x86 first to enter the system preference settings Start MySQL Server to enter mysql Command is:/usr/local/mysql/bin/mysql use alias simplified command: alias mysql =/usr/local/mysql/bin/mysql if this command is not appended ~ /. Bash_profile. This alias takes effect only in this operation. That is, when you close the Terminal window and re-open it, the alias will no longer be available (you must re-set it ). In the mysql4mac installation image, you must repeat all the other files except ReadMe.txt and click MySQL. after the prefPane file, you will find that the System Preferences contains an additional MySQL entry, after clicking this entry, you can open and close the MySQL service in the new window (and set whether to start the MySQL service at startup ). You can also set the environment variable: the export command is used to make the environment variable set by the user take effect and can be accessed by the corresponding application or daemon. Export is used to pass the environment variable you set to the subshell of the current SHELL so that it is valid in the subshell. To make it useful next time, modify the configuration file bsh/ksh to modify. profile; csh modify. cshrc or. login. Note that these are hidden files. You can use ls-a to display them in the corresponding user's directory. The command to start Tomcat is:/Applications/jakarta ...... /Start_tomcat startup background information: Go to/Applications/jakarta ...... /Logs, tail-f catalina. out