【澳门金沙vip】Centos 5.伍 安装Mysql五.5进度

Centos5.5中安装Mysql5.5过程分享,centos5.5mysql5.5

这几天在centos下装mysql,这里记录一下安装的过程,方便以后查阅

Mysql5.5.37安装需要cmake,5.6版本开始都需要cmake来编译,5.5以后的版本应该也要装这个。

安装cmake

复制代码 代码如下:

[[email protected]
~]# wget
[[email protected]
~]# tar xvf cmake-2.8.12.2.tar.gz
[[email protected]
~]# cd cmake-2.8.12.2
[[email protected]
cmake-2.8.12.2]#./bootstrap
[[email protected]
cmake-2.8.12.2]# make
[[email protected]
cmake-2.8.12.2]# make install

安装mysql

复制代码 代码如下:

[[email protected]
~]# wget

[[email protected]
~]# tar xvf mysql-5.5.37.tar.gz
[[email protected]
~]# cd mysql-5.5.37
[[email protected]
mysql-5.5.37]# cmake ./

可能还会报这个错,没有就跳过

复制代码 代码如下:

CMake Error at cmake/readline.cmake:83(MESSAGE):
Curses library not found.  Pleaseinstall appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name
islibncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
 cmake/readline.cmake:127 (FIND_CURSES)
 cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT)
 CMakeLists.txt:355 (MYSQL_CHECK_READLINE
— Configuring incomplete, errors occurred!
See also “/root/my/mysql-5.5.37/CMakeFiles/CMakeOutput.log”.
See also”/root/my/mysql-5.5.37/CMakeFiles/CMakeError.log”.

说明centos系统没有ncurses-devel

复制代码 代码如下:

[[email protected]
~]# wget

[[email protected]
~]# cd ncurses-5.9
[[email protected]
ncurses-5.9]#./configure
[[email protected]
ncurses-5.9]# make
[[email protected]
ncurses-5.9]# make install

再删除刚才编译生成的 CMakeCache.txt 文件,否则无法进行下一步

复制代码 代码如下:

[[email protected]
mysql-5.5.37]# rm -f CMakeCache.txt

继续编译mysql

复制代码 代码如下:

[[email protected]
~]# cmake ./
[[email protected]
~]# make
[[email protected]
~]# make install

这样,mysql默认将成功安装到/usr/local/mysql

创建mysql用户组

复制代码 代码如下:

[[email protected]
~]# groupadd mysql
[[email protected]
~]# useradd –r –g mysql mysql
[[email protected]
~]# chown –R mysql.mysql /usr/local/mysql

启动mysql

复制代码 代码如下:

[[email protected]
~]# /usr/local/mysql/bin/mysqld_safe –user=mysql 

这里可能会发生错误,没有就跳过:

复制代码 代码如下:

FATAL ERROR: Could not find./bin/my_print_defaults
If you compiled from source, you need torun ‘make install’ to
copy the software into the correct locationready for operation.
If you are using a binary release, you musteither be at the top
level of the extracted archive, or pass the –basedir option
pointing to that location.

解决方法:

复制代码 代码如下:

[[email protected]
~]# /usr/local/mysql/scripts/mysql_install_db –user=mysql
–basedir=/usr/local/mysql –datadir=/usr/local/mysql/data

再启动mysql

复制代码 代码如下:

[[email protected]
~]# /usr/local/mysql/bin/mysqld_safe –user=mysql

注册mysql服务,开机自动启动

1.设置mysql配置文件到/etc目录

复制代码 代码如下:

[[email protected]
~]# cp /usr/local/mysql/support-files/my-medium.cnf/etc/my.cnf 

2.设置mysql开机自启

复制代码 代码如下:

[[email protected]
~]# cp/usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
[[email protected]
~]# chmod +x /etc/init.d/mysql
[[email protected]
~]# /sbin/chkconfig –add mysql

3.启动mysql服务

复制代码 代码如下:

[[email protected]
~]# service mysql start 

测试mysql是否安装成功

复制代码 代码如下:

[[email protected]
~]# /usr/local/mysql/bin/mysql -u root -p 
Enter password:  
Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 1 
Server version: 5.5.37 Source distribution 
  
Copyright (c) 2000, 2014, Oracle and/or itsaffiliates. All rights
reserved. 
  
Oracle is a registered trademark of OracleCorporation and/or its 
affiliates. Other names may be trademarksof their respective 
owners. 
  
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ toclear the current input
statement. 
  
mysql> show databases; 
+——————–+ 
| Database           | 
+——————–+ 
| information_schema | 
| mysql              | 
| performance_schema | 
| test               | 
+——————–+ 
4 rows in set (0.03 sec) 

这几天在centos下装mysql,这里记录一下安装的过程,方便以后查阅
Mysql5.5.37安装需要cmake,5.6版…

这几天在centos下装mysql,这里记录一下安装的过程,方便以后查阅

Centos5.5中安装Mysql5.5过程分享

这几天在centos下装mysql,这里记录一下安装的过程,方便以后查阅

Mysql5.5.37安装需要cmake,5.6版本开始都需要cmake来编译,5.5以后的版本应该也要装这个。

安装cmake

 

代码如下:

[[email protected]
~]# wget
[[email protected]
~]# tar xvf cmake-2.8.12.2.tar.gz
[[email protected]
~]# cd cmake-2.8.12.2
[[email protected]
cmake-2.8.12.2]#./bootstrap
[[email protected]
cmake-2.8.12.2]# make
[[email protected]
cmake-2.8.12.2]# make install

 

安装mysql

 

代码如下:

[[email protected]
~]# wget

[[email protected]
~]# tar xvf mysql-5.5.37.tar.gz
[[email protected]
~]# cd mysql-5.5.37
[[email protected]
mysql-5.5.37]# cmake ./

 

可能还会报这个错,没有就跳过

 

代码如下:

CMake Error at cmake/readline.cmake:83(MESSAGE):
Curses library not found.  Pleaseinstall appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name
islibncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
 cmake/readline.cmake:127 (FIND_CURSES)
 cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT)
 CMakeLists.txt:355 (MYSQL_CHECK_READLINE
— Configuring incomplete, errors occurred!
See also “/root/my/mysql-5.5.37/CMakeFiles/CMakeOutput.log”.
See also”/root/my/mysql-5.5.37/CMakeFiles/CMakeError.log”.

 

说明centos系统没有ncurses-devel

 

代码如下:

[[email protected]
~]# wget

[[email protected]
~]# cd ncurses-5.9
[[email protected]
ncurses-5.9]#./configure
[[email protected]
ncurses-5.9]# make
[[email protected]
ncurses-5.9]# make install

 

再删除刚才编译生成的 CMakeCache.txt 文件,否则无法进行下一步

 

代码如下:

[[email protected]
mysql-5.5.37]# rm -f CMakeCache.txt

 

继续编译mysql

 

代码如下:

[[email protected]
~]# cmake ./
[[email protected]
~]# make
[[email protected]
~]# make install

 

这样,mysql默认将成功安装到/usr/local/mysql

创建mysql用户组

 

代码如下:

[[email protected]
~]# groupadd mysql
[[email protected]
~]# useradd –r –g mysql mysql
[[email protected]
~]# chown –R mysql.mysql /usr/local/mysql

 

启动mysql

 

代码如下:

[[email protected]
~]# /usr/local/mysql/bin/mysqld_safe –user=mysql  

 

这里可能会发生错误,没有就跳过:

 

代码如下:

FATAL ERROR: Could not find./bin/my_print_defaults
If you compiled from source, you need torun ‘make install’ to
copy the software into the correct locationready for operation.
If you are using a binary release, you musteither be at the top
level of the extracted archive, or pass the –basedir option
pointing to that location.

 

解决方法:

 

代码如下:

[[email protected]
~]# /usr/local/mysql/scripts/mysql_install_db –user=mysql
–basedir=/usr/local/mysql –datadir=/usr/local/mysql/data

 

再启动mysql

 

代码如下:

[[email protected]
~]# /usr/local/mysql/bin/mysqld_safe –user=mysql

 

注册mysql服务,开机自动启动

1.设置mysql配置文件到/etc目录

 

代码如下:

[[email protected]
~]# cp /usr/local/mysql/support-files/my-medium.cnf/etc/my.cnf  

 

2.设置mysql开机自启

 

代码如下:

[[email protected]
~]# cp/usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
[[email protected]
~]# chmod +x /etc/init.d/mysql
[[email protected]
~]# /sbin/chkconfig –add mysql

 

3.启动mysql服务

 

代码如下:

[[email protected]
~]# service mysql start  

 

测试mysql是否安装成功

 

代码如下:

[[email protected]
~]# /usr/local/mysql/bin/mysql -u root -p  
Enter password:   
Welcome to the MySQL monitor.  Commands end with ; or \g.  
Your MySQL connection id is 1  
Server version: 5.5.37 Source distribution  
   
Copyright (c) 2000, 2014, Oracle and/or itsaffiliates. All rights
reserved.  
   
Oracle is a registered trademark of OracleCorporation and/or its  
affiliates. Other names may be trademarksof their respective  
owners.  
   
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ toclear the current input
statement.  
   
mysql> show databases;  
+——————–+  
| Database           |  
+——————–+  
| information_schema |  
| mysql              |  
| performance_schema |  
| test               |  
+——————–+  
4 rows in set (0.03 sec)  

 

 

这几天在centos下装mysql,这里记录一下安装的过程,方便以后查阅
Mysql5.5.37安装需要cmake,5.6版本开始都需要…

Mysql5.5.37安装需要cmake,5.6版本开始都需要cmake来编译,5.5以后的版本应该也要装这个。

相关文章

相关搜索:

今天看啥

搜索技术库

返回首页

  • 在Python
    3中实现类型检查器的简单方法,pyt
  • JavaScript中的对象与JSON,javascriptjson
  • JavaScript中解析JSON数据的三种方法,javascrip
  • JavaScript访问字符串中单个字符的两种方法,
  • Javascript中的作用域和上下文深入理解,java
  • jQuery中
    delegate使用的问题,jquerydelegate

相关频道:
oracle  sybase  Sql
Server  DB2  Mysql  MsSql  Access  数据库开发  数据库管理  数据库前沿  数据库教程  数据库工具  数据库安全  数据库基础  

安装cmake

帮客评论

[plain] view
plaincopyprint?01.[[email protected]
~]# wget  
02.[[email protected]
~]# tar xvf cmake-2.8.12.2.tar.gz 
03.[[email protected]
~]# cd cmake-2.8.12.2 
04.[[email protected]
cmake-2.8.12.2]#./bootstrap 
05.[[email protected]
cmake-2.8.12.2]# make 
06.[[email protected]
cmake-2.8.12.2]# make install 
[[email protected]
~]# wget
[[email protected]
~]# tar xvf cmake-2.8.12.2.tar.gz
[[email protected]
~]# cd cmake-2.8.12.2
[[email protected]
cmake-2.8.12.2]#./bootstrap
[[email protected]
cmake-2.8.12.2]# make

[[email protected]
cmake-2.8.12.2]# make install 安装mysql

[plain] view
plaincopyprint?01.[[email protected]
~]# wget
 
02.[[email protected]
~]# tar xvf mysql-5.5.37.tar.gz 
03.[[email protected]
~]# cd mysql-5.5.37 
04.[[email protected]
mysql-5.5.37]# cmake ./ 
[[email protected]
~]# wget

[[email protected]
~]# tar xvf mysql-5.5.37.tar.gz
[[email protected]
~]# cd mysql-5.5.37
[[email protected]
mysql-5.5.37]# cmake ./

可能还会报这个错,没有就跳过

[plain] view plaincopyprint?01.CMake Error at
cmake/readline.cmake:83(MESSAGE): 
02.Curses library not found.  Pleaseinstall appropriate package, 
03.remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name
islibncurses5-dev, on Redhat and derivates it is ncurses-devel. 
04.Call Stack (most recent call first): 

  1. cmake/readline.cmake:127 (FIND_CURSES) 
  2. cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT) 
  3. CMakeLists.txt:355 (MYSQL_CHECK_READLINE 
    08.– Configuring incomplete, errors occurred! 
    09.See also “/root/my/mysql-5.5.37/CMakeFiles/CMakeOutput.log”. 
    10.See also”/root/my/mysql-5.5.37/CMakeFiles/CMakeError.log”. 
    CMake Error at cmake/readline.cmake:83(MESSAGE):
    Curses library not found.  Pleaseinstall appropriate package,
    remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name
    islibncurses5-dev, on Redhat and derivates it is ncurses-devel.
    Call Stack (most recent call first):
     cmake/readline.cmake:127 (FIND_CURSES)
     cmake/readline.cmake:217 (MYSQL_USE_BUNDLED_LIBEDIT)
     CMakeLists.txt:355 (MYSQL_CHECK_READLINE
    — Configuring incomplete, errors occurred!
    See also “/root/my/mysql-5.5.37/CMakeFiles/CMakeOutput.log”.
    See also”/root/my/mysql-5.5.37/CMakeFiles/CMakeError.log”.

说明centos系统没有ncurses-devel

[plain] view
plaincopyprint?01.[[email protected]
~]#
wget 
02.[[email protected]
~]# cd ncurses-5.9 
03.[[email protected]
ncurses-5.9]#./configure 
04.[[email protected]
ncurses-5.9]# make 
05.[[email protected]
ncurses-5.9]# make install 
[[email protected]
~]# wget
[[email protected]
~]# cd ncurses-5.9
[[email protected]
ncurses-5.9]#./configure
[[email protected]
ncurses-5.9]# make
[[email protected]
ncurses-5.9]# make install

再删除刚才编译生成的 CMakeCache.txt 文件,否则无法进行下一步