手把手教你搭建mysql主从集群

2024年 2月 28日 53.5k 0

1.下载mysql安装档

环境  os:centos 7.9  mysql 8.0.33 

下载安装文档

 官网下载地址 https://downloads.mysql.com/archives/community/ (需要MOS账号)

 墨天伦下载:https://www.modb.pro/doc/125685

 本次使用的为mysql-8.0.33-el7-x86_64.tar.gz 

2.上传安装包并解压主从两节点

tar -xzvf mysql-8.0.33-el7-x86_64.tar.gz -C /usr/local/

tar -xzvf mysql-8.0.33-el7-x86_64.tar.gz -C /usr/local/
mysql-8.0.33-el7-x86_64/bin/
mysql-8.0.33-el7-x86_64/bin/myisam_ftdump
mysql-8.0.33-el7-x86_64/bin/myisamchk
mysql-8.0.33-el7-x86_64/bin/myisamlog
mysql-8.0.33-el7-x86_64/bin/myisampack
mysql-8.0.33-el7-x86_64/bin/mysql
mysql-8.0.33-el7-x86_64/bin/mysql_config_editor
mysql-8.0.33-el7-x86_64/bin/mysql_migrate_keyring
mysql-8.0.33-el7-x86_64/bin/mysql_secure_installation
mysql-8.0.33-el7-x86_64/bin/mysql_ssl_rsa_setup
mysql-8.0.33-el7-x86_64/bin/mysql_tzinfo_to_sql
mysql-8.0.33-el7-x86_64/bin/mysql_upgrade
mysql-8.0.33-el7-x86_64/bin/mysqladmin
mysql-8.0.33-el7-x86_64/bin/mysqlbinlog
mysql-8.0.33-el7-x86_64/bin/mysqlcheck
mysql-8.0.33-el7-x86_64/bin/mysqldump
mysql-8.0.33-el7-x86_64/bin/mysqlimport
mysql-8.0.33-el7-x86_64/bin/mysqlpump
mysql-8.0.33-el7-x86_64/bin/mysqlshow
mysql-8.0.33-el7-x86_64/bin/mysqlslap
mysql-8.0.33-el7-x86_64/lib/
mysql-8.0.33-el7-x86_64/lib/plugin/
mysql-8.0.33-el7-x86_64/lib/plugin/authentication_fido_client.so
mysql-8.0.33-el7-x86_64/lib/plugin/authentication_kerberos_client.so
mysql-8.0.33-el7-x86_64/lib/plugin/authentication_ldap_sasl_client.so
mysql-8.0.33-el7-x86_64/lib/plugin/authentication_oci_client.so
mysql-8.0.33-el7-x86_64/bin/
mysql-8.0.33-el7-x86_64/bin/mysqld-debug
mysql-8.0.33-el7-x86_64/bin/
mysql-8.0.33-el7-x86_64/bin/mysql_config
mysql-8.0.33-el7-x86_64/include/
mysql-8.0.33-el7-x86_64/include/errmsg.h
mysql-8.0.33-el7-x86_64/include/field_types.h
mysql-8.0.33-el7-x86_64/include/my_command.h
mysql-8.0.33-el7-x86_64/include/my_compress.h
mysql-8.0.33-el7-x86_64/include/my_list.h
mysql-8.0.33-el7-x86_64/include/mysql/
mysql-8.0.33-el7-x86_64/include/mysql.h
mysql-8.0.33-el7-x86_64/include/mysql/client_plugin.h
mysql-8.0.33-el7-x86_64/include/mysql/plugin_auth_common.h
mysql-8.0.33-el7-x86_64/include/mysql/udf_registration_types.h
mysql-8.0.33-el7-x86_64/include/mysql_com.h
mysql-8.0.33-el7-x86_64/include/mysql_time.h
mysql-8.0.33-el7-x86_64/include/mysql_version.h
mysql-8.0.33-el7-x86_64/include/mysqld_error.h
mysql-8.0.33-el7-x86_64/include/mysqlx_ername.h
mysql-8.0.33-el7-x86_64/include/mysqlx_error.h
mysql-8.0.33-el7-x86_64/include/mysqlx_version.h
mysql-8.0.33-el7-x86_64/lib/
mysql-8.0.33-el7-x86_64/lib/libmysqlclient.a
mysql-8.0.33-el7-x86_64/lib/libmysqlservices.a
mysql-8.0.33-el7-x86_64/lib/pkgconfig/
mysql-8.0.33-el7-x86_64/lib/pkgconfig/mysqlclient.pc
mysql-8.0.33-el7-x86_64/share/
mysql-8.0.33-el7-x86_64/share/aclocal/
mysql-8.0.33-el7-x86_64/share/aclocal/mysql.m4
mysql-8.0.33-el7-x86_64/docs/
mysql-8.0.33-el7-x86_64/docs/ChangeLog
mysql-8.0.33-el7-x86_64/docs/INFO_SRC
mysql-8.0.33-el7-x86_64/docs/
mysql-8.0.33-el7-x86_64/docs/INFO_BIN
mysql-8.0.33-el7-x86_64/docs/INFO_SRC
mysql-8.0.33-el7-x86_64/man/
mysql-8.0.33-el7-x86_64/man/man1/
mysql-8.0.33-el7-x86_64/man/man1/comp_err.1
mysql-8.0.33-el7-x86_64/man/man1/ibd2sdi.1
mysql-8.0.33-el7-x86_64/man/man1/innochecksum.1
mysql-8.0.33-el7-x86_64/man/man1/lz4_decompress.1
mysql-8.0.33-el7-x86_64/man/man1/my_print_defaults.1
mysql-8.0.33-el7-x86_64/man/man1/myisam_ftdump.1
mysql-8.0.33-el7-x86_64/man/man1/myisamchk.1
mysql-8.0.33-el7-x86_64/man/man1/myisamlog.1
mysql-8.0.33-el7-x86_64/man/man1/myisampack.1
mysql-8.0.33-el7-x86_64/man/man1/mysql.1
mysql-8.0.33-el7-x86_64/man/man1/mysql.server.1
mysql-8.0.33-el7-x86_64/man/man1/mysql_config.1
mysql-8.0.33-el7-x86_64/man/man1/mysql_config_editor.1
mysql-8.0.33-el7-x86_64/man/man1/mysql_secure_installation.1
mysql-8.0.33-el7-x86_64/man/man1/mysql_ssl_rsa_setup.1
mysql-8.0.33-el7-x86_64/man/man1/mysql_tzinfo_to_sql.1
mysql-8.0.33-el7-x86_64/man/man1/mysql_upgrade.1
mysql-8.0.33-el7-x86_64/man/man1/mysqladmin.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlbinlog.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlcheck.1
mysql-8.0.33-el7-x86_64/man/man1/mysqld_multi.1
mysql-8.0.33-el7-x86_64/man/man1/mysqld_safe.1
mysql-8.0.33-el7-x86_64/man/man1/mysqldump.1
mysql-8.0.33-el7-x86_64/man/man1/mysqldumpslow.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlimport.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlman.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlpump.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlrouter.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlrouter_passwd.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlrouter_plugin_info.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlshow.1
mysql-8.0.33-el7-x86_64/man/man1/mysqlslap.1
mysql-8.0.33-el7-x86_64/man/man1/perror.1
mysql-8.0.33-el7-x86_64/man/man1/zlib_decompress.1
mysql-8.0.33-el7-x86_64/man/man8/
mysql-8.0.33-el7-x86_64/man/man8/mysqld.8
mysql-8.0.33-el7-x86_64/LICENSE
mysql-8.0.33-el7-x86_64/README
mysql-8.0.33-el7-x86_64/bin/
mysql-8.0.33-el7-x86_64/bin/ibd2sdi
mysql-8.0.33-el7-x86_64/bin/innochecksum
mysql-8.0.33-el7-x86_64/bin/lz4_decompress
mysql-8.0.33-el7-x86_64/bin/my_print_defaults
mysql-8.0.33-el7-x86_64/bin/mysqld
mysql-8.0.33-el7-x86_64/bin/mysqld_multi
mysql-8.0.33-el7-x86_64/bin/mysqld_safe
mysql-8.0.33-el7-x86_64/bin/mysqldumpslow
mysql-8.0.33-el7-x86_64/bin/perror
mysql-8.0.33-el7-x86_64/bin/zlib_decompress
mysql-8.0.33-el7-x86_64/lib/
mysql-8.0.33-el7-x86_64/lib/mecab/
mysql-8.0.33-el7-x86_64/lib/mecab/dic/
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/char.bin
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/dicrc
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/left-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/matrix.bin
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/pos-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/rewrite.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/right-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/sys.dic
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_euc-jp/unk.dic
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/char.bin
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/dicrc
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/left-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/matrix.bin
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/pos-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/rewrite.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/right-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/sys.dic
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_sjis/unk.dic
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/char.bin
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/dicrc
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/left-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/matrix.bin
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/pos-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/rewrite.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/right-id.def
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/sys.dic
mysql-8.0.33-el7-x86_64/lib/mecab/dic/ipadic_utf-8/unk.dic
mysql-8.0.33-el7-x86_64/lib/mecab/etc/
mysql-8.0.33-el7-x86_64/lib/mecab/etc/mecabrc
mysql-8.0.33-el7-x86_64/lib/plugin/
mysql-8.0.33-el7-x86_64/lib/plugin/adt_null.so
mysql-8.0.33-el7-x86_64/lib/plugin/auth_socket.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_audit_api_message_emit.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_keyring_file.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_log_filter_dragnet.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_log_sink_json.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_log_sink_syseventlog.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_mysqlbackup.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_query_attributes.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_reference_cache.so
mysql-8.0.33-el7-x86_64/lib/plugin/component_validate_password.so
mysql-8.0.33-el7-x86_64/lib/plugin/connection_control.so
mysql-8.0.33-el7-x86_64/lib/plugin/ddl_rewriter.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/
mysql-8.0.33-el7-x86_64/lib/plugin/debug/adt_null.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/auth_socket.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_audit_api_message_emit.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_keyring_file.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_log_filter_dragnet.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_log_sink_json.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_log_sink_syseventlog.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_mysqlbackup.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_query_attributes.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_reference_cache.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/component_validate_password.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/connection_control.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/ddl_rewriter.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/group_replication.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/ha_example.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/ha_mock.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/innodb_engine.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/keyring_file.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/keyring_udf.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/libmemcached.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/libpluginmecab.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/locking_service.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/mypluglib.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/mysql_clone.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/mysql_no_login.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/rewrite_example.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/rewriter.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/semisync_master.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/semisync_replica.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/semisync_slave.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/semisync_source.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/validate_password.so
mysql-8.0.33-el7-x86_64/lib/plugin/debug/version_token.so
mysql-8.0.33-el7-x86_64/lib/plugin/group_replication.so
mysql-8.0.33-el7-x86_64/lib/plugin/ha_example.so
mysql-8.0.33-el7-x86_64/lib/plugin/ha_mock.so
mysql-8.0.33-el7-x86_64/lib/plugin/innodb_engine.so
mysql-8.0.33-el7-x86_64/lib/plugin/keyring_file.so
mysql-8.0.33-el7-x86_64/lib/plugin/keyring_udf.so
mysql-8.0.33-el7-x86_64/lib/plugin/libmemcached.so
mysql-8.0.33-el7-x86_64/lib/plugin/libpluginmecab.so
mysql-8.0.33-el7-x86_64/lib/plugin/locking_service.so
mysql-8.0.33-el7-x86_64/lib/plugin/mypluglib.so
mysql-8.0.33-el7-x86_64/lib/plugin/mysql_clone.so
mysql-8.0.33-el7-x86_64/lib/plugin/mysql_no_login.so
mysql-8.0.33-el7-x86_64/lib/plugin/rewrite_example.so
mysql-8.0.33-el7-x86_64/lib/plugin/rewriter.so
mysql-8.0.33-el7-x86_64/lib/plugin/semisync_master.so
mysql-8.0.33-el7-x86_64/lib/plugin/semisync_replica.so
mysql-8.0.33-el7-x86_64/lib/plugin/semisync_slave.so
mysql-8.0.33-el7-x86_64/lib/plugin/semisync_source.so
mysql-8.0.33-el7-x86_64/lib/plugin/validate_password.so
mysql-8.0.33-el7-x86_64/lib/plugin/version_token.so
mysql-8.0.33-el7-x86_64/share/
mysql-8.0.33-el7-x86_64/share/bulgarian/
mysql-8.0.33-el7-x86_64/share/bulgarian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/charsets/
mysql-8.0.33-el7-x86_64/share/charsets/Index.xml
mysql-8.0.33-el7-x86_64/share/charsets/README
mysql-8.0.33-el7-x86_64/share/charsets/armscii8.xml
mysql-8.0.33-el7-x86_64/share/charsets/ascii.xml
mysql-8.0.33-el7-x86_64/share/charsets/cp1250.xml
mysql-8.0.33-el7-x86_64/share/charsets/cp1251.xml
mysql-8.0.33-el7-x86_64/share/charsets/cp1256.xml
mysql-8.0.33-el7-x86_64/share/charsets/cp1257.xml
mysql-8.0.33-el7-x86_64/share/charsets/cp850.xml
mysql-8.0.33-el7-x86_64/share/charsets/cp852.xml
mysql-8.0.33-el7-x86_64/share/charsets/cp866.xml
mysql-8.0.33-el7-x86_64/share/charsets/dec8.xml
mysql-8.0.33-el7-x86_64/share/charsets/geostd8.xml
mysql-8.0.33-el7-x86_64/share/charsets/greek.xml
mysql-8.0.33-el7-x86_64/share/charsets/hebrew.xml
mysql-8.0.33-el7-x86_64/share/charsets/hp8.xml
mysql-8.0.33-el7-x86_64/share/charsets/keybcs2.xml
mysql-8.0.33-el7-x86_64/share/charsets/koi8r.xml
mysql-8.0.33-el7-x86_64/share/charsets/koi8u.xml
mysql-8.0.33-el7-x86_64/share/charsets/latin1.xml
mysql-8.0.33-el7-x86_64/share/charsets/latin2.xml
mysql-8.0.33-el7-x86_64/share/charsets/latin5.xml
mysql-8.0.33-el7-x86_64/share/charsets/latin7.xml
mysql-8.0.33-el7-x86_64/share/charsets/macce.xml
mysql-8.0.33-el7-x86_64/share/charsets/macroman.xml
mysql-8.0.33-el7-x86_64/share/charsets/swe7.xml
mysql-8.0.33-el7-x86_64/share/czech/
mysql-8.0.33-el7-x86_64/share/czech/errmsg.sys
mysql-8.0.33-el7-x86_64/share/danish/
mysql-8.0.33-el7-x86_64/share/danish/errmsg.sys
mysql-8.0.33-el7-x86_64/share/dictionary.txt
mysql-8.0.33-el7-x86_64/share/dutch/
mysql-8.0.33-el7-x86_64/share/dutch/errmsg.sys
mysql-8.0.33-el7-x86_64/share/english/
mysql-8.0.33-el7-x86_64/share/english/errmsg.sys
mysql-8.0.33-el7-x86_64/share/estonian/
mysql-8.0.33-el7-x86_64/share/estonian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/french/
mysql-8.0.33-el7-x86_64/share/french/errmsg.sys
mysql-8.0.33-el7-x86_64/share/german/
mysql-8.0.33-el7-x86_64/share/german/errmsg.sys
mysql-8.0.33-el7-x86_64/share/greek/
mysql-8.0.33-el7-x86_64/share/greek/errmsg.sys
mysql-8.0.33-el7-x86_64/share/hungarian/
mysql-8.0.33-el7-x86_64/share/hungarian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/innodb_memcached_config.sql
mysql-8.0.33-el7-x86_64/share/italian/
mysql-8.0.33-el7-x86_64/share/italian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/japanese/
mysql-8.0.33-el7-x86_64/share/japanese/errmsg.sys
mysql-8.0.33-el7-x86_64/share/korean/
mysql-8.0.33-el7-x86_64/share/korean/errmsg.sys
mysql-8.0.33-el7-x86_64/share/messages_to_clients.txt
mysql-8.0.33-el7-x86_64/share/messages_to_error_log.txt
mysql-8.0.33-el7-x86_64/share/norwegian/
mysql-8.0.33-el7-x86_64/share/norwegian-ny/
mysql-8.0.33-el7-x86_64/share/norwegian-ny/errmsg.sys
mysql-8.0.33-el7-x86_64/share/norwegian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/polish/
mysql-8.0.33-el7-x86_64/share/polish/errmsg.sys
mysql-8.0.33-el7-x86_64/share/portuguese/
mysql-8.0.33-el7-x86_64/share/portuguese/errmsg.sys
mysql-8.0.33-el7-x86_64/share/romanian/
mysql-8.0.33-el7-x86_64/share/romanian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/russian/
mysql-8.0.33-el7-x86_64/share/russian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/serbian/
mysql-8.0.33-el7-x86_64/share/serbian/errmsg.sys
mysql-8.0.33-el7-x86_64/share/slovak/
mysql-8.0.33-el7-x86_64/share/slovak/errmsg.sys
mysql-8.0.33-el7-x86_64/share/spanish/
mysql-8.0.33-el7-x86_64/share/spanish/errmsg.sys
mysql-8.0.33-el7-x86_64/share/swedish/
mysql-8.0.33-el7-x86_64/share/swedish/errmsg.sys
mysql-8.0.33-el7-x86_64/share/ukrainian/
mysql-8.0.33-el7-x86_64/share/ukrainian/errmsg.sys
mysql-8.0.33-el7-x86_64/support-files/
mysql-8.0.33-el7-x86_64/support-files/mysql-log-rotate
mysql-8.0.33-el7-x86_64/support-files/mysql.server
mysql-8.0.33-el7-x86_64/support-files/mysqld_multi.server
mysql-8.0.33-el7-x86_64/lib/
mysql-8.0.33-el7-x86_64/lib/libmysqlclient.so
mysql-8.0.33-el7-x86_64/lib/libmysqlclient.so.21
mysql-8.0.33-el7-x86_64/lib/libmysqlclient.so.21.2.30
mysql-8.0.33-el7-x86_64/lib/private/
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/burmesedict.dict
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/char.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/cjdict.dict
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/de.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/el.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/en.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/en_US.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/en_US_POSIX.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/es.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/fr.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/it.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/ja.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/khmerdict.dict
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/laodict.dict
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/line.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/line_cj.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/line_loose.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/line_loose_cj.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/line_normal.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/line_normal_cj.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/pt.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/res_index.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/root.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/ru.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/sent.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/sent_el.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/thaidict.dict
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/title.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/word.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/word_POSIX.brk
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/zh.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/brkitr/zh_Hant.res
mysql-8.0.33-el7-x86_64/lib/private/icudt69l/unames.icu
mysql-8.0.33-el7-x86_64/lib/private/libcom_err.so
mysql-8.0.33-el7-x86_64/lib/private/libcom_err.so.3
mysql-8.0.33-el7-x86_64/lib/private/libcom_err.so.3.0
mysql-8.0.33-el7-x86_64/lib/private/libcrypto.so
mysql-8.0.33-el7-x86_64/lib/private/libcrypto.so.1.1
mysql-8.0.33-el7-x86_64/lib/private/libfido2.so.1
mysql-8.0.33-el7-x86_64/lib/private/libfido2.so.1.8.0
mysql-8.0.33-el7-x86_64/lib/private/libgssapi_krb5.so
mysql-8.0.33-el7-x86_64/lib/private/libgssapi_krb5.so.2
mysql-8.0.33-el7-x86_64/lib/private/libgssapi_krb5.so.2.2
mysql-8.0.33-el7-x86_64/lib/private/libk5crypto.so
mysql-8.0.33-el7-x86_64/lib/private/libk5crypto.so.3
mysql-8.0.33-el7-x86_64/lib/private/libk5crypto.so.3.1
mysql-8.0.33-el7-x86_64/lib/private/libkrb5.so
mysql-8.0.33-el7-x86_64/lib/private/libkrb5.so.3
mysql-8.0.33-el7-x86_64/lib/private/libkrb5.so.3.3
mysql-8.0.33-el7-x86_64/lib/private/libkrb5support.so
mysql-8.0.33-el7-x86_64/lib/private/libkrb5support.so.0
mysql-8.0.33-el7-x86_64/lib/private/libkrb5support.so.0.1
mysql-8.0.33-el7-x86_64/lib/private/liblber-2.4.so.2
mysql-8.0.33-el7-x86_64/lib/private/liblber-2.4.so.2.11.4
mysql-8.0.33-el7-x86_64/lib/private/liblber.so
mysql-8.0.33-el7-x86_64/lib/private/libldap_r-2.4.so.2
mysql-8.0.33-el7-x86_64/lib/private/libldap_r-2.4.so.2.11.4
mysql-8.0.33-el7-x86_64/lib/private/libldap_r.so
mysql-8.0.33-el7-x86_64/lib/private/libprotobuf-lite.so.3.19.4
mysql-8.0.33-el7-x86_64/lib/private/libprotobuf.so.3.19.4
mysql-8.0.33-el7-x86_64/lib/private/libsasl2.so
mysql-8.0.33-el7-x86_64/lib/private/libsasl2.so.3
mysql-8.0.33-el7-x86_64/lib/private/libsasl2.so.3.0.0
mysql-8.0.33-el7-x86_64/lib/private/libssl.so
mysql-8.0.33-el7-x86_64/lib/private/libssl.so.1.1
mysql-8.0.33-el7-x86_64/lib/private/sasl2/
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libanonymous.so
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libanonymous.so.3
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libanonymous.so.3.0.0
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libcrammd5.so
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libcrammd5.so.3
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libcrammd5.so.3.0.0
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libdigestmd5.so
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libdigestmd5.so.3
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libdigestmd5.so.3.0.0
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libgs2.so
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libgs2.so.3
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libgs2.so.3.0.0
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libgssapiv2.so
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libgssapiv2.so.3
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libgssapiv2.so.3.0.0
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libplain.so
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libplain.so.3
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libplain.so.3.0.0
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libscram.so
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libscram.so.3
mysql-8.0.33-el7-x86_64/lib/private/sasl2/libscram.so.3.0.0
mysql-8.0.33-el7-x86_64/share/
mysql-8.0.33-el7-x86_64/share/install_rewriter.sql
mysql-8.0.33-el7-x86_64/share/uninstall_rewriter.sql

修改mysql解压目录名称

cd /usr/local/
mv mysql-8.0.33-el7-x86_64 mysql

3.创建mysql用户并修改路径权限主从两节点都要

groupadd mysql
useradd -r -g mysql mysql
paswd mysql
chown -R mysql:mysql /usr/local/mysql/
chmod -R 755 /usr/local/mysql/

[root@mysql01 tmp]# cd /usr/local/
[root@mysql01 local]# mv mysql-8.0.33-el7-x86_64 mysql
[root@mysql01 local]# groupadd mysql
[root@mysql01 local]# useradd -r -g mysql mysql
[root@mysql01 local]#
[root@mysql01 local]#
[root@mysql01 local]# passwd mysql
Changing password for user mysql.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.
[root@mysql01 local]# chown -R mysql:mysql /usr/local/mysql/
[root@mysql01 local]# chmod -R 755 /usr/local/mysql/

4.创建mysql数据存储路径

主从两节点都要

mkdir -p /data/mysql/log/
mkdir -p /data/mysql/data/
mkdir -p /data/mysql/tmp/
touch /data/mysql/log/error.log
chown -R mysql:mysql /data
chmod -R 755 /data

[root@mysql01 local]# mkdir -p /data/mysql/log/
[root@mysql01 local]# mkdir -p /data/mysql/data/
[root@mysql01 local]# mkdir -p /data/mysql/tmp/
[root@mysql01 local]# touch /data/mysql/log/error.log
[root@mysql01 local]# chown -R mysql:mysql /data
[root@mysql01 local]# chmod -R 755 /data

5.初始化mysql

主从两节点都要

cd /usr/local/mysql/bin

./mysqld --initialize --user=mysql --datadir=/data/mysql/data --basedir=/usr/local/mysql --lower_case_table_names=1

ps:需要记住初始化的mysql密码,第一次登陆需要

[root@mysql01 local]# cd /usr/local/mysql/bin
[root@mysql01 bin]# ./mysqld --initialize --user=mysql --datadir=/data/mysql/data --basedir=/usr/local/mysql --lower_case_table_names=1
2024-02-27T06:04:23.395269Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.33) initializing of server in progress as process 3276
2024-02-27T06:04:23.401254Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-02-27T06:04:24.455866Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-02-27T06:04:26.187862Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: xxxxxxxx ###记录下该密码

6.配置my.cnf文件

主从两节点都要

 touch /etc/my.cnf
chmod 644 /etc/my.cnf
vi /etc/my.cnf 

ps:主从库注意server-id要设置不同

[root@mysql01 bin]# touch /etc/my.cnf
[root@mysql01 bin]# chmod 644 /etc/my.cnf
[root@mysql01 bin]# vi /etc/my.cnf
[client]
port = 3306 ##端口号根据需要修改
socket = /data/mysql/tmp/mysql.sock

[mysql]
prompt="u@db R:m:s [d]> "
no-auto-rehash

[mysqld]
user = mysql
port = 3306
basedir = /usr/local/mysql
datadir = /data/mysql/data
socket = /data/mysql/tmp/mysql.sock
pid-file = /data/mysql/tmp/mysql.pid
character-set-server=utf8mb4 ##字符集按需要修改
collation-server = utf8mb4_general_ci

sql_mode='NO_UNSIGNED_SUBTRACTION,NO_ENGINE_SUBSTITUTION'

open_files_limit = 65535
innodb_open_files = 65535
back_log=1024
max_connections = 512
max_connect_errors=1000000
interactive_timeout=300
wait_timeout=300
max_allowed_packet = 1024M
secure_file_priv=''
lower_case_table_names=1
log-error=/data/mysql/log/error.log

slow_query_log=ON
slow_query_log_file=/data/mysql/log/slow_mysql.log
long_query_time=2

innodb_flush_log_at_trx_commit=1
innodb_log_file_size =1G
innodb_redo_log_capacity=8388608
innodb_log_group_home_dir=./

log-bin-trust-function-creators=1
sync_binlog = 1
binlog_cache_size = 16M
max_binlog_cache_size = 1G
max_binlog_size=1G

#log-bin= /data/mysql/log/binlog-mysql
log-bin=mysql-bin
relay-log=mysql-relay-bin
binlog_format=row
binlog_row_image=full
server-id = 1 ###主从库该参数不通,主库1,从库2
authentication_policy =mysql_native_password

# 大小根据实际系统内存情况而定
innodb_buffer_pool_size=4G
innodb_buffer_pool_instances=4
#
#set mysqldump
[mysqldump]
user=root
password="******"

7.设置软连接重启mysql

/usr/local/mysql/support-files/mysql.server start
ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
ln -s /usr/local/mysql/mysql.sock /var/mysql.sock
service mysql restart

[root@mysql01 bin]# /usr/local/mysql/support-files/mysql.server start
Starting MySQL.. SUCCESS!
[root@mysql01 bin]# ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
[root@mysql01 bin]# ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
[root@mysql01 bin]# ln -s /usr/local/mysql/mysql.sock /var/mysql.sock
[root@mysql01 bin]# service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!

8.修改初始密码

主从两节点都要

mysql -uroot -p   ###这里登陆需要第五步的初始密码
alter user 'root'@'localhost' identified by 'xxxxxxx';
use mysql;
update user set user.Host='%' where user.User='root';
CREATE USER 'mysql'@'%' IDENTIFIED BY 'xxxxxxxx';
GRANT ALL PRIVILEGES ON `master-%` . * TO 'mysql'@'%';
flush privileges;  

[root@mysql01 bin]# mysql -uroot -p
Enter password: ###输入初始密码
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 8
Server version: 8.0.33

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

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.

root@db 14:07: [(none)]>
root@db 14:07: [(none)]>
root@db 14:07: [(none)]> alter user 'root'@'localhost' identified by 'xxxxxxxx';
Query OK, 0 rows affected, 1 warning (0.03 sec)

root@db 14:08: [(none)]> use mysql;
Database changed
root@db 14:08: [mysql]> update user set user.Host='%' where user.User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

root@db 14:08: [mysql]> CREATE USER 'mysql'@'%' IDENTIFIED BY 'xxxxxxxxx';
Query OK, 0 rows affected (0.01 sec)

root@db 14:08: [mysql]> GRANT ALL PRIVILEGES ON `master-%` . * TO 'mysql'@'%';
Query OK, 0 rows affected (0.00 sec)

root@db 14:08: [mysql]> flush privileges;
Query OK, 0 rows affected (0.01 sec)

root@db 14:08: [mysql]> exit

9.关闭防火墙

主从两节点都要

systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service

[root@mysql01 bin]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
[root@mysql01 bin]# systemctl stop firewalld.service
[root@mysql01 bin]# systemctl disable firewalld.service

10.设置开机自启动主从两节点都要cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --list

[root@mysql01 bin]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
[root@mysql01 bin]# chmod +x /etc/init.d/mysqld
[root@mysql01 bin]# chkconfig --add mysqld
[root@mysql01 bin]# chkconfig --list

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.

mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off

11.主库设置同步账号并赋权

主节点

create user 'repl'@'%' identified with mysql_native_password by 'xxxxxxxx';
grant replication slave on *.* to 'repl'@'%';

flush privileges;

show variables like '%server_id%';
show master status;

[root@mysql01 bin]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 10
Server version: 8.0.33 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

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.

root@db 14:11: [(none)]> create user 'repl'@'%' identified with mysql_native_password by 'xxxxxxxxx';
Query OK, 0 rows affected (0.00 sec)

root@db 14:11: [(none)]> grant replication slave on *.* to 'repl'@'%';
Query OK, 0 rows affected (0.01 sec)

root@db 14:11: [(none)]> flush privileges;
Query OK, 0 rows affected (0.01 sec)

root@db 14:11: [(none)]> show variables like '%server_id%';
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| server_id | 1 |
| server_id_bits | 32 |
+----------------+-------+
2 rows in set (0.00 sec)

root@db 14:12: [(none)]>
root@db 14:12: [(none)]> show master status; ###这里显示的file和position 配置从库时需要使用到
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000002 | 2628 | | | |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)

root@db 14:12: [(none)]>

12.配置从库同步信息

从库配置
show variables like '%server_id%';
change master to master_host='master ip',master_user='repl',master_port = 3306 ,master_password='xxxxxxxx',master_log_file='mysql-bin.000002',master_log_pos=2628;
参数解释:
master_host为主服务器的ip
master_user为连接主服务器的用户名
master_password为连接主服务器的密码

master_port 主库的端口,如果是默认3306端口可以不写

master_log_file为要同步的日志文件file,即对应上面主服务器查看时的File字段
master_log_pos为要同步日志文件的位置,即对应上面主服务器查看时的Position字段

start slave;

show slave status G;   确保如下连个参数为yes 则为主从配置成功

Slave_IO_Running:  YES

Slave_SQL_Running: YES

[root@mysql02 bin]# mysql -uroot -p ##登陆mysql
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 11
Server version: 8.0.33 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

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.

root@db 14:12: [(none)]> show variables like '%server_id%'; ##确认server id和主库不同
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| server_id | 2 |
| server_id_bits | 32 |
+----------------+-------+
2 rows in set (0.01 sec)

root@db 14:12: [(none)]> change master to master_host='10.234.56.78',master_user='repl',master_port = 3306,master_password='xxxxxxxx',master_log_file='mysql-bin.000002',master_log_pos=2628;
Query OK, 0 rows affected, 9 warnings (0.02 sec)
###根据实际情况修改主库信息

root@db 14:13: [(none)]>
root@db 14:13: [(none)]> start slave; ##启动同步
Query OK, 0 rows affected, 1 warning (0.01 sec)

root@db 14:14: [(none)]>
root@db 14:14: [(none)]> show slave status G; ##查看同步状态
*************************** 1. row ***************************
Slave_IO_State: Waiting for source to send event
Master_Host: 10.235.38.61
Master_User: repl
Master_Port: 33066
Connect_Retry: 60
Master_Log_File: mysql-bin.000002
Read_Master_Log_Pos: 2628
Relay_Log_File: mysql-relay-bin.000002
Relay_Log_Pos: 326
Relay_Master_Log_File: mysql-bin.000002
Slave_IO_Running: Yes ##确保改参数为yes
Slave_SQL_Running: Yes ## 确保改参数为yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 2628
Relay_Log_Space: 536
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: 0df21031-d536-11ee-a0cd-005056a91cf7
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Replica has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
Master_public_key_path:
Get_master_public_key: 0
Network_Namespace:
1 row in set, 1 warning (0.01 sec)

ERROR:
No query specified

root@db 14:14: [(none)]>

13.测试验证同步状态

 创建测试库,测试表已经插入数据

root@db 08:58: [(none)]> create database test;
Query OK, 1 row affected (0.01 sec)

root@db 09:00: [(none)]> use test;
Database changed
root@db 09:01: [test]>
root@db 09:01: [test]> CREATE TABLE students (
-> id INT AUTO_INCREMENT PRIMARY KEY,
-> name VARCHAR(50),
-> age INT,
-> gender ENUM('Male', 'Female', 'Other'),
-> birthday DATE
-> );
Query OK, 0 rows affected (0.04 sec)

root@db 09:01: [test]>
root@db 09:01: [test]> INSERT INTO students (name, age, gender, birthday)
-> VALUES ('John Doe', 25, 'Male', '1999-05-15');
Query OK, 1 row affected (0.00 sec)

root@db 09:02: [test]>
root@db 09:02: [test]> select * from students;
+----+----------+------+--------+------------+
| id | name | age | gender | birthday |
+----+----------+------+--------+------------+
| 1 | John Doe | 25 | Male | 1999-05-15 |
+----+----------+------+--------+------------+
1 row in set (0.00 sec)

root@db 09:02: [test]>

备库验证


root@db 09:02: [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| test |
+--------------------+
5 rows in set (0.00 sec)

root@db 09:02: [(none)]> use test;
Database changed
root@db 09:02: [test]> select * from students;
+----+----------+------+--------+------------+
| id | name | age | gender | birthday |
+----+----------+------+--------+------------+
| 1 | John Doe | 25 | Male | 1999-05-15 |
+----+----------+------+--------+------------+
1 row in set (0.00 sec)

root@db 09:02: [test]>

-------------------------------------------------------------------------------------

墨天伦,CSDN:潇湘秦 转载请注明出处

墨天伦:潇湘秦的个人主页 - 墨天轮
CSDN:https://blog.csdn.net/xiaofan23z/?type=blog

公众号:潇湘秦的DBA之路

-------------------------------------------------------------------------------------

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论