Mysql 5.6.24 installation instance tutorial, mysql5.6.24
Preparations before installation:
1) edit the PATH
vim /etc/profilePATH=/home/mysql/bin:/home/mysql/lib:$PATHexport PATH
2) Effective PATH
source /etc/profile
3) EDIT hosts
vim /etc/hosts192.168.117.130 cc-test
Install
1. Environment Configuration
yum install - y gcc gcc-c++ make cmake
2. install the package mysql-5.6.24.tar.gz and copy it to the/home directory.
Rz
3. Unzip the installation package and rename it
tar -zxvf mysql-5.6.2.tar.gzmv mysql-5.6.2.tar.gz mysql
4. New user groups and users
groupadd mysqluseradd mysql -g mysql
5. Create data
mkdir /home/mysql/data
6. Compile mysql
cmake \-DCMAKE_INSTALL_PREFIX=/home/mysql \-DMYSQL_UNIX_ADDR=/home/mysql/mysql.sock \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DWITH_MYISAM_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_ARCHIVE_STORAGE_ENGINE=1 \-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \-DWITH_MEMORY_STORAGE_ENGINE=1 \-DWITH_READLINE=1 \-DENABLED_LOCAL_INFILE=1 \-DMYSQL_DATADIR=/home/mysql/data \-DMYSQL_USER=mysql \-DMYSQL_TCP_PORT=3306
7. Install
make installmake clean
8. Modify the directory owner
chown -R mysql:mysql /home/mysqlchown -R mysql:mysql /home/mysql/data
9. initialize the configuration script
scripts /mysql-install-db --user=nysql --datadir=/home/mysql/data
10. Change permissions again
chown -R mysql:mysql /home/mysql
11. Copy the server startup script
cp /home/mysql/support-files/mysql.server /etc/init.d/mysqlchmod 755 /etc/init.d/mysqlcp /home/mysql/support-files/my-default.cnf /etc/my.cnf
12. Start
service mysqld start
13. Check whether the netstat-anp port is listening.
14. Enter mysql
cd /mysql/bin./mysql -u root -p
Question 1:
[root@cc-test mysql]# cmake .
The following error message is displayed:
-- 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 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)-- Configuring incomplete, errors occurred!
Solution:
[root@cc-test mysql]# rm CMakeCache.txt[root@cc-test mysql]# yum install ncurses-develWarning: Bison executable not found in PATH-- Configuring done-- Generating done-- Build files have been written to: /software/mysql-5.5.11[root@cc-test mysql]# yum install bison[root@cc-test mysql]# cmake ……[root@cc-test mysql]# make install
Question 2:
[root@cc-test mysql]# scripts/mysql_install_db --user=mysql --datadir=/home/mysql/data-bash: scripts/mysql_install_db: Permission denied
Solution:
[root@cc-test mysql]# chmod 755 scripts/mysql_install_db
Question 3:
PID error during service mysqld start startup
Solution:
chown -R mysql.mysqlsu - mysql-bash-4.1$ (ctrl+d)scripts /mysql.install_db/home/mysql/bin/mysql_safe --user=mysql&/etc/rc.d/init.d/mysqld status/etc/rc.d/init.d/mysqld start
The above section describes the Mysql 5.6.24 installation tutorial. I hope it will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!