问题1:
[root@localhost install-files]# rpm -ivh MySQL-server-5.6.27-1.el6.x86_64.rpm
Preparing...                          ################################# [100%]
 file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.27-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
 file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.27-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
 file /usr/share/mysql/danish/errmsg.sys from install of MySQL-server-5.6.27-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64 file /usr/share/mysql/charsets/macce.xml from install of MySQL-server-5.6.27-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64 file /usr/share/mysql/charsets/macroman.xml from install of MySQL-server-5.6.27-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
 file /usr/share/mysql/charsets/swe7.xml from install of MySQL-server-5.6.27-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    ……………………
解决1:
出现以上安装错误列表的原因是:系统已经安装了其他版本的mysql-libs包和mysql数据库文件导致不兼容。
[root@localhost install-files]# yum remove mysql-libs
执行之后,还要详细检查卸载MySQL安装的所有文件,否则在后续安装发生各种错误:CentOS下MySQL的彻底卸载
问题2:
[root@Tony_ts_tian developer]# rpm -ivh MySQL-server-5.5.46-1.el6.x86_64.rpm
warning: MySQL-server-5.5.46-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
解决2:
从 rpm版本 4.1 开始,在安装或升级软件包时会检查软件包的签名。如果签名校验失败,你就会看到类似以上的错误消息:
注:新的、只针对文件头的签名:错误消息:error: Header V3 DSA signature: BAD, key ID 0352860f
注:没有安装合适的钥匙来校验签名,消息中就会包含 NOKEY:错误消息:warning: V3 DSA signature: NOKEY, key ID 0352860f
由于yum安装了旧版本的GPG keys造成的,解决办法就是(设置后无效):
rpm --import /etc/pki/rpm-gpg/RPM*
此签名是检验安装包的有效性和安装性的。我直接跳过(安装时不校验,加--nosignature参数)检验安装:
[root@localhost install-files]# rpm -ivh MySQL-server-5.6.27-1.el6.x86_64.rpm --nosignature
问题3:
mysqld: unrecognized service
  1.  
    [root@Tony_ts_tian init.d]# service mysqld start
  2.  
    mysqld: unrecognized service
解决3:
启动脚本文件mysql的目录
  1.  
    [root@localhost install-files]# cd /etc/rc.d/init.d/
  2.  
    [root@localhost init.d]# ls
  3.  
    functions mysql netconsole network README
并没有mysqld:
[root@Tony_ts_tian init.d]# service mysql start
启动成功:
也可以:
  1.  
    [root@Tony_ts_tian init.d]# mv mysql mysqld
  2.  
    [root@Tony_ts_tian init.d]# service mysqld start
问题4:
[root@localhost install-files]# rpm -ivh MySQL-server-5.6.27-1.el6.x86_64.rpm --nosignature
Preparing...                          ################################# [100%]
Updating / installing...
   1:MySQL-server-5.6.27-1.el6        ################################# [100%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
FATAL ERROR: please install the following Perl modules before executing /usr/bin/mysql_install_db:
Data::Dumper
解决4:
[root@localhost install-files]# yum install -y perl-Module-Install.noarch
问题5:
[root@localhost mysql]# service mysql start
Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
  1.  
    [root@localhost init.d]# cd /var/lib/mysql/
  2.  
    [root@localhost mysql]# ll
  3.  
    total 110620
  4.  
    -rw-rw----. 1 mysql mysql 56 Oct 11 23:20 auto.cnf
  5.  
    -rw-rw----. 1 mysql mysql 12582912 Oct 11 23:20 ibdata1
  6.  
    -rw-rw----. 1 mysql mysql 50331648 Oct 11 23:20 ib_logfile0
  7.  
    -rw-rw----. 1 mysql mysql 50331648 Oct 11 23:19 ib_logfile1
  8.  
    -rw-r-----. 1 mysql root 5847 Oct 11 23:20 localhost.localdomain.err
  9.  
    drwx--x--x. 2 mysql mysql 4096 Oct 11 23:19 mysql
  10.  
    drwx------. 2 mysql mysql 4096 Oct 11 23:19 performance_schema
  11.  
    -rw-r--r--. 1 root root 111 Oct 11 23:19 RPM_UPGRADE_HISTORY
  12.  
    -rw-r--r--. 1 mysql mysql 111 Oct 11 23:19 RPM_UPGRADE_MARKER-LAST
  13.  
    drwxr-xr-x. 2 mysql mysql 6 Oct 11 23:19 test

查看路径:mysql-bin.index多余文件,auto.cnf和performance_schema等不存在(文件不全)。(以上为成功后的mysql数据库目录)

解决5:
因为以前存在的MySQL卸载不干净导致。
删除和卸载(以下是的解决),然后重新安装:CentOS下MySQL的彻底卸载
  1.  
    [root@localhost mysql]# rpm -aq | grep -i mysql
  2.  
    MySQL-server-5.6.27-1.el6.x86_64
  3.  
    MySQL-client-5.6.27-1.el6.x86_64
  4.  
    MySQL-devel-5.6.27-1.el6.x86_64
  5.  
    [root@localhost mysql]# rpm -e MySQL-server-5.6.27-1.el6.x86_64
  6.  
    [root@localhost mysql]# rpm -e MySQL-client-5.6.27-1.el6.x86_64
  7.  
    [root@localhost mysql]# rpm -e MySQL-devel-5.6.27-1.el6.x86_64
  8.  
    [root@localhost rc.d]# cd /var/lib/
  9.  
    [root@localhost lib]# rm -rf mysql/
  10.  
    [root@localhost install-files]# rpm -ivh MySQL-server-5.6.27-1.el6.x86_64.rpm --nosignature
  11.  
    Preparing... ################################# [100%]
  12.  
    Updating / installing...
  13.  
    1:MySQL-server-5.6.27-1.el6 ################################# [100%]
  14.  
    2015-10-11 23:19:40 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  15.  
    2015-10-11 23:19:40 0 [Note] /usr/sbin/mysqld (mysqld 5.6.27) starting as process 3168 ...
  16.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Using atomics to ref count buffer pool pages
  17.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: The InnoDB memory heap is disabled
  18.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  19.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Memory barrier is not used
  20.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Compressed tables use zlib 1.2.3
  21.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Using Linux native AIO
  22.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Using CPU crc32 instructions
  23.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Initializing buffer pool, size = 128.0M
  24.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Completed initialization of buffer pool
  25.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
  26.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
  27.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Database physically writes the file full: wait...
  28.  
    2015-10-11 23:19:40 3168 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
  29.  
    2015-10-11 23:19:41 3168 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
  30.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
  31.  
    2015-10-11 23:19:43 3168 [Warning] InnoDB: New log files created, LSN=45781
  32.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: Doublewrite buffer not found: creating new
  33.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: Doublewrite buffer created
  34.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: 128 rollback segment(s) are active.
  35.  
    2015-10-11 23:19:43 3168 [Warning] InnoDB: Creating foreign key constraint system tables.
  36.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: Foreign key constraint system tables created
  37.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: Creating tablespace and datafile system tables.
  38.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: Tablespace and datafile system tables created.
  39.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: Waiting for purge to start
  40.  
    2015-10-11 23:19:43 3168 [Note] InnoDB: 5.6.27 started; log sequence number 0
  41.  
    A random root password has been set. You will find it in '/root/.mysql_secret'.
  42.  
    2015-10-11 23:19:44 3168 [Note] Binlog end
  43.  
    2015-10-11 23:19:44 3168 [Note] InnoDB: FTS optimize thread exiting.
  44.  
    2015-10-11 23:19:44 3168 [Note] InnoDB: Starting shutdown...
  45.  
    2015-10-11 23:19:46 3168 [Note] InnoDB: Shutdown completed; log sequence number 1625977
  46.  
     
  47.  
    2015-10-11 23:19:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  48.  
    2015-10-11 23:19:46 0 [Note] /usr/sbin/mysqld (mysqld 5.6.27) starting as process 3190 ...
  49.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Using atomics to ref count buffer pool pages
  50.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: The InnoDB memory heap is disabled
  51.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  52.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Memory barrier is not used
  53.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Compressed tables use zlib 1.2.3
  54.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Using Linux native AIO
  55.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Using CPU crc32 instructions
  56.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Initializing buffer pool, size = 128.0M
  57.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Completed initialization of buffer pool
  58.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Highest supported file format is Barracuda.
  59.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: 128 rollback segment(s) are active.
  60.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Waiting for purge to start
  61.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: 5.6.27 started; log sequence number 1625977
  62.  
    2015-10-11 23:19:46 3190 [Note] Binlog end
  63.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: FTS optimize thread exiting.
  64.  
    2015-10-11 23:19:46 3190 [Note] InnoDB: Starting shutdown...
  65.  
    2015-10-11 23:19:49 3190 [Note] InnoDB: Shutdown completed; log sequence number 1625987
  66.  
     
  67.  
    A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
  68.  
    You will find that password in '/root/.mysql_secret'.
  69.  
     
  70.  
    You must change that password on your first connect,
  71.  
    no other statement but 'SET PASSWORD' will be accepted.
  72.  
    See the manual for the semantics of the 'password expired' flag.
  73.  
     
  74.  
    Also, the account for the anonymous user has been removed.
  75.  
     
  76.  
    In addition, you can run:
  77.  
     
  78.  
    /usr/bin/mysql_secure_installation
  79.  
     
  80.  
    which will also give you the option of removing the test database.
  81.  
    This is strongly recommended for production servers.
  82.  
     
  83.  
    See the manual for more instructions.
  84.  
     
  85.  
    Please report any problems at http://bugs.mysql.com/
  86.  
     
  87.  
    The latest information about MySQL is available on the web at
  88.  
     
  89.  
    http://www.mysql.com
  90.  
     
  91.  
    Support MySQL by buying support/licenses at http://shop.mysql.com
  92.  
     
  93.  
    New default config file was created as /usr/my.cnf and
  94.  
    will be used by default by the server when you start it.
  95.  
    You may edit this file to change server settings
 
检查:
  1.  
    [root@localhost install-files]# service mysql start
  2.  
    Starting MySQL.. SUCCESS!
  3.  
    [root@localhost install-files]# service mysql stop
  4.  
    Shutting down MySQL.. SUCCESS!
  5.  
    [root@localhost mysql]# ll
  6.  
    total 110620
  7.  
    -rw-rw----. 1 mysql mysql 56 Oct 11 23:20 auto.cnf
  8.  
    -rw-rw----. 1 mysql mysql 12582912 Oct 11 23:20 ibdata1
  9.  
    -rw-rw----. 1 mysql mysql 50331648 Oct 11 23:20 ib_logfile0
  10.  
    -rw-rw----. 1 mysql mysql 50331648 Oct 11 23:19 ib_logfile1
  11.  
    -rw-r-----. 1 mysql root 5847 Oct 11 23:20 localhost.localdomain.err
  12.  
    drwx--x--x. 2 mysql mysql 4096 Oct 11 23:19 mysql
  13.  
    drwx------. 2 mysql mysql 4096 Oct 11 23:19 performance_schema
  14.  
    -rw-r--r--. 1 root root 111 Oct 11 23:19 RPM_UPGRADE_HISTORY
  15.  
    -rw-r--r--. 1 mysql mysql 111 Oct 11 23:19 RPM_UPGRADE_MARKER-LAST
  16.  
    drwxr-xr-x. 2 mysql mysql 6 Oct 11 23:19 test
设置后,也可以:mysql -u root -p;进行登录测试。
成功的安装,日志中显示(创建两个文件):
A random root password has been set. You will find it in '/root/.mysql_secret'.
New default config file was created as /usr/my.cnf andwill be used by default by the server when you start it.

CentOS7安装MySQL冲突和问题解决小结的更多相关文章

  1. centos7安装Mysql爬坑记录

    centos7安装Mysql爬坑记录   查看是否已安装 使用下列命令查看是否已经安装过mysql/mariadb/PostgreSQL 如果未安装,不返回任何结果(ECS的centos镜像默认未安装 ...

  2. CentOS7安装mysql提示“No package mysql-server available.”

    针对centos7安装mysql,提示"No package mysql-server available."错误,解决方法如下: Centos 7 comes with Mari ...

  3. [CentOs7]安装mysql(2)

    摘要 之前安装过一次mysql,最后配置,发现在本地无法连接,重启服务的时候一直卡在那里不动,感觉是安装的过程出问题,最后没办法还是卸载了,然后重新安装一下. [CentOs7]安装mysql Mys ...

  4. centos7安装mysql

    centos7安装mysql 1 查找系统是否安装了myql rpm -q mysql mysql-server1.1如果安装了.就删除 sudo yum -y remove mysql mysql- ...

  5. centos7安装mysql(yum)

    centos7安装mysql(yum) ----安装环境----依赖安装----检查mysql是否已安装----安装----验证是否添加成功----选择要启用的mysql版本----通过Yum安装my ...

  6. CentOS7安装MySQL的方法之通用二进制格式

      CentOS7安装MySQL的方法之通用二进制格式          

  7. CentOS7安装MySQL的方法之RPM包方式

        CentOS7安装MySQL的方法之RPM包方式        

  8. Centos7 安装mysql服务器并开启远程访问功能

    大二的暑假,波波老师送了一个华为云的服务器给我作测试用,这是我程序员生涯里第一次以root身份拥有一台真实的云服务器 而之前学习的linux知识在这时也派上了用场,自己的物理机用的是ubuntu系统, ...

  9. [CentOS7]安装mysql遇到的问题

    摘要 在安装mysql的时候,遇到了一些问题,这里列出所遇到的问题. yum list mysql-server 在使用命令yum list mysql-server安装mysql的时候,遇到如图所示 ...

随机推荐

  1. open():打开文件

    1.open():使用指定的模式和编码打开文件,返回文件读写对象 2.使用说明: (1)使用格式:open(filename [, mode [, bufsize]])(2)打开一个文件,返回一个fi ...

  2. 万恶之源 - Python生成器

    生成器 首先我们来看看什么是个生成器,生成器本质就是迭代器 在python中有三种方式来获取生成器 1.通过生成器函数 2.通过各种推到式来实现生成器 3.通过数据的转换也可以获取生成器 首先,我们先 ...

  3. js中实现IE的打印预览

    HTML中添加:<object id="WebBrowser" classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 widt ...

  4. Java 基础 常用API ( 正则表达式,Date类,DateFormat类,Calendar类 )

    正则表达式 正则表达式的概念 正则表达式(英语:Regular Expression,在代码中常简写为regex). 正则表达式是一个字符串,使用单个字符串来描述.用来定义匹配规则,匹配一系列符合某个 ...

  5. Nginx参数调优

    (1)nginx运行工作进程个数,一般设置cpu的核心或者核心数x2 如果不了解cpu的核数,可以top命令之后按1看出来,也可以查看/proc/cpuinfo文件 grep ^processor / ...

  6. 合理利用配置不同的机器资源做redis cluster的server

    Redis cluster可以使用不同配置的机器学习因为我们可以手动调整不同的机器所承担的slot的个数,这样内存小CPU相对少的机器应该承担更少的slots

  7. centos上shellcheck的安装

    关于shellcheck的作用和功能,自行查阅. centos7 上安装shellcheck的过程中查了很多资料,大部分都是在ubunt下安装的,centos的比较少,然后好不容易看到一个https: ...

  8. 超实用教程,教你用墨刀做出小红书app原型

    一个新手怎么用1小时快速学会APP原型设计? 1小时很短,这意味着学习时必须把握APP原型设计中的重点.难点,而非面面俱到. 要在短时间内理解.掌握一个工具的使用,最有效的方式莫过于临摹: 看实例视频 ...

  9. nodejs+mysql入门实例(删)

    //连接数据库 var mysql = require('mysql'); var connection = mysql.createConnection({ host: 'bdm253137448. ...

  10. R语言的scale函数

    1.数据的中心化 所谓数据的中心化是指数据集中的各项数据减去数据集的均值. 例如有数据集1, 2, 3, 6, 3,其均值为3 那么中心化之后的数据集为1-3,2-3,3-3,6-3,3-3,即:-2 ...