MySQL 5.0.19 manual installation in Debian

Source: Internet
Author: User
For the sake of security and stability, I usually use the stable version Debian. However, the mysql version of the stable version Debian is a little old, and the version of 4.x lacks many convenient features. Although you can choose unstable version Debian or upgrade MySQL only with APT, it is not so appropriate. Therefore, it is a good choice to manually install the latest MySQL version.

Download the latest stable MySQL version from the http://dev.mysql.com/downloads/mysql/5.0.html. There are multiple versions, including the source code version, but reference the Statement on the MySQL site:
"For maximum stability and performance, we recommend that you use the binaries we provide ."
In addition, I chose the Binary Package method because MySQL 5.0 Compilation Time is enough to fight a local war.

Because I have installed it in Debian, I don't need to consider rpm. Linux (x86) Max is a good choice.

Su
# Switch to root
Tar-zxvf mysql-max-5.0.19-linux-i686-glibc23.tar.gz
# You do not need to compile the Binary Package after it is released. Many steps for installing the Binary Package 5.0 on the Internet contain compilation, which is suitable for source code packages.
Groupadd MySQL
# Add a user group
Useradd-G MySQL
# Add a user
Music mysql-max-5.0.19-linux-i686-glibc23/usr/local
# Move the MySQL directory to/usr/local/
Ln-s mysql-max-5.0.19-linux-i686-glibc23 MySQL
# Create a hard connection. In many cases, MySQL is used to access/usr/local/MySQL.
CD MySQL
#.....
./Configure -- prefix =/usr/local/MySQL -- With-charser = GBK -- localstatedir =/var/DB/MySQL
# There are also some online Article The binary package mentioned above does not need to be compiled, but this step is missing. An error is reported when the following script is executed.
./Scripts/mysql_install_db -- user = MySQL
# Initializing a database
Chown-r root.
Chown-r Mysql Data
Chgrp-r MySQL.
# Modifying user and group permissions
CD support-Files
Ln-S/usr/local/MySQL/support-files/my-smal.cnf/etc/My. CNF
# Create a hard connection to my. CNF
Ln-S/usr/local/MySQL/support-files/MySQL. Server/etc/init. d/mysqld
# Enable MySQL to start up. The difference between Debian and other Linux systems is/etc/init. d/and/etc/rc. d/init. d.
/Etc/init. d/mysqld start
# Start MySQL
Ln-S/usr/local/MySQL/lib/MySQL/usr/lib/MySQL
Ln-S/usr/local/MySQL/include/MySQL/usr/include/MySQL
# To install MySQL later Program Do not specify the MySQL path. If you are as lazy as me, do not skip this step.

Related Article

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.