安装mysql步骤:

第一、 http://www.mysql.com/downloads/mysql-4.0.html下载MySQL-client-5.0.96-1.glibc23.x86_64.rpm和

MySQL-server-5.0.96-1.glibc23.x86_64.rpm

第二、安装服务端:

[root@lfl01 mysql]# rpm -ivh MySQL-server-5.1.73-1.glibc23.i386.rpm

显示信息:

Preparing...                ########################################### [100%]

1:MySQL-server           ########################################### [100%]

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

。。。。。

Please report any problems with the /usr/bin/mysqlbug script!

如出现如上信息,则表示服务器端安装成功。

安装客户端:[root@lfl01 mysql]# rpm -ivh MySQL-client-5.1.73-1.glibc23.i386.rpm

显示如下信息则表明安装成功:

Preparing...                ########################################### [100%]

1:MySQL-client           ########################################### [100%]

若安装过程中报该错误!!!

file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.1.73-1.glibc.i386 conflicts with file from package mysql-libs-5.1.73-1.glibc.i386

原因:已存在mysql-libs-5.1.73-1.glibc.i386的库(这是linux自带的)所以需要先删除以前的库才能安装

rpm -emysql-libs-5.1.73-1.glibc.i386 --nodeps 强制卸载!

第三、启动mysql服务

[root@lfl01 sean]# /etc/init.d/mysql start 或者

[root@lfl01 sean]# mysqld_safe &

通过netstat命令查看mysql是否启动成功

[sean@lfl01 ~]$ netstat -nat

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address               Foreign Address             State

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN

tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN

tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN

tcp        0      0 127.0.0.1:6010              0.0.0.0:*                   LISTEN

tcp        0     52 192.168.1.128:22            192.168.1.106:51488         ESTABLISHED

tcp        1      0 192.168.1.128:38414         23.2.16.57:80               CLOSE_WAIT

tcp        0      0 :::22                       :::*                        LISTEN

tcp        0      0 ::1:631                     :::*                        LISTEN

tcp        0      0 ::1:6010                    :::*                        LISTEN

mysql默认端口号为3306,以上信息中出现3306端口号,则启动成功

查看mysql进程:

[root@lfl01 sean]# ps -e

第四、停止mysql服务:

[root@lfl01 sean]# /usr/bin/mysqladmin -u root -p shutdown

重启mysql服务:/etc/init.d/mysql restart

第五、重启linux之后,启动mysql服务

[root@lfl01 sean]# /usr/init.d/mysql start

[root@lfl01 mysql]# mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.1.73 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

退出mysql:

mysql> exit

设置mysql密码

[root@lfl01 mysql]# /usr/bin/mysqladmin -u root password '*****'

登录mysql

[root@lfl01 mysql]# mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.1.73 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

出现以上信息表明登录成功!!!

第六、卸载mysql

用rpm包卸载:

[root@lfl01 sean]# rpm -qa|grep MySQL

MySQL-client-5.1.73-1.glibc23.i386

MySQL-server-5.1.73-1.glibc23.i386

执行此命令卸载 [root@lfl01 sean]# rpm -e --nodeps MySQL-client-5.1.73-1.glibc23.i386

[root@lfl01 sean]# find / -name mysql

/var/lib/mysql

/var/lib/mysql/mysql

/var/lock/subsys/mysql

/usr/lib/mysql

/usr/share/mysql

/usr/mysql

/usr/bin/mysql

/etc/logrotate.d/mysql

/etc/rc.d/init.d/mysql

可以手动删除mysql相关的文件

[root@lfl01 sean]# rm -rf /var/lib/mysql

后面的操作mysql和windows下一样了。。。

使用rpm包安装mysql_centos下利用rpm包安装mysql相关推荐

  1. centos cmake安装mysql_CentOS下使用cmake编译安装mysql

    一.下载安装所必需的依赖包 1.因为高版本mysql都用cmake安装,所以下载cmake wget http://www.cmake.org/files/v3.0/cmake-3.0.1.tar.g ...

  2. 解决 npm 无法安装 devDependencies 下的依赖包的问题

    2019独角兽企业重金招聘Python工程师标准>>> 分析原因 起初无法安装 devDependencies 下依赖包,急的不行,以为是 npm 版本有问题,陆续安装了 node@ ...

  3. mysql5.7.20linux安装,linux下 mysql5.7.20安装(精华)

    在linux 系统中mysql配置文件的读取顺序为: /etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf 第一步 创 ...

  4. rpm安装mysql5.6_利用rpm安装mysql 5.6版本详解

    前言 其实之前使用yum安装MySQL确实很方便,但是默认安装的myql5.0版本的,不支持utf8mb4(utf8mb4扩展到一个字符最多能有4节,所以能支持更多的字符集,比如支持emoji表情)编 ...

  5. centos 安装mysql_Centos 下mysql数据库完整安装过程

    1. 检查系统自带的Mysql,并卸载自带的版本 [root@iZ2366ycl7sZ config]# yum list installed |grep mysql mysql.x86_64 5.1 ...

  6. jdk13.0.2安装mysql_centos下的安装mysql,jdk

    mysql: 如果你是用rpm安装, 检查一下RPM PACKAGE: rpm -qa | grep -i mysql 如果mysql已经安装在本机,则会列出mysql安装过的文件 ,像mysql-s ...

  7. ubuntu下使用apt安装mysql_Ubuntu下通过apt包管理安装mysql

    949 首页 > 资讯 > Ubuntu下通过apt包管理安装mysql Ubuntu下通过apt包管理安装mysql 消息来源:http://forum.ubuntu.org.cn/vi ...

  8. centos命令行安装mysql_Centos下安装mysql 总结

    一.MySQL安装 二.MySQL的几个重要目录 MySQL安装完成后不象SQL Server默认安装在一个目录,它的数据库文件.配置文件和命令文件分别在不同的目录,了解这些目录非常重要,尤其对于Li ...

  9. php源码怎样安装mysql_Linux下源码包安装mysql、apache以及php

    Linux下安装mysql.apache以及php实现论坛的安装 我安装大致分为五大步骤 0.前期准备工作 1.Mysql的安装 2.Apache的安装 3.Php的安装 4.最后来实现论坛的安装 0 ...

最新文章

  1. 【工业智能】人工智能真的无所不能吗?
  2. SpringCloud-Hytrix
  3. 普通函数与函数模板的区别
  4. AttributeError: 'Polar AxesSubplot' object has no attribute 'set_axis_bgcolor'
  5. centos修改磁盘uuid_Centos更换损坏硬盘UUID改变导致系统不能正常启动处理
  6. SpringBoot使用Websocket
  7. MySQL表联接原理分析
  8. 打造Android微信朋友圈下拉刷新控件
  9. uboot之logo显示
  10. docker--删除container和image
  11. ssh 多台服务器之间连接(linux)
  12. IT专用英语词汇1500词
  13. 官方代码 Deeplab v3+ resnet101 做backbone
  14. 标准库std::min/std::max与min/max宏冲突
  15. 移动通信第三章,组网技术基础
  16. 管理ELK进程工具: Supervisor Cesi
  17. Swift学习笔记笔记(七) UIKit常用组件的使用
  18. Cadence allegro小技巧总结
  19. RFID技术给图书馆带来的优势
  20. 使用Cydia能干什么

热门文章

  1. 寄生式创业更容易成功
  2. NVDKC6416平台H.264算法优化
  3. Docker 安装 redis 、Redis docker 方式部署
  4. html 标签内背景图片自适应 div 大小
  5. 查看、关闭当前服务器上启动服务 / 进程
  6. js 实现用window.print()打印页面中的部分内容,局部打印
  7. Servlet的入门
  8. 深度优先遍历解决连通域求解问题-python实现
  9. HTTP协议中request报文请求方法和状态响应码
  10. 《疯狂Java讲义》(二十九)---- JDBC