In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
There are many ways to install MySQL, either using the RPM package binary or compiling and installing using source code. Obviously, the advantage of compiling and installing is the ability to customize the MySQL database to be used.
It is suitable for specific operating systems, specific applications, and specific MySQL functional requirements. Therefore, a compilation and installation process of MySQL 5.6 for REHL 6.4 is documented here.
1. Check and uninstall the low version of Mysql that comes with the operating system.
[root@arbiter] # uname-a
Linux arbiter 2.6.32-358.el6.x86_64 # 1 SMP Tue Jan 29 11:47:41 EST 2013 x86 "64 GNU/Linux
[root@arbiter ~] # cat / etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[root@arbiter ~] #
[root@arbiter ~] # cat / etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
#:: 1 localhost6.localdomain6 localhost6
192.168.144.111 arbiter
[root@arbiter ~] #
[root@arbiter cmake-2.8.10.2] # rpm-qa | grep mysql
Mysql-libs-5.1.66-2.el6_3.x86_64
[root@arbiter cmake-2.8.10.2] # rpm-e-nodeps mysql-libs
[root@arbiter cmake-2.8.10.2] # rpm-qa | grep mysql
[root@arbiter cmake-2.8.10.2] #
2. Check the operating system dependency packages necessary for MySQL compilation and installation
Rpm-Q-- qf'% {NAME} -% {VERSION} -% {RELEASE} (% {ARCH})\ n 'make\
Gcc-c++\
Libstdc++-devel\
Ncurses-devel
[root@arbiter ~] # rpm-Q-qf'% {NAME} -% {VERSION} -% {RELEASE} (% {ARCH})\ n 'make\
> gcc-c++\
> libstdc++-devel\
> ncurses-devel
Make-3.81-20.el6 (x86 / 64)
Package gcc-c++ is not installed
Package libstdc++-devel is not installed
Package ncurses-devel is not installed
[root@arbiter ~] #
3. Install the operating system dependency packages necessary for MySQL compilation and installation
-- Mount the system image to configure the local yum source
[root@arbiter ~] # mount / dev/cdrom / mnt
Mount: block device / dev/sr0 is write-protected, mounting read-only
[root@arbiter yum.repos.d] # cat local.repo
[local]
Name = local
Baseurl= file:///mnt/
Enabled = 1
Gpgcheck = 0
Gpgkey = file://mnt/RPM-GPG-KEY-CentOS-6
[root@arbiter yum.repos.d] #
[root@arbiter yum.repos.d] # yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: InstallMedia base extras local updates
Cleaning up Everything
[root@arbiter yum.repos.d] #
Use yum to install rpm packages that are missing from the operating system
Yum-y install gcc-c++
Ncurses-devel ncurses-devel
4. Upload, extract and install cmake
[root@arbiter ~] # ls
Anaconda-ks.cfg cmake-2.8.10.2.tar Documents install.log Music pkg rpms test
Desktop Downloads install.log.syslog Pictures Public Templates Videos
[root@arbiter ~] # tar-xvf cmake-2.8.10.2.tar
-- install cmake
[root@arbiter cmake-2.8.10.2] # pwd
/ root/cmake-2.8.10.2
[root@arbiter cmake-2.8.10.2] #. / configure. -- Performing Test run_pic_test
-- Performing Test run_pic_test-Success
-- Configuring done
-- Generating done
-- Build files have been written to: / root/cmake-2.8.10.2
-
CMake has bootstrapped. Now run gmake.
[root@arbiter cmake-2.8.10.2] #
[root@arbiter cmake-2.8.10.2] # pwd
/ root/cmake-2.8.10.2
[root@arbiter cmake-2.8.10.2] # gmake
.
[99%] Built target foo
Scanning dependencies of target memcheck_fail
[100%] Building C object Tests/CTestTestMemcheck/CMakeFiles/memcheck_fail.dir/ret1.c.o
Linking C executable memcheck_fail
[100%] Built target memcheck_fail
Scanning dependencies of target pseudo_BC
[100%] Building C object Tests/CTestTestMemcheck/CMakeFiles/pseudo_BC.dir/ret0.c.o
Linking C executable BC
[100%] Built target pseudo_BC
Scanning dependencies of target pseudo_purify
[100%] Building C object Tests/CTestTestMemcheck/CMakeFiles/pseudo_purify.dir/ret0.c.o
Linking C executable purify
[100%] Built target pseudo_purify
Scanning dependencies of target pseudo_valgrind
[100%] Building C object Tests/CTestTestMemcheck/CMakeFiles/pseudo_valgrind.dir/ret0.c.o
Linking C executable valgrind
[100%] Built target pseudo_valgrind
[root@arbiter cmake-2.8.10.2] #
[root@arbiter cmake-2.8.10.2] # pwd
/ root/cmake-2.8.10.2
[root@arbiter cmake-2.8.10.2] # gmake install
.
-- Installing: / usr/local/doc/cmake-2.8/cpack.docbook
-- Installing: / usr/local/doc/cmake-2.8/ccmake.docbook
-- Installing: / usr/local/share/aclocal/cmake.m4
-- Installing: / usr/local/share/cmake-2.8/editors/vim/cmake-help.vim
-- Installing: / usr/local/share/cmake-2.8/editors/vim/cmake-indent.vim
-- Installing: / usr/local/share/cmake-2.8/editors/vim/cmake-syntax.vim
-- Installing: / usr/local/share/cmake-2.8/editors/emacs/cmake-mode.el
-- Installing: / usr/local/share/cmake-2.8/completions/cmake
-- Installing: / usr/local/share/cmake-2.8/completions/cpack
-- Installing: / usr/local/share/cmake-2.8/completions/ctest
[root@arbiter cmake-2.8.10.2] #
5. Create mysql users
Groupadd-g 20000 mysql useradd-u 20000-g mysql mysql [root@arbiter ~] # groupadd-g 20000 mysql
[root@arbiter] # useradd-u 20000-g mysql mysql
6. Create the mysql installation directory and authorize mkdir-p / application/mysql-5.6 mkdir-p / application/mysql-5.6/data
Mkdir-p / application/mysql-5.6/log
Mkdir-p / application/mysql-5.6/tmp
Chown-R mysql:mysql / application/ chown-R mysql:mysql / application/mysql-5.6/tmp/
Chown-R mysql:mysql / application/mysql-5.6/log/
Chmod 775 / application/mysql-5.6/log/
Chmod 1771 / application/mysql-5.6/tmp/
Chown-R 775 / application/ chmod 1777 / tmp
7. Upload and decompress MySQL and compile and install [root@arbiter ~] # ls
Anaconda-ks.cfg cmake-2.8.10.2.tar Documents install.log Music Pictures Public Templates Videos
Cmake-2.8.10.2 Desktop Downloads install.log.syslog mysql-5.6.36.tar.gz pkg rpms test
[root@arbiter ~] #
[root@arbiter ~] # gunzip mysql-5.6.36.tar.gz
[root@arbiter ~] # ls
Anaconda-ks.cfg cmake-2.8.10.2.tar Documents install.log Music Pictures Public Templates Videos
Cmake-2.8.10.2 Desktop Downloads install.log.syslog mysql-5.6.36.tar pkg rpms test
[root@arbiter ~] # tar-xvf mysql-5.6.36.tar
[root@arbiter ~] # ls
Anaconda-ks.cfg cmake-2.8.10.2.tar Documents install.log Music mysql-5.6.36.tar pkg rpms test
Cmake-2.8.10.2 Desktop Downloads install.log.syslog mysql-5.6.36 Pictures Public Templates Videos
[root@arbiter ~] #
-- set the environment variable echo 'export PATH=/application/mysql/bin:$PATH' > / etc/profile of mysql | tail-1 / etc/profile source / etc/profile echo $PATH [root@arbiter ~] # echo' export PATH=/application/mysql/bin:$PATH' > > / etc/profile |
> tail-l / etc/profile
If ["${- # * I}"! = "$-"]; then
. "$I"
Else
. "$I" > / dev/null 2 > & 1
Fi
Fi
Done
Unset i
Unset-f pathmunge
[root@arbiter ~] # source / etc/profile
[root@arbiter ~] # echo $PATH
/ application/mysql/bin:/opt/mongo/mongosoft/bin:/home/mongo/Documents/maven/bin:/usr/java/jdk1.8.0_11/bin/:/opt/mongo/ycsb/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@arbiter ~] #
-- compile MySQL and check cmake [root@arbiter ~] # ls-1 / usr/local/bin/cmake
-rwxr-xr-x 1 root root 9188179 Jul 27 00:10 / usr/local/bin/cmake
[root@arbiter ~] #
-- compiling MySQL source code cmake. -DCMAKE_INSTALL_PREFIX=/application/mysql-5.6\-DMYSQL_DATADIR=/application/mysql-5.6/data\-DMYSQL_UNIX_ADDR=/application/mysql-5.6/tmp/mysql.sock\-DDEFAULT_CHARSET=utf8\-DDEFAULT_COLLATION=utf8_general_ci\-DEXTRA_CHARSETS=gbk,gb2312,utf8 Ascii\-DENABLED_LOCAL_INFILE=ON\-DWITH_INNOBASE_STORAGE_ENGINE=1\-DWITH_FEDERATED_STORAGE_ENGINE=1\-DWITH_BLACKHOLE_STORAGE_ENGINE=1\-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1\-DWITHOUT_PARTITION_STORAGE_ENGINE=0\-DWITH_FAST_MUTEXES=1\-DWITH_ZLIB=bundled\-DENABLED_LOCAL_INFILE=1\-DWITH_READLINE=1\-DWITH_EMBEDDED_SERVER=1\-DWITH_DEBUG=0\-DMYSQL_TCP_PORT=3306 [root@arbiter mysql-5.6.36] # cmake. -DCMAKE_INSTALL_PREFIX=/application/mysql-5.6\
>-DMYSQL_DATADIR=/application/mysql-5.6/data\
>-DMYSQL_UNIX_ADDR=/application/mysql-5.6/tmp/mysql.sock\
>-DDEFAULT_CHARSET=utf8\
>-DDEFAULT_COLLATION=utf8_general_ci\
>-DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii\
>-DENABLED_LOCAL_INFILE=ON\
>-DWITH_INNOBASE_STORAGE_ENGINE=1\
>-DWITH_FEDERATED_STORAGE_ENGINE=1\
>-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
>-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1\
>-DWITHOUT_PARTITION_STORAGE_ENGINE=0\
>-DWITH_FAST_MUTEXES=1\
>-DWITH_ZLIB=bundled\
>-DENABLED_LOCAL_INFILE=1\
>-DWITH_READLINE=1\
>-DWITH_EMBEDDED_SERVER=1\
>-DWITH_DEBUG=0\
>-DMYSQL_TCP_PORT=3306
. -- If you are inside a firewall, you may need to use an https proxy: export https_proxy= http://example.com:80
-- Library mysqlserver depends on OSLIBS-lpthread;m;rt;crypt;dl
-- Skipping deb packaging on unsupported platform.
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: HAVE_CONFIG_H
-- CMAKE_C_FLAGS:-Wall-Wextra-Wformat-security-Wvla-Wwrite-strings-Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS:-Wall-Wextra-Wformat-security-Wvla-Woverloaded-virtual-Wno-unused-parameter
-- CMAKE_C_FLAGS_RELWITHDEBINFO:-O3-g-fabi-version=2-fno-omit-frame-pointer-fno-strict-aliasing-DDBUG_OFF-DMY_PTHREAD_FASTMUTEX=1
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO:-O3-g-fabi-version=2-fno-omit-frame-pointer-fno-strict-aliasing-DDBUG_OFF-DMY_PTHREAD_FASTMUTEX=1
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
WITH_READLINE
-- Build files have been written to: / root/mysql-5.6.36
[root@arbiter mysql-5.6.36] #
-- compiling and installing mysql, which takes a long time. You need to wait patiently for [root@arbiter mysql-5.6.36] # make & & make install. -- Installing: / application/mysql-5.6/sql-bench/crash-me
-- Installing: / application/mysql-5.6/sql-bench/README
-- Installing: / application/mysql-5.6/sql-bench/test-big-tables
-- Installing: / application/mysql-5.6/sql-bench/innotest2
-- Installing: / application/mysql-5.6/sql-bench/run-all-tests
-- Installing: / application/mysql-5.6/sql-bench/test-connect
-- Installing: / application/mysql-5.6/sql-bench/test-alter-table
-- Installing: / application/mysql-5.6/sql-bench/test-wisconsin
[root@arbiter mysql-5.6.36] #-make soft connection ln-s / application/mysql-5.6 / application/mysql [root@arbiter mysql-5.6.36] # ln-s / application/mysql-5.6 / application/mysql
[root@arbiter mysql-5.6.36] #
-- create and edit the control file of mysql [root@arbiter ~] # vi / etc/my.cnf
[root@arbiter ~] # cat / etc/my.cnf
[mysqld]
Datadir=/application/mysql-5.6/data
Socket=/application/mysql-5.6/tmp/mysql.sock
User=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
Symbolic-links=0
[mysqld_safe]
Log-error=/application/mysql-5.6/log/mysqld.log
Pid-file=/application/mysql-5.6/run/mysqld/mysqld.pid
[root@arbiter ~] #
-- initialize mysql database [root@arbiter ~] # cd / application/mysql
[root@arbiter mysql] # cd scripts/
[root@arbiter scripts] # ls
Mysql_install_db
[root@arbiter scripts] # pwd
/ application/mysql/scripts
[root@arbiter scripts] # ls
Mysql_install_db
[root@arbiter scripts] # / mysql_install_db-- basedir=/application/mysql-- datadir=/application/mysql/data/-- user=mysql
Installing MySQL system tables...2017-07-27 00:53:16 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).
2017-07-27 00:53:16 0 [Note] Ignoring-- secure-file-priv value as server is running with-- bootstrap.
2017-07-27 00:53:16 0 [Note] / application/mysql/bin/mysqld (mysqld 5.6.36) starting as process 27357.
2017-07-27 00:53:16 27357 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-07-27 00:53:16 27357 [Note] InnoDB: The InnoDB memory heap is disabled
2017-07-27 00:53:16 27357 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-07-27 00:53:16 27357 [Note] InnoDB: Memory barrier is not used
2017-07-27 00:53:16 27357 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-07-27 00:53:16 27357 [Note] InnoDB: Using CPU crc32 instructions
2017-07-27 00:53:16 27357 [Note] InnoDB: Initializing buffer pool, size = 128.0m
2017-07-27 00:53:16 27357 [Note] InnoDB: Completed initialization of buffer pool
2017-07-27 00:53:16 27357 [Note] InnoDB: The first specified data file. / ibdata1 did not exist: a new database to be created!
2017-07-27 00:53:16 27357 [Note] InnoDB: Setting file. / ibdata1 size to 12 MB
2017-07-27 00:53:16 27357 [Note] InnoDB: Database physically writes the file full: wait...
2017-07-27 00:53:16 27357 [Note] InnoDB: Setting logfile. / ib_logfile101 size to 48 MB
2017-07-27 00:53:16 27357 [Note] InnoDB: Setting logfile. / ib_logfile1 size to 48 MB
2017-07-27 00:53:16 27357 [Note] InnoDB: Renaming logfile. / ib_logfile101 to. / ib_logfile0
2017-07-27 00:53:16 27357 [Warning] InnoDB: New log files created, LSN=45781
2017-07-27 00:53:16 27357 [Note] InnoDB: Doublewrite buffer not found: creating new
2017-07-27 00:53:16 27357 [Note] InnoDB: Doublewrite buffer created
2017-07-27 00:53:16 27357 [Note] InnoDB: 128rollback segment (s) are active.
2017-07-27 00:53:16 27357 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-07-27 00:53:16 27357 [Note] InnoDB: Foreign key constraint system tables created
2017-07-27 00:53:16 27357 [Note] InnoDB: Creating tablespace and datafile system tables.
2017-07-27 00:53:16 27357 [Note] InnoDB: Tablespace and datafile system tables created.
2017-07-27 00:53:16 27357 [Note] InnoDB: Waiting for purge to start
2017-07-27 00:53:16 27357 [Note] InnoDB: 5.6.36 started; log sequence number 0
2017-07-27 00:53:17 27357 [Note] Binlog end
2017-07-27 00:53:17 27357 [Note] InnoDB: FTS optimize thread exiting.
2017-07-27 00:53:17 27357 [Note] InnoDB: Starting shutdown...
2017-07-27 00:53:18 27357 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2017-07-27 00:53:18 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).
2017-07-27 00:53:18 0 [Note] Ignoring-- secure-file-priv value as server is running with-- bootstrap.
2017-07-27 00:53:18 0 [Note] / application/mysql/bin/mysqld (mysqld 5.6.36) starting as process 27379.
2017-07-27 00:53:18 27379 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-07-27 00:53:18 27379 [Note] InnoDB: The InnoDB memory heap is disabled
2017-07-27 00:53:18 27379 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-07-27 00:53:18 27379 [Note] InnoDB: Memory barrier is not used
2017-07-27 00:53:18 27379 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-07-27 00:53:18 27379 [Note] InnoDB: Using CPU crc32 instructions
2017-07-27 00:53:18 27379 [Note] InnoDB: Initializing buffer pool, size = 128.0m
2017-07-27 00:53:18 27379 [Note] InnoDB: Completed initialization of buffer pool
2017-07-27 00:53:18 27379 [Note] InnoDB: Highest supported file format is Barracuda.
2017-07-27 00:53:18 27379 [Note] InnoDB: 128rollback segment (s) are active.
2017-07-27 00:53:18 27379 [Note] InnoDB: Waiting for purge to start
2017-07-27 00:53:18 27379 [Note] InnoDB: 5.6.36 started; log sequence number 1625977
2017-07-27 00:53:18 27379 [Note] Binlog end
2017-07-27 00:53:18 27379 [Note] InnoDB: FTS optimize thread exiting.
2017-07-27 00:53:18 27379 [Note] InnoDB: Starting shutdown...
2017-07-27 00:53:19 27379 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK
To start mysqld at boot time you have to copy
Support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER!
To do so, start the server, then issue the following commands:
/ application/mysql/bin/mysqladmin-u root password' new-password'
/ application/mysql/bin/mysqladmin-u root-h arbiter password' new-password'
Alternatively you can run:
/ application/mysql/bin/mysql_secure_installation
Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
Cd. ; / application/mysql/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
Cd mysql-test; perl mysql-test-run.pl
Please report any problems at http://bugs.mysql.com/
The latest information about MySQL is available on the web at
Http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
New default config file was created as / application/mysql/my.cnf and
Will be used by default by the server when you start it.
You may edit this file to change server settings
WARNING: Default config file / etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
-- defaults-file argument to mysqld_safe when starting the server
[root@arbiter scripts] #
-- create mysqld and start the mysql database
[root@arbiter support-files] # ls
Binary-configure magic my-default.cnf mysqld_multi.server mysql-log-rotate mysql.server
[root@arbiter support-files] # pwd
/ application/mysql/support-files
[root@arbiter support-files] # cp mysql.server / etc/init.d/mysqld
[root@arbiter support-files] # chmod + x / etc/init.d/mysqld
[root@arbiter support-files] #
[root@arbiter log] # / etc/init.d/mysqld start
Starting MySQL. SUCCESS!
[root@arbiter log] #
-- Log into mysql
[root@arbiter log] # mysql
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 1
Server version: 5.6.36 Source distribution
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql >
Mysql > show databases
+-+
| | Database |
+-+
| | information_schema |
| | mysql |
| | performance_schema |
| | test |
+-+
4 rows in set (0.01sec)
Mysql >
Then you can initialize the security of the business database, data and so on for mysql!
Startup exception 1, related to socket file:
[root@arbiter log] # cat mysqld.log
2017-07-27 01:06:19 28474 [Note] Plugin 'FEDERATED' is disabled.
2017-07-27 01:06:19 28474 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-07-27 01:06:19 28474 [Note] InnoDB: The InnoDB memory heap is disabled
2017-07-27 01:06:19 28474 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-07-27 01:06:19 28474 [Note] InnoDB: Memory barrier is not used
2017-07-27 01:06:19 28474 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-07-27 01:06:19 28474 [Note] InnoDB: Using CPU crc32 instructions
2017-07-27 01:06:19 28474 [Note] InnoDB: Initializing buffer pool, size = 128.0m
2017-07-27 01:06:19 28474 [Note] InnoDB: Completed initialization of buffer pool
2017-07-27 01:06:19 28474 [Note] InnoDB: Highest supported file format is Barracuda.
2017-07-27 01:06:19 28474 [Note] InnoDB: 128rollback segment (s) are active.
2017-07-27 01:06:19 28474 [Note] InnoDB: Waiting for purge to start
2017-07-27 01:06:19 28474 [Note] InnoDB: 5.6.36 started; log sequence number 1626027
2017-07-27 01:06:19 28474 [Note] Server hostname (bind-address):'*'; port: 3306
2017-07-27 01:06:19 28474 [Note] IPv6 is available.
2017-07-27 01:06:19 28474 [Note] -:: 'resolves to'::'
2017-07-27 01:06:19 28474 [Note] Server socket created on IP:.
2017-07-27 01:06:19 28474 [ERROR] Can't start server: Bind on unix socket: Permission denied
2017-07-27 01:06:19 28474 [ERROR] Do you already have another mysqld server running on socket: / application/mysql-5.6/tmp/mysql.sock?
2017-07-27 01:06:19 28474 [ERROR] Aborting
The reason is that there is a problem with the storage directory or permissions of mysql.sock files in my.cnf configuration.
Solution: check whether the path configured by socket exists, and whether the mysql user has read and write permissions under the path specified by socket
Mkdir-p / application/mysql-5.6/tmp chown-R mysql:mysql / application/mysql-5.6/tmp/ chmod 1771 / application/mysql-5.6/tmp/ startup exception II. Log related
[root@arbiter] # / etc/init.d/mysqld start
Starting MySQL.170727 00:56:52 mysqld_safe error: log-error set to'/ application/mysql-5.6/log/mysqld.log', however file don't exists. Create writable for user 'mysql'.
ERROR! The server quit without updating PID file (/ application/mysql-5.6/data/arbiter.pid).
[root@arbiter] #
The reason is that the log directory configured by my.cnf does not exist or the mysql user does not have read and write access to it.
Solution: check whether the relevant path exists and create authorization
Mkdir-p / application/mysql-5.6/log chown-R mysql:mysql / application/mysql-5.6/log/
Chmod 775 / application/mysql-5.6/log/
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.