Compile installation or MySQL startup errors encountered in the small note

Source: Internet
Author: User

Errors encountered in compiling the installation:
Go to MySQL Directory

[Email protected] software]# CD mysql-5.6.19

[Email protected] mysql-5.5.11]# CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/home/mydb-dmysql_unix_addr=/home/mydb/mysqld.sock- Dwith_innobase_storage_engine=1-denabled_local_infile=1-dmysql_tcp_port=3306-dextra_charsets=all-dmysql_user= Mysql

The following error message appears:

--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!

Workaround:

[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

[[email protected] mysql-5.5.11]# make && make install
The compilation is complete.

Initialize Data scripts/mysql_install_db--user=mysql--datadir=/home/mydb

MySQL Startup encountered error:

[[Email protected] mysql]# service MySQL restart
Starting MySQL ... The server quit without updating PID file (/usr/local/mysql/data/snsgou.pid). Failed

1. Data directory may not have write permission
Workaround: Give permission, execute "chown-r mysql:mysql/var/data" "Chmod-r 755/usr/local/mysql/data" and restart mysqld!
2. The MySQL process may already exist in the process
WORKAROUND: Use the command "Ps-ef|grep mysqld" to see if there is a mysqld process, kill with "kill-9 process number" and then restart mysqld!
3, may be the second time to install MySQL on the machine, there are residual data affect the start of the service.
Workaround: Go to MySQL Data Catalog/data to see if there are mysql-bin.index files. Just get rid of it, it's the culprit.

4, MySQL will use the/ETC/MY.CNF configuration file when the configuration file is not specified at startup, please open this file to see if there is a specified data directory (DATADIR) under the [Mysqld] section.
WORKAROUND: Please set this line under [mysqld]: DataDir =/usr/local/mysql/data

5. skip-federated field Problem
Workaround: Check the/etc/my.cnf file for any skip-federated fields that have not been commented out, and if so, comment them out immediately.

6. The InnoDB shared tablespace ibdata file may have been redefined in my.cnf, and InnoDB data storage file already exists in the data directory Ibdata
WORKAROUND: Delete the file that begins with InnoDB IB and then restart MYSQLD

[[Email protected] ~]# service mysqld start
Starting MySQL. The server quit without updating PID file (/home/mydb/mysql.master.com.pid). Failed

There is a problem with the old/etc/my.cnf file

Compile installation or MySQL startup errors encountered in the small note

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.