Ubuntu source code install MySQL official standard step 1, install Mysql1, sudoapt-getinstallg ++ gccmakeautomakeperllibncurses5-devkdelibs_devkdelib (ensure that the required tools are installed) 2, cd ~ /Downloads(input compressed package directory %3%tarzxvfmysql-6.0.2-alpha.tar.gz (decompress here) 4
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)