Mysql Common Errors During source code compilation and installation in linux

Source: Internet
Author: User

(1)
#./Configure -- prefix =/usr/local/mysql-5.1.54
(Mysql specified path installation error :)
As follows:
Checking for termcap functions library... configure: error: No curses/termcap library found
Installation:
Ncurses-devel. ***. rpm package solution
# Cd/media/CentOS_5.5_Final/CentOS/
# Ls ncurses-devel *
Find the package and install it with rpm.
# Rpm-ivh ncurses-devel-5.5-24.20060715.i386.rpm
(Download to download an ncurses-5.6.tar.gz,
Wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz unzip and install)

(2)
Make Error
../Depcomp: line 571: exec: g ++: not found
Make [1]: *** [my_new.o] Error 127
Make [1]: Leaving directory '/usr/local/src/mysql/mysql-5.1.32/mysys'
Make: *** [all-recursive] Error 1
Solution:
# Yum install gcc-c ++ can solve the problem.
Re-specify the installation path:
#./Configure -- prefix =/usr/local/mysql-5.0.90
Make
Make install
?

(3)
An error occurred while initializing the database:
# Scripts/mysql_install_db -- user = mysql
Or
# Bin/mysql_install_db -- basedir =/usr/local/mysql-5.1.54 -- datadir =/usr/local/mysql-5.1.54/data -- user = mysql
[Warning] '-- skip-locking' is deprecated and will be removed in a ure release. Please use' -- skip-
External-locking 'instead.
?
(Solution: replace '-- skip-locking' in my. cnf with '-- skip-external-locking .)
?
(4) modify the/etc/my. cnf configuration file:
[Client]
# Password = your_password
Port = 3306
Socket =/tmp/mysql. sock
# Here follows entries for some specific programs
# The MySQL server
[Mysqld]
Port = 3306
Socket =/tmp/mysql. sock
Basedir =/usr/local/mysql-5.1.54
Datadir =/usr/local/mysql-5.1.54/data
Skip-external-locking
Key_buffer_size = 16 M
Max_allowed_packet = 1 M
Table_open_cache = 64
Sort_buffer_size = 512 K
Net_buffer_length = 8 K
Read_buffer_size = 256 K
Read_rnd_buffer_size = 512 K
Myisam_sort_buffer_size = 8 M
[Mysql]
No-auto-rehash
# Remove the next comment character if you are not familiar with SQL
# Safe-updates

(V. Tips :)
When an error occurs, you can view the error log in time:
Vi/usr/local/mysql-5.1.54/data/localhost. localdomain. err
Shown as follows:
110107 22:06:31 mysqld_safe Starting mysqld daemon with databases from/usr/local/mysql-5.1.54/data
110107 22:06:31 [Warning] '-- skip-locking' is deprecated and will be removed in a future release. Please use
'-- Skip-external-locking' instead.
/Usr/local/mysql-5.1.54/libexec/mysqld: Table 'mysql. In in 'doesn' t exist
110107 22:06:31 [ERROR] Can't open the mysql. plugin table. Please run mysql_upgrade to create it.
110107 22:06:31 [ERROR] Can't start server: Bind on unix socket: No such file or directory
110107 22:06:31 [ERROR] Do you already have another mysqld server running on socket: var/lib/mysql. sock
?
110107 22:06:31 [ERROR] Aborting
?
Conclusion 1:
Mysql startup method:
(1)
# Cd/usr/local/mysql-5.1.54/libexec
#./Mysqld -- defaults-file = ../my. cnf -- user = mysql
(2)
# D/usr/local/mysql-5.1.54/bin
#./Mysqld_safe -- defaults-file = ../my. cnf -- user = mysql
(3)
# Mysql-S/tmp/mysql. sock
(4)
# Cd/usr/local/mysql-5.1.54/share/mysql
#./Mysql. server start
(You can add mysql to the system service)
# Cp./mysql. server/etc/init. d/mysql
# Chkconfig -- add mysql
# Service mysql start

 

This article is from "Cui yuanrong Learning Technology"

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.