Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Installing Mysql On Unix, Linux
slacware
post Mar 2 2007, 06:12 PM
Post #1


Newbie
*

Group: Members
Posts: 3
Joined: 2-March 07
Member No.: 39,447



Download the latest version of MySQL.Choose the latest stable release and, from the stable release page, choose the option under "Source Downloads" marked "tarball (.tar.gz)". Download the file into a directory where files can be created and there is sufficient disk space. A good location is /tmp. Change directory to this location using:
1.

% cd /tmp


Note that the % character should not be typed in; this represents the Linux shell prompt and indicates that the command should be entered at the shell prompt.
2.

Uncompress the package in the new installation directory by running:

% gzip -d mysql-<version>.tar.gz

If MySQL 3.23.42 has been downloaded, the command is:

% gzip -d mysql-3.23.42.tar.gz


3.

Un-tar the tape archive file by running:

% tar xvf mysql-<version_number>.tar


A list of files that are extracted is shown.

If the version downloaded is MySQL 3.23.42, the command is:

% tar xvf mysql-3.23.42.tar


4.

Change directory to the MySQL distribution directory:

% cd mysql-<version>

If the version is MySQL 3.23.42, type:

% cd mysql-3.23.42


5.

Add a new Unix group account for the MySQL files:

% groupadd mysql


6.

Add a new Unix user who is a member of the newly created Unix group mysql:

% useradd -g mysql mysql


7.

Decide on an installation directory. Later, we recommend that PHP and Apache be installed in /usr/local/, so a good choice is /usr/local/mysql/. We assume throughout these steps that /usr/local/mysql/ is used; if another directory is chosen, replace /usr/local/mysql/ with the alternative choice in the remaining steps.
8.

Configure the MySQL installation by running the configure script. This detects the available Linux tools and the installation environment for the MySQL configuration:

% ./configure --prefix=/usr/local/mysql


9.

Compile the MySQL DBMS:

% make


10.

Install MySQL in the location chosen in Step 7 by running the command:

% make install


11.

MySQL is now installed but isn't yet configured. Now, run the mysql_install_db script to initialize the system databases used by MySQL:

% ./scripts/mysql_install_db


12.

Change the owner of the MySQL program files to be the root user:

% chown -R root /usr/local/mysql


13.

Change the owner of the MySQL databases and log files to be the mysql user created in Step 6:

% chown -R mysql /usr/local/mysql/var


14.

Change the group of the MySQL installation files to be the mysql group:

% chgrp -R mysql /usr/local/mysql


15.

Copy the default medium-scale parameter configuration file to the default location of /etc. These parameters are read when MySQL is started. The copy command is:

% cp support-files/my-medium.cnf /etc/my.cnf


16.

Edit the configuration file and adjust the default number of maximum connections to match the default value for the maximum Apache web server connections. Using a text editor, edit the file /etc/my.cnf, and find the section beginning with the following text:

# The MySQL server
[mysqld]

In this section, add the following line, then save the file, and exit the editor:

set-variable = max_connections=150


17.

The MySQL configuration is now complete, and MySQL is ready to be started. Start the MySQL DBMS with the following command:

% /usr/local/mysql/bin/safe_mysqld --user=mysql &

18.

Check that the MySQL DBMS is running with the mysqladmin utility. The following command reports statistics about the MySQL DBMS version and usage:

% /usr/local/mysql/bin/mysqladmin version


19.

Choose and set a password for root user access to the MySQL DBMS. To set a password of secret, use:

% /usr/local/mysql/bin/mysqladmin -uroot password secret

Record the password for later use.
20.

The MySQL server is currently running. However, when the machine is rebooted, MySQL doesn't restart automatically.

After reboot, the command in Step 17 can be used to restart MySQL or, alternatively, this process can be made automatic. To make the process automatic, find the file rc.local (normally either in or below the directory /etc). This file is used to list locally installed software that should be run on startup. Using an editor, add the following line to the bottom of the rc.local file:

/usr/local/mysql/bin/safe_mysqld --user=mysql &

The installation of MySQL is now complete.

Notice from BuffaloHELP:
Copied from cached page Warning.
Go to the top of the page
 
+Quote Post
CrazyRob
post Mar 2 2007, 07:00 PM
Post #2


ITS ALIVE.....MUHHHAAAA
*********

Group: Members
Posts: 532
Joined: 17-October 05
From: Chippenham UK
Member No.: 13,031



This has also been posted in the wrong forum

There is a much simpler way of installing MySQL on machines as most Linux / Unix machines have the command alredy built in so you just have to type:

yum install mysql (if you have yum installed)

or

apt-get install mysql (only debian and a few others support this)
Go to the top of the page
 
+Quote Post
augyd
post Aug 10 2007, 12:54 PM
Post #3


Newbie [Level 2]
**

Group: Members
Posts: 25
Joined: 31-May 07
Member No.: 43,978



-

This post has been edited by augyd: Aug 21 2007, 06:11 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Mysql And Sql(7)
  2. Loading File Into Blob Fields To Mysql(1)
  3. Mysql(7)
  4. Mysql Datatype Int() Question(1)
  5. Database With Mysql++(7)
  6. Mysql Query Problems(6)
  7. Mysql-essential-5.0.51 Installion Problem(2)
  8. The Best Free Php Mysql Blog(5)


 



- Lo-Fi Version Time is now: 25th July 2008 - 10:32 AM