Install mysql-4.0.26 under redhat9

Source: Internet
Author: User

Install mysql-4.0.26 notes under RedHat9:

The original code package of mysql-4.0.26.tar.gz is obtained. Note that it is not binary. Use the following command to modify the actual path based on your own situation:

--- Create a mysql installation directory
Su-root
Cd/usr/local
Mkdir mysql
Of course, you can also create a directory using a common account, if you do not have a root account.

--- Configure the environment
Let's take a look at the help to see the name and meaning of the parameter:./configure -- help
Simple operation of some parameters: the most important parameter: -- prefix =/usr/local/mysql
CXX = gcc./configure -- prefix =/usr/local/mysql -- enable-validator -- with-mysqld-ldflags =-all-static -- with-extra-charsets = complex

--- Compile and install
Make
Make install
/Usr/local/mysql/bin/mysql_install_db: find/usr/local/mysql-name mysql_install_db if this file is not in this directory.
Generate the var directory and the following mysql and test. Note that the subsequent operation prompt is the next step.

-- Modify permissions because we need to run the database server with the mysql account permission
Chown-R root/usr/local/mysql
Chown-R mysql/usr/local/mysql/var: directory for saving database data files and log files
Chgrp-R mysql/usr/local/mysql

-- Set the configuration file of the mysql database server, including the TCP port number. This can be modified when the default port number 3306 is occupied by others.
Cp/usr/local/mysql/share/mysql/my-medium.cnf/etc/my. cnf

-- Run the database server with mysql account Permissions
/Usr/local/mysql/bin/safe_mysqld -- user = mysql &

-- Set the root account password: note that the IP address must be checked for mysql account logon. Generally, the logon IP address of the root account is set to 127.0.0.1 as secure.
/Usr/local/mysql/bin/mysqladmin-u root-p password 'new-password'
/Usr/local/mysql/bin/mysqladmin-u root-h ***-p password 'new-password'

Note:
1. the root account of mysql is not the root account of the operating system;
2. Run with mysql permissions. This mysql account is an account of the operating system, not an account of the mysql database;
3. The differences between the operating system account and the mysql database account are clearly divided.

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.