First, Ubuntu under the compilation installation Mysql5.0.45

Source: Internet
Author: User

first, compile and install Mysql5.0.45

Build a LNMP environment under Ubuntu. Compile and install mysql,nginx,php. Finally, install the composer under the Lnmp premise and install the Laravel frame. First, the first step is to compile and install MySQL.

Steps:

    1. Cd/usr/local/src, go to the folder and this folder is used to save the software installation package you need to use.

    2. then type "sudo wgethttp://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.45.tar.gz" Enter, if prompted to enter a password, Enter the password and then enter to begin downloading the installation package file.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/77/AA/wKiom1Zq0VKRUCDhAACFdxqqFGg076.png "title=" 1.png " alt= "Wkiom1zq0vkrucdhaacfdxqqfgg076.png"/>

3. Unzip the installation package file and type "Sudotar zxvf mysql-5.0.45.tar.gz" to enter.

4. After the decompression is complete, enter the installation directory and type "CD mysql-5.0.45/" to enter.

5 .  Type "Sudo./configure--prefix=/usr/local/server/mysql/--enable-assembler--with-extra-charsets= complex--enable-thread-safe-client--with-big-tables--with-embedded-server--enable-local-infile--with-plugins= Innobase "Enter to begin configuring the installation until the instructions have been completed successfully.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/77/A9/wKioL1Zq0g3wHPf_AAFhcwkUxPU146.png "title=" 2.png " alt= "Wkiol1zq0g3whpf_aafhcwkuxpu146.png"/>

If it appears:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/AA/wKiom1Zq0jzyf-_CAAAfnw-Ul18613.png "title=" 3.png " alt= "Wkiom1zq0jzyf-_caaafnw-ul18613.png"/>

Indicates that the Curses/termcap library is not installed. Workaround: Install Libncurses5-dev, and then rerun the configuration apt-get Installlibncurses5-dev

6. we install the environment under "/usr/local/server", so we need to set up a directory first. Enter the "sudo mkdir/usr/local/server" carriage return to create the directory.

7. then start compiling MySQL and type "sudo make && makeinstall" in the mysql-5.0.45 directory.

If the following error occurs, the C + + compilation environment is not installed properly. At this point, run the command

sudo apt-get install g++

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/77/AA/wKiom1Zq0w7jVVtVAABjyrktxZU065.png "style=" float: none; "title=" 4.png "alt=" Wkiom1zq0w7jvvtvaabjyrktxzu065.png "/>

After the installation is successful,


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/77/AA/wKiom1Zq0xHQMa1_AAG-vn49eFc026.png "style=" float: none; "title=" 5.png "alt=" Wkiom1zq0xhqma1_aag-vn49efc026.png "/>

8. Run the command "cd/usr/local/server/mysql" into the MySQL directory;

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/77/A9/wKioL1Zq0xTSu8L4AABS7393M6s468.png "style=" float: none; "title=" 6.png "alt=" Wkiol1zq0xtsu8l4aabs7393m6s468.png "/>

9. Create the configuration file, "sudo cp./share/mysql/my-medium.cnf./MY.CNF".

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/A9/wKioL1Zq0xSAbys_AAAoqqAlh_c027.png "style=" float: none; "title=" 7.png "alt=" Wkiol1zq0xsabys_aaaoqqalh_c027.png "/>

then install the default database file, "sudo./bin/mysql_install_db".

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/77/AA/wKiom1Zq0xSCXyu0AAEwLUUABy4144.png "style=" float: none; "title=" 8.png "alt=" Wkiom1zq0xscxyu0aaewluuaby4144.png "/>

Set the service startup script and execute "sudo cp./share/mysql/mysql.server/etc/init.d/mysql".

then execute "sudo chmod +x/etc/init.d/mysql".

then use "/etc/init.d/mysql start" and "/etc/init.d/mysqlstop" to run and end the MySQL service.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/77/A9/wKioL1Zq0xbAaEVkAABTTy6JCcs988.png "style=" float: none; "title=" 9.png "alt=" Wkiol1zq0xbaaevkaabtty6jccs988.png "/>

if sudo/etc/init.d/mysql start has the following problem:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/77/A9/wKioL1Zq0xawvpqXAAA2dGgAMDQ899.png "style=" float: none; "title=" 10.png "alt=" Wkiol1zq0xawvpqxaaa2dggamdq899.png "/>

Workaround: Modify the/etc/init.d/mysql file to add the--user=root parameter to the following line . Re-run "sudo/etc/init.d/mysql start" to resolve the issue.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/77/A9/wKioL1Zq0xeBLV2QAAA1c0MDQhM931.png "style=" float: none; "title=" 11.png "alt=" Wkiol1zq0xeblv2qaaa1c0mdqhm931.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/77/AA/wKiom1Zq0xbxx9eEAABijQelUao817.png "style=" float: none; "title=" 12.png "alt=" Wkiom1zq0xbxx9eeaabijqeluao817.png "/>

11. Finally set the database root password, this step will be executed in the case of the database running, first "sudo/etc/init.d/mysql start" Start the database, and then execute "./bin/ mysqladmin-u root password 123456"(123456 is password and can be set by itself).

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/77/AA/wKiom1Zq0xaRRofTAAA9MJUwHCs243.png "style=" float: none; "title=" 13.png "alt=" Wkiom1zq0xarroftaaa9mjuwhcs243.png "/>

12. Log in to the database

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/77/A9/wKioL1Zq0xqA6eTlAAG0vgq21Hs792.png "style=" float: none; "title=" 14.png "alt=" Wkiol1zq0xqa6etlaag0vgq21hs792.png "/>

Since then, the MySQL database compilation installation is complete.



This article from the "Good Learning Day Up" blog, please be sure to keep this source http://sunrising.blog.51cto.com/10729461/1722190

First, Ubuntu under the compilation installation Mysql5.0.45

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.