Graphics and text tutorials for installing mysql-5.6.4 under Linux _mysql

Source: Internet
Author: User
Tags localhost mysql mysql create readline

Before starting the installation, 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 former, which we will mention later.

One: 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 folders

Next we are going to configure the installation directory for specific installation, and here is the need to be aware of the use of CMake to install CMake applications.

Download Compressed Package cmake-2.8.10.1.tar.gz decompression TAR-ZXVF cmake-2.8.10.1.tar.gz get file cmake-2.8.10.1 into CD cmake-2.8.10.1 < us now The outer layer establishes the catalogue mkdir cmake_exe>

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

3> good to be here. Our CMake has been installed successfully, enter MYSQL-5.6.4-M7 CD/USR/LOCAL/MYSQL-5.6.4-M7 < Assume the outer layer has been established mysql>

4> is executed according to the transformation relationship:

Cmake-dcmake_install_prefix=/usr/local/mysql Carriage return Note sometimes prompts: Said no this cmake this command, but CMake just we did install, it does not matter, to fill it with the path on the line: EX Port Path=/home/houqingdong/cmake_exe/bin: $PATH and run it again.

5>make make install will see a prompt for installation success after execution

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 while I was executing, because sudo needed the password, but after I typed it, it prompted me to say that the MySQL user is not in the Sudoers folder:

So it goes back to root, execution: Visudo the root all= (all), plus the following: MySQL all= (All) It root all permissions of the user

After the execution of the above can be done: sudo./mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data/--user=mysql

8> copy MySQL's profile and service files under 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 Add to power-on self-boot (chkconfig--add mysqld)

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

11> to view the startup situation in the process Ps-ef | grep mysqld

From the inside you can see that MySQL started for root users can also see the installation directory and the port number, and so on.

12> Link to database:

Well, today the bumps are finally installed, but there are some of the process did not understand, such as permission issues, licensing issues, and then reload tomorrow, if there are changes or additions to the place to add. '

It could be in CMake. -dcmake_install_prefix= ... The problem arises when:

Could not find Curses (missing curses_library Curses_include_path

Workaround:

[Root@localhost software]# CD mysql-5.5.11
[Root@localhost 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 appropriate package,

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


--Configuring incomplete, Errors occurred!
[Root@localhost mysql-5.5.11]# RM CMakeCache.txt
[Root@localhost mysql-5.5.11]# Yum Install Ncurses-devel
Warning:bison executable not found in PATH
--Configuring done
--Generating done
--Build the files have been written to:/software/mysql-5.5.11
[root@localhost mysql-5.5.11]# Yum Install Bison

Follow the prompts to go on it!!

There are a few questions to be achieved by doing it:
1. There is no point behind the cmake of step fourth, which is directly a space
2. The seventh step to execute under the root of the command is Visudo
3. I think the seventh step should be executed under root, otherwise the Mysql.plugin file cannot be found
In a word, I really appreciate it!

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.