Graphic tutorials for installing mysql-5.6.4 under Linux

Source: Internet
Author: User

Before starting the installation, first explain the difference between mysql-5.6.4 and the lower version of the installation, from mysql-5.5, MySQL source installation began to use CMake, so when we configure the installation directory./configure--perfix=/... is a bit different from what we used to do, and we'll mention later

Before starting the installation, first explain the difference between mysql-5.6.4 and the lower version of the installation, from mysql-5.5, MySQL source installation began to use CMake, so when we configure the installation directory./configure--perfix=/... There are some differences between the time and the previous, which we will mention later.

A: Decompression Mysql-5.6.4-m7-tar.zip

1> unzip Mysql-5.6.4-m7-tar.zip will generate mysql-5.6.4-m7-tar.gz compressed files

2> TAR-ZXVF mysql-5.6.4-m7-tar.gz will generate Mysql-5.6.4-m7 folder

Next we will configure the installation directory for specific installation, it is important to note that the use of cmake when the need to install CMake applications.

Download Compress package cmake-2.8.10.1.tar.gz extract tar-zxvf cmake-2.8.10.1.tar.gz get file cmake-2.8.10.1 go to CD cmake-2.8.10.1 < we now Outer build directory MkDir cmake_exe>

(1) Configure the installation directory./configure--prefix=/home/houqingdong/cmake_exe (2) make (3) make install

3> Well here our CMake has been installed successfully, into MYSQL-5.6.4-M7 CD/USR/LOCAL/MYSQL-5.6.4-M7 < Assuming the outer layer has been established mysql>

4> is performed according to the conversion relationship:

Cmake-dcmake_install_prefix=/usr/local/mysql Enter note Some time will appear prompt: Said no this cmake this command, but CMake just we did install, it doesn't matter, give it the path on the line: EX Port Path=/home/houqingdong/cmake_exe/bin: $PATH and then run it again.

5>make make install will see a prompt for successful installation after you finish executing

6> useradd MySQL Create a user named MySQL

7> Install the default database: Execute as MySQL (su-mysql) cd/usr/local/mysql/scripts/

sudo./mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data/--user=mysql

There was an error when I executed it, because I needed a password to execute sudo, but after I typed it I said that the MySQL user is not in the Sudoers folder:

And then back to the root user, execute: Visudo in root all= (all) all the line below add: MySQL all= (all) all to give It root user all permissions

After execution, go on to execute the above: sudo./mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data/--user=mysql

8> Copy the MySQL configuration files and service files to the system configuration path

CP my-medium.config/etc/my.conf CP Mysql.server/etc/init.d/mysqld

9> Start Service

Service Mysqld Start | | /etc/init.d/mysql start added to boot (chkconfig--add mysqld)

10> Add the password for the root user of MySQL: mysql-u root password ' Your_password

11> viewing Startup in Process Ps-ef | grep mysqld

From the inside you can see that MySQL is started for the root user, you can also view the installation directory and port number.

12> Link to database:


Well, today's bumps are finally installed, but there are some processes do not understand, such as permissions issues, authorization issues, and so on, tomorrow uninstall and reload, if there is a change or add the place added. ‘

There is also the possibility of cmake. -dcmake_install_prefix= ... The problem arises when:

Could not find Curses (missing curses_library Curses_include_path

Workaround:

[Email protected] software]# CD mysql-5.5.11
[Email protected] mysql-5.5.11]# CMake.
--Could not find Curses (missing:curses_library curses_include_path)
CMake Error at cmake/readline.cmake:82 (MESSAGE):
Curses Library not found. Please install the appropriate package,

Remove CMakeCache.txt and rerun CMake. On Debian/ubuntu, package name was Libncurses5-dev, on Redhat and derivates it was ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:126 (find_curses)
cmake/readline.cmake:216 (Mysql_use_bundled_libedit)
CMAKELISTS.TXT:250 (Mysql_check_readline)


--Configuring incomplete, Errors occurred!
[Email protected] mysql-5.5.11]# RM CMakeCache.txt
[email protected] mysql-5.5.11]# Yum install Ncurses-devel
Warning:bison executable not found in PATH
--Configuring done
--Generating done
--Build files has been written to:/software/mysql-5.5.11
[email protected] mysql-5.5.11]# Yum Install Bison

Follow the prompts to get it done!!

There are a few things that can make a difference:
1. There is no point behind the cmake of the fourth step, directly the space
2. The seventh step of the command executed under root is Visudo
3. I think the seventh step should be executed under the root user, otherwise the Mysql.plugin file cannot be found
Anyway, thank you so much!

Graphic tutorials for installing mysql-5.6.4 under Linux

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.