发布时间:2014-09-05 17:02:06作者:知识屋
(一)
#./configure --prefix=/usr/local/mysql-5.1.54
(mysql指定路径安装报错:)
如下:
checking for termcap functions library... configure: error: No curses/termcap library found
安装:
ncurses-devel.***.rpm 包解决
#cd /media/CentOS_5.5_Final/CentOS/
#ls ncurses-devel*
找到这个包并用rpm安装。
# rpm -ivh ncurses-devel-5.5-24.20060715.i386.rpm
(或者去下载一个ncurses-5.6.tar.gz,
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz 解压并安装)
(二)
make时出错
../depcomp: line 571: exec: g++: not found
make[1]: *** [my_new.o] 错误 127
make[1]: Leaving directory `/usr/local/src/mysql/mysql-5.1.32/mysys`
make: *** [all-recursive] 错误 1
解决:
#yum install gcc-c++ 可解决问题。
重新指定安装路径:
#./configure --prefix=/usr/local/mysql-5.0.90
make
make install
?
(三)
初始化数据库时出错:
# scripts/mysql_install_db --user=mysql
或
#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 future release. Please use '--skip-
external-locking' instead.
?
(解决方法:将my.cnf 中的'--skip-locking' 换成'--skip-external-locking' 就可以了。)
?
(四)修改/etc/my.cnf 的配置文件:
[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 = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
(五:提示:)
出错时,可及时查看错误日志:
vi /usr/local/mysql-5.1.54/data/localhost.localdomain.err
显示如下:
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.plugin' 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/mysql.sock
?
110107 22:06:31 [ERROR] Aborting
?
小结1:
mysql 的启动方式:
(1)
#cd /usr/local/mysql-5.1.54/libexec
#./mysqld --defaults-file=../my.cnf --user=mysql
(2)
#cd /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
(可以将mysql添加的系统服务中)
#cp ./mysql.server /etc/init.d/mysql
#chkconfig --add mysql
#service mysql start
本文出自“崔元荣学技术”
linux一键安装web环境全攻略 在linux系统中怎么一键安装web环境方法
Linux网络基本网络配置方法介绍 如何配置Linux系统的网络方法
Linux下DNS服务器搭建详解 Linux下搭建DNS服务器和配置文件
对Linux进行详细的性能监控的方法 Linux 系统性能监控命令详解
linux系统root密码忘了怎么办 linux忘记root密码后找回密码的方法
Linux基本命令有哪些 Linux系统常用操作命令有哪些
Linux必学的网络操作命令 linux网络操作相关命令汇总
linux系统从入侵到提权的详细过程 linux入侵提权服务器方法技巧
linux系统怎么用命令切换用户登录 Linux切换用户的命令是什么
在linux中添加普通新用户登录 如何在Linux中添加一个新的用户
2012-07-10
CentOS 6.3安装(详细图解教程)
Linux怎么查看网卡驱动?Linux下查看网卡的驱动程序
centos修改主机名命令
Ubuntu或UbuntuKyKin14.04Unity桌面风格与Gnome桌面风格的切换
FEDORA 17中设置TIGERVNC远程访问
StartOS 5.0相关介绍,新型的Linux系统!
解决vSphere Client登录linux版vCenter失败
LINUX最新提权 Exploits Linux Kernel <= 2.6.37
nginx在网站中的7层转发功能