| ||||||||||||||||||||||||
MySql InstallationMySQL is the most popular open source database. It offers excellent speed and reliability. For many applications, the license is free. You should check which licensing option fits your needs.
| ||||||||||||||||||||||||
Summary | ||||||||||||||||||||||||
The following summarizes the straight forward installation
| ||||||||||||||||||||||||
Download | ||||||||||||||||||||||||
The main site for MySql is http://www.mysql.com.
You will need both the database server & standard clients and the Java connector.
database server & standard clients
For Linux, the easiest approach is perhaps to use the rpms. Download the rpms for the server and the client. Java connectorThe Java Connector enables java to work with the MySql server.
| ||||||||||||||||||||||||
Install the Server and Clients | ||||||||||||||||||||||||
Refer to the instructions with your distribution. The following gives an overview.
LinuxFor Linux You need to install the packages as root.
This should place executables in /usr/bin and set up various files.
At this point the server should be running and you should be able to run the client by executing Mac OSXThe ReadMe.txt provides details on how to install and configure. Read and follow the directions. The installer will upack the distribution and place it in /usr/local It will also link the /usr/local/mysql to the installed version The following summarizes the steps. If you are using using the package, you will do the following.
If you use the tar bar, you will need to extract the tar ball and run the installion script. You may also need to change the ownership of some files. | ||||||||||||||||||||||||
Automate Startup | ||||||||||||||||||||||||
This is optional. This will start the database server when you start the computer. The basic steps are
To disable the server start up, set MYSQLCOM=-NO-
If you are using using the package, Double click the MySQLStartupItem.pkg and follow the directions. You may have a problem on selecting the start up disk. If you do, click the back button and then forward. This usually works and the start up disk will be green. | ||||||||||||||||||||||||
Start the Server and Clients | ||||||||||||||||||||||||
|
if you enabled automatic restart you can restart the computer (very inelegant) or type the following in terminal,
Otherwise you can do it manually with. The samples
You should now be able to use the clients and administration tools. Try the following in a terminal.
| ||||||||||||||||||||||||
Configure Your Installation | ||||||||||||||||||||||||
The following steps are optional but are generally desirable.
Define root password.MuSql allows the user named root full access to the system. The default installation gives root a blank password. Thus it is a good idea to change this. The com Set a password for the root user For the Mac OSX, the executable should be in /usr/local/mysql/bin.
The second command may give an error. TFor linux install location should /usr/bin.
Set default login info.This lets you start a mysql client without needing to enter the user or passward.In your home directory create a file .my.cnf with the following contents
Add mysql executables to your path.If the executables are not in a standard path such as /usr/bin, you may want to add the command path. Thus you can typemysql rather than /usr/local/mysql/bin/mysql.
You will need to edit you login file (either user or system). Basic options are
| ||||||||||||||||||||||||
Install MySQL Java Connector | ||||||||||||||||||||||||
We will only need access to the java archive for the connector. The following describes one way to
set up access to it using a terminal window. You can also do most of this in the Finder. Be aware that using File/Make Alias may not work.
| ||||||||||||||||||||||||
|