Linux installation of mysql-5.6.4 graphic tutorial

Source: Internet
Author: User
Tags localhost mysql

Before starting the installation, first describe the difference between the mysql-5.6.4 and the lower version in the installation, from the mysql-5.5, mysql source code installation began to use cmake, so when we configure the installation directory. /configure -- perfix = /..... there will be some differences from the previous ones, which we will mention later.

I. Decompress mysql-5.6.4-m7-tar.zip

1> the unzip mysql-5.6.4-m7-tar.zip will generate a compressed file named mysql-5.6.4-m7-tar.gz

2> the tar-zxvf mysql-5.6.4-m7-tar.gz generates a folder for the mysql-5.6.4-m7

Next, we need to configure the installation directory for specific installation. here we need to note that the cmake application needs to be installed when using cmake.

Download the compressed package cmake-2.8.10.1.tar.gz unzip tar-zxvf cmake-2.8.10.1.tar.gz to get the file cmake-2.8.10.1 into the cd cmake-2.8.10.1 <we now create the directory mkdir cmake_exe on the outer layer>

(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 the mysql-5.6.4-m7 cd/usr/local/mysql-5.6.4-m7 <assuming that mysql has been created in the outer layer>

4> run the following command based on the Conversion Relationship:

Cmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql Press enter. Note that sometimes a prompt is displayed, saying that the cmake command is not used, but the cmake command has just been installed. It doesn't matter, just fill it in the PATH: export PATH =/home/houqingdong/cmake_exe/bin: $ PATH and then run it.

5> after the make install command is executed, a prompt indicating successful installation is displayed.

6> useradd mysql creates a user named mysql.

7> install the default database: Run (su-mysql) cd/usr/local/mysql/scripts/as mysql/

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

Here, I encountered an error during execution because the password is required to execute sudo, but after I enter it, it prompts me That the mysql user is not in the sudoers Folder:

Then return to the root user and execute: mongodo add mysql ALL = (ALL) ALL to the row root user.

After execution, run the above command: sudo./mysql_install_db -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/data/-- user = mysql.

8> copy the mysql configuration file and service file to the System Configuration path.

Cpmy-medium.config/etc/my. conf cp mysql. server/etc/init. d/mysqld

9> start the service

Service mysqld start |/etc/init. d/mysql start add to start automatically (chkconfig -- add mysqld)

10> Add the mysql root User password: mysql-u root password 'your _ password

11> View startup status in the process ps-ef | grep mysqld

From this, we can see that mysql is started as the root user, and the installation directory and port number are also displayed.

12> link to the database:

Well, today we are finally able to settle down, but some of the processes have not been understood, such as permission issues and authorization issues. We will uninstall and reinstall them tomorrow, if there are any changes or additions, add them. '

This problem may also occur when cmake.-DCMAKE_INSTALL_PREFIX =:

Cocould NOT find Curses (missing CURSES_LIBRARY CURSES_INCLUDE_PATH

Solution:

[Root @ localhost software] # cd mysql-5.5.11
[Root @ localhost mysql-5.5.11] # cmake.
-- Cocould 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 is libncurses5-dev, on Redhat and derivates it is 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)


-- Refreshing 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
-- Processing ing done
-- Generating done
-- Build files have been written to:/software/mysql-5.5.11
[Root @ localhost mysql-5.5.11] # yum install bison

Follow the prompts !!

As shown in the following figure, there are several issues:
1. There is no dot behind the cmake in Step 4, which is a space.
2. In Step 7, the Command executed under root is mongodo.
3. I think step 7 should be executed under the root user; otherwise, the mysql. plugin file cannot be found.
In short, thank you very much!

Related Article

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.