Ubuntu source code to install MySQL official standard steps

Source: Internet
Author: User
Tags automake
Ubuntu source code install Mysql official standard step 1, install Mysql1, sudoapt-getinstallg ++ gccmakeautomakeperllibncurses5-devkdelibs_d

Ubuntu source code install Mysql official standard step 1, install Mysql1, sudo apt-get install g ++ gcc make automake perl libncurses5-dev kdelibs_d

Ubuntu source code to install MySQL official standard steps

1. Install Mysql
1. sudo apt-get install g ++ gcc make automake perl libncurses5-dev kdelibs_dev kdelib.
(Ensure that the required tools are installed properly)
2. cd ~ /Downloads
(Go to the directory where the compressed package is located)
3. tar zxvf mysql-6.0.2-alpha.tar.gz
(Decompress it here)
4. cd mysql-6.0.2-alpha
(Go to the decompressed source code package folder)
5../configure -- prefix =/usr/local/mysql
(Specify the installation path)
6. make
(Compile the installer)
7. sudo make install
(Installation)
8. sudo cp support-files/my-medium.cnf/etc/my. cnf
(Copy the setting file in the source package to the unified setting file path of the/etc/system)
9. sudo ln-s/usr/local/mysql/bin/mysql/usr/bin/
Sudo ln-s/usr/local/mysql/bin/mysqladmin/usr/bin/
Sudo ln-s/usr/local/mysql/bin/mysqld_safe/usr/bin/
Sudo ln-s/usr/local/mysql/bin/mysql_conf/usr/bin/
Sudo ln-s/usr/local/mysql/share/mysql. server/usr/bin/
(Add a soft link to the execution program. This is just for convenience. If you prefer to use the full path, you can not do it)
10. sudo groupadd mysql
(Create a user group mysql)
11. sudo useradd-g mysql
(Create a user mysql under the user group mysql)
12. cd/usr/local/mysql
(Go to the main program directory)
13. sudo bin/mysql_install_db -- user = mysql
(If you have not installed MySQL, you must create a MySQL authorization table. After creation, you need to manually restart the server)
14. sudo chown-R root.
(Make all files in the/usr/local/mysql/directory owned by the root user root)
15. sudo chown-R mysql var
(Make all files in the/usr/local/mysql/var/directory belong to the user mysql)
16. sudo chgrp-R mysql.
(Make all files in the/usr/local/mysql/directory belong to mysql of the user group)
17. sudo bin/mysql_safe -- use = mysql &
(Initialize and test your mysql, where & indicates execution in the background)

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.