[Original] mysql4.0.21 installation experience _ MySQL

Source: Internet
Author: User
[Original] mysql4.0.21 installation experience: I have encountered a lot of troubles in installing mysql 4.0.21, and I have also checked many articles on CU, but these articles are not very useful. it takes a lot of twists and turns, so it is necessary to introduce some experience, this will reduce the number of people in the future. I am writing this article not only for beginners like me to complete the installation of mysql-4.0.21, but also to be able to cope with the future mysql version of the installation based on the experience of this article. Isn't it a bit arrogant? I don't think so, because I think the steps are not the most important, and the later experiences are the most important. In addition, the installation environment is supported by Linux AS 3 and gcc.
1. First, let's talk about the installation steps.
# Groupadd mysql
# Useradd-g mysql
# Tar zxvf mysql-4.0.21.tar.gz/* will generate a mysql-4.0.21 directory */
# Cd mysql-4.0.21
#./Configure -- prefix =/usr/local/mysql
# Make
# Make install
# Cp support-files/my-medium.cnf/etc/my. cnf/* then I will ask if to overwrite the duplicate file, answer y */
# Cd/usr/local/mysql
# Bin/mysql_install_db -- user = mysql/* it is important that you create a system library with a mysql user and must use a mysql user! */
# Chown-R root.
# Chown-R mysql var
# Chgrp-R mysql.
# Bin/mysqld_safe -- user = mysql &/* must also be run by the mysql user. If no response is returned, congratulations! Successful! */
II. share experiences
1. Although the excellent articles of CU are good, there are minor differences in the installation of mysql versions! The most reliable part is to check the INSTALL-SOURCE file in the decompressed mysql-VERSION Directory. the installation steps above are fixed according to the file, and the installation is successful. At the beginning, the system library cannot be successfully created because of the lazy reading of the Chinese characters of the CU, because those articles were all installed in previous versions of mysql.
2. details
(1) This article is source code installation to reduce unnecessary troubles. For binary installation, you must first select the correct binary package for installation. for details, refer to the INSTALL-SOURCE file. this is also important. The steps are similar to those above, except for the three steps: configure, make, and make install.
(2) make takes about 15 minutes. please wait. wait: em24: em24:
(3) make install is much faster, so it will take less than 1 minute (no stopwatch, please forgive me if it is not estimated weekly)
(4) You must use mysql to create a system database! As mentioned above, I just didn't create a database because I didn't add "-- user = mysql" at the beginning. The system database will return the following information:
# Bin/mysql_install_db -- user = mysql
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
040913 20:11:39/usr/local/mysql/libexec/mysqld: Shutdown Complete
(5) mysql Users should also be used during running, and the command is mysqld_safe instead of the previous safe_mysqld. This is also described in INSTALL-SOURCE. At this time, I am most afraid of "... "Ended" indicates that mysql cannot be started normally. No response is best. press enter to return # prompt.
(6) if it is normal, you can use:
# Vi/etc/rc. d/rc. local
Run the command to edit the startup script and add "/usr/local/mysql/bin/mysqld_safe -- user = mysql &" to the end to complete the installation.
(7) If you are not at ease, use "# netstat-nat" to check if Port 3306 exists;
You can also use "# ps-ef | grep mysqld" to return the results with the words "mysqld" in three rows.
(8) Do not forget to change the mysql password.

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.