安装Mysql5.5.10服务,提供公司XXXX测试环境。正式环境也采用该版本的mysql
PC机:IntelE5300 内存4G 硬盘500G
Mysql5.5.10
cmake2.8.3
2.1.安装cmake
shell>tar zxvf cmake-2.8.3.tar.gz
shell>cd cmake-2.8.3
shell>./configure
shell>make
shell>make install
2.2.安装mysql
shell>tar zxvf mysql-5.5.10.tar.gz
shell>cd mysql-5.5.10
shell>cmake . \
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql \
-DCOMMUNITY_BUILD:BOOL=ON \
-DENABLED_PROFILING:BOOL=ON \
-DENABLE_DEBUG_SYNC:BOOL=OFF \
-DINSTALL_LAYOUT:STRING=STANDALONE \
-DMYSQL_DATADIR:PATH=/usr/local/mysql/data \
-DMYSQL_MAINTAINER_MODE:BOOL=OFF \
-DWITH_EMBEDDED_SERVER:BOOL=ON \
-DWITH_EXTRA_CHARSETS:STRING=all \
-DWITH_SSL:STRING=bundled \
-DWITH_UNIT_TESTS:BOOL=OFF \
-DWITH_ZLIB:STRING=bundled \
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_COMMENT=dancebear \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-LH
shell>make && make install
shell>groupadd mysql
shell>useradd -g mysql mysql
shell>mkdir /usr/local/mysql/conf
shell>mkdir /usr/local/mysql/var
shell>cd /usr/local/mysql
shell>cp support-files/my-huge.cnf conf/my.cnf
shell>chown -R root:mysql /usr/local/mysql
shell>/usr/local/mysql/scripts/mysql_install_db--basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --skip-name-resolve--user=mysql --defaults-file=/usr/local/mysql/conf/my.cnf--pid-file=/usr/local/mysql/var/mysql.pid--socket=/usr/local/mysql/var/mysql.sock
shell>ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
shell>ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/
shell>ln -s /usr/local/mysql/bin/mysqld_safe /usr/bin/
shell>ln -s /usr/local/mysql/share/mysql/mysql.server/usr/bin/
shell>ln -s /usr/local/mysql/bin/mysqldump /usr/bin/
shell>cp /usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld
shell>chmod 755 /etc/init.d/mysqld
shell>chkconfig –-add mysqld
shell>chkconfig –-level 345 mysqld on
修改配置文件/etc/init.d/mysqld,添加安装mysql的路径
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
可以使用以下命令启停mysql服务或查看当前mysql服务状态
shell>/etc/init.d/mysqld start
shell>/etc/init.d/mysqld stop
shell>/etc/init.d/mysqld status
[root@ldap-mysql-svn-trac test]# mysqladmin-uroot password 'mysql'
3.3.错误解决
110331 11:55:00 mysqld_safe Starting mysqld daemon with databasesfrom /usr/local/mysql/data
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
110331 11:55:00 [ERROR] Can't open the mysql.plugin table. Pleaserun mysql_upgrade to create it.
110331 11:55:00 InnoDB: The InnoDB memory heap is disabled
110331 11:55:00 InnoDB: Mutexes and rw_locks use InnoDB's ownimplementation
110331 11:55:00 InnoDB: Compressed tables use zlib 1.2.5
110331 11:55:00 InnoDB: Initializing buffer pool, size = 128.0M
110331 11:55:00 InnoDB: Completed initialization of buffer pool
110331 11:55:00 InnoDB: highest supported file format is Barracuda.
110331 11:55:00 InnoDB:Waiting for the background threads to start
110331 11:55:01 InnoDB: 1.1.5 started; log sequence number 1595675
110331 11:55:01 [ERROR] /usr/local/mysql/bin/mysqld: unknown option'--skip-locking'
110331 11:55:01 [ERROR] Aborting
110331 11:55:01 InnoDB:Starting shutdown...
110331 11:55:02 InnoDB:Shutdown completed; log sequence number 1595675
110331 11:55:02 [Note] /usr/local/mysql/bin/mysqld: Shutdowncomplete
【解决方案】:
[root@ldap-mysql-svn-trac mysql]# scripts/mysql_install_db--user=mysql
Installing MySQL system tables...
110331 13:21:15 [ERROR] ./bin/mysqld: unknown option'--skip-locking'
110331 13:21:15 [ERROR] Aborting
110331 13:21:15 [Note] ./bin/mysqld: Shutdown complete
Installation of system tables failed! Examine the logs in
./data for more information.
You can try to start the mysqld daemon with:
shell> ./bin/mysqld--skip-grant &
and use the command line tool ./bin/mysql
to connect to the mysql database and look at the grant tables:
shell> ./bin/mysql-u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the ./bin/mysqlbug script!
然后,servicemysqld start
[root@ldap-mysql-svn-tracmysql]# service mysqld start
StartingMySQL.[ OK ]
[root@ldap-mysql-svn-tracmysql]#
分享到:
相关推荐
Centos5.4环境安装Oracle11G
centos5.4+oracle安装图解
centos 5.4 zimbra安装部署
CentOS5.4简易安装NginxPHPMysql.pdf
CentOS 5.4 下安装oracle10g
本文档是MySQL官方文档,内容是如何在Centos7环境下用yum工具安装MySQL8。
centos5.4下的DNS配置详解
CentOS 5.4版本(CentOS-5.4-x86_64-bin-DVD)适用于x86_64,必须集齐5个文件才能一起解压缩使用,5个文件下载地址: ...自2004年3月以来,CentOS Linux一直是社区驱动的开源项目,旨在与RHEL在功能上兼容。
CentOS 5.4安装方法 ---------------- 1、 什么是CentOS,请参见http://www.21andy.com/blog/20070125/572.html 2、 制作CentOS 5.4引导U盘 a) 准备U盘,带引导功能,最好是软盘模式。 b) 下载...
centos7.0安装mysql centos7.0安装mysql centos7.0安装mysql
CentOS5.4下安装与配置vsftpd服务器
centOS 5.4安装oracle10g远程图形界面安装 运用服务器的vnc服务 来进行远程的安装oracle 客户端也安装好vnc_viewer
针对在CentOS7.1编译安装mysql-5.7.7遇到各种各样的困难的人,或许有点作用
CentOS7.4环境安装MySQL5.7步骤,包括环境准备,依赖包的安装等
CentOs5.4下安装Oracle10g的参考文档
CentOS6.5 一键安装 Mysql5.6 包含安装包
CentOS 5.4版本(CentOS-5.4-x86_64-bin-DVD)适用于x86_64,必须集齐5个文件才能一起解压缩使用,5个文件下载地址: ...自2004年3月以来,CentOS Linux一直是社区驱动的开源项目,旨在与RHEL在功能上兼容。
centos7.9 自动安装mysql8.0.33,附带脚本
centos5.4安装oracle10G
centos7安装配置mysql5.7教程全