OS:Linux 7.3
MySQL:社区版8.0.13
OS:Red Hat Enterprise Linux / Oracle Linux
Red Hat Enterprise Linux 7 / Oracle Linux 7 (x86, 64-bit), RPM Bundle(507.3M)
配yum源:
查到最新yum源的名称:
下载yum 源:
安装yum源:
安装mysql
安装过程中显示的待安装包列表:
安装过程会安装所有支持包和mysql的四个关键组件:
1.mysql-community-server(381M)
2.mysql-community-client(26M)
3.mysql-community-common(554k)
4.mysql-community-libs(2.3M)
用rpm -ql 命令查询mysql的安装文件在什么地方
[root@localhost /]# rpm -ql mysql-community-server-8.0.13-1.el7.x86_64 /etc/logrotate.d/mysql /etc/my.cnf /etc/my.cnf.d /usr/bin/ibd2sdi /usr/bin/innochecksum /usr/bin/lz4_decompress /usr/bin/my_print_defaults /usr/bin/myisam_ftdump /usr/bin/myisamchk /usr/bin/myisamlog /usr/bin/myisampack /usr/bin/mysql_secure_installation /usr/bin/mysql_ssl_rsa_setup /usr/bin/mysql_tzinfo_to_sql /usr/bin/mysql_upgrade /usr/bin/mysqld_pre_systemd /usr/bin/mysqldumpslow /usr/bin/perror /usr/bin/resolve_stack_dump /usr/bin/resolveip /usr/bin/zlib_decompress /usr/lib/systemd/system/mysqld.service /usr/lib/systemd/system/mysqld@.service /usr/lib/tmpfiles.d/mysql.conf /usr/lib64/mysql/mecab /usr/lib64/mysql/mecab/dic /usr/lib64/mysql/mecab/dic/ipadic_euc-jp /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/char.bin /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/dicrc /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/left-id.def /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/matrix.bin /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/pos-id.def /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/rewrite.def /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/right-id.def /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/sys.dic /usr/lib64/mysql/mecab/dic/ipadic_euc-jp/unk.dic /usr/lib64/mysql/mecab/dic/ipadic_sjis /usr/lib64/mysql/mecab/dic/ipadic_sjis/char.bin /usr/lib64/mysql/mecab/dic/ipadic_sjis/dicrc /usr/lib64/mysql/mecab/dic/ipadic_sjis/left-id.def /usr/lib64/mysql/mecab/dic/ipadic_sjis/matrix.bin /usr/lib64/mysql/mecab/dic/ipadic_sjis/pos-id.def /usr/lib64/mysql/mecab/dic/ipadic_sjis/rewrite.def /usr/lib64/mysql/mecab/dic/ipadic_sjis/right-id.def /usr/lib64/mysql/mecab/dic/ipadic_sjis/sys.dic /usr/lib64/mysql/mecab/dic/ipadic_sjis/unk.dic /usr/lib64/mysql/mecab/dic/ipadic_utf-8 /usr/lib64/mysql/mecab/dic/ipadic_utf-8/char.bin /usr/lib64/mysql/mecab/dic/ipadic_utf-8/dicrc /usr/lib64/mysql/mecab/dic/ipadic_utf-8/left-id.def /usr/lib64/mysql/mecab/dic/ipadic_utf-8/matrix.bin /usr/lib64/mysql/mecab/dic/ipadic_utf-8/pos-id.def /usr/lib64/mysql/mecab/dic/ipadic_utf-8/rewrite.def /usr/lib64/mysql/mecab/dic/ipadic_utf-8/right-id.def /usr/lib64/mysql/mecab/dic/ipadic_utf-8/sys.dic /usr/lib64/mysql/mecab/dic/ipadic_utf-8/unk.dic /usr/lib64/mysql/mecab/etc /usr/lib64/mysql/mecab/etc/mecabrc /usr/lib64/mysql/plugin /usr/lib64/mysql/plugin/adt_null.so /usr/lib64/mysql/plugin/auth_socket.so /usr/lib64/mysql/plugin/authentication_ldap_sasl_client.so /usr/lib64/mysql/plugin/component_log_filter_dragnet.so /usr/lib64/mysql/plugin/component_log_sink_json.so /usr/lib64/mysql/plugin/component_log_sink_syseventlog.so /usr/lib64/mysql/plugin/component_validate_password.so /usr/lib64/mysql/plugin/connection_control.so /usr/lib64/mysql/plugin/debug /usr/lib64/mysql/plugin/debug/adt_null.so /usr/lib64/mysql/plugin/debug/auth_socket.so /usr/lib64/mysql/plugin/debug/authentication_ldap_sasl_client.so /usr/lib64/mysql/plugin/debug/component_log_filter_dragnet.so /usr/lib64/mysql/plugin/debug/component_log_sink_json.so /usr/lib64/mysql/plugin/debug/component_log_sink_syseventlog.so /usr/lib64/mysql/plugin/debug/component_validate_password.so /usr/lib64/mysql/plugin/debug/connection_control.so /usr/lib64/mysql/plugin/debug/group_replication.so /usr/lib64/mysql/plugin/debug/ha_example.so /usr/lib64/mysql/plugin/debug/ha_mock.so /usr/lib64/mysql/plugin/debug/innodb_engine.so /usr/lib64/mysql/plugin/debug/keyring_file.so /usr/lib64/mysql/plugin/debug/keyring_udf.so /usr/lib64/mysql/plugin/debug/libmemcached.so /usr/lib64/mysql/plugin/debug/libpluginmecab.so /usr/lib64/mysql/plugin/debug/locking_service.so /usr/lib64/mysql/plugin/debug/mypluglib.so /usr/lib64/mysql/plugin/debug/mysql_no_login.so /usr/lib64/mysql/plugin/debug/rewrite_example.so /usr/lib64/mysql/plugin/debug/rewriter.so /usr/lib64/mysql/plugin/debug/semisync_master.so /usr/lib64/mysql/plugin/debug/semisync_slave.so /usr/lib64/mysql/plugin/debug/validate_password.so /usr/lib64/mysql/plugin/debug/version_token.so /usr/lib64/mysql/plugin/group_replication.so /usr/lib64/mysql/plugin/ha_example.so /usr/lib64/mysql/plugin/ha_mock.so /usr/lib64/mysql/plugin/innodb_engine.so /usr/lib64/mysql/plugin/keyring_file.so /usr/lib64/mysql/plugin/keyring_udf.so /usr/lib64/mysql/plugin/libmemcached.so /usr/lib64/mysql/plugin/libpluginmecab.so /usr/lib64/mysql/plugin/locking_service.so /usr/lib64/mysql/plugin/mypluglib.so /usr/lib64/mysql/plugin/mysql_no_login.so /usr/lib64/mysql/plugin/rewrite_example.so /usr/lib64/mysql/plugin/rewriter.so /usr/lib64/mysql/plugin/semisync_master.so /usr/lib64/mysql/plugin/semisync_slave.so /usr/lib64/mysql/plugin/validate_password.so /usr/lib64/mysql/plugin/version_token.so /usr/sbin/mysqld /usr/sbin/mysqld-debug /usr/share/doc/mysql-community-server-8.0.13 /usr/share/doc/mysql-community-server-8.0.13/INFO_BIN /usr/share/doc/mysql-community-server-8.0.13/INFO_SRC /usr/share/doc/mysql-community-server-8.0.13/LICENSE /usr/share/doc/mysql-community-server-8.0.13/README /usr/share/man/man1/ibd2sdi.1.gz /usr/share/man/man1/innochecksum.1.gz /usr/share/man/man1/lz4_decompress.1.gz /usr/share/man/man1/my_print_defaults.1.gz /usr/share/man/man1/myisam_ftdump.1.gz /usr/share/man/man1/myisamchk.1.gz /usr/share/man/man1/myisamlog.1.gz /usr/share/man/man1/myisampack.1.gz /usr/share/man/man1/mysql.server.1.gz /usr/share/man/man1/mysql_secure_installation.1.gz /usr/share/man/man1/mysql_ssl_rsa_setup.1.gz /usr/share/man/man1/mysql_tzinfo_to_sql.1.gz /usr/share/man/man1/mysql_upgrade.1.gz /usr/share/man/man1/mysqldumpslow.1.gz /usr/share/man/man1/mysqlman.1.gz /usr/share/man/man1/perror.1.gz /usr/share/man/man1/resolve_stack_dump.1.gz /usr/share/man/man1/resolveip.1.gz /usr/share/man/man1/zlib_decompress.1.gz /usr/share/man/man8/mysqld.8.gz /usr/share/mysql-8.0/dictionary.txt /usr/share/mysql-8.0/innodb_memcached_config.sql /usr/share/mysql-8.0/install_rewriter.sql /usr/share/mysql-8.0/magic /usr/share/mysql-8.0/mysql-log-rotate /usr/share/mysql-8.0/uninstall_rewriter.sql /var/lib/mysql /var/lib/mysql-files /var/lib/mysql-keyring /var/run/mysqld
初始化:
启动:
问题解决:
1.安装中报依赖包错误:
原因:RedHat Linux 7.3 操作系统默认就装好了一下mysql包:
与所下载版本冲突。
方法:用rpm -e --nodes 强行卸载上述三个包,然后再安装mysql-server
2.mysql 安装后无法启动
解决方法:
查看日志:
将 /var/lib/mysql/ibdata1文件的权限配置为mysql:mysql即可: