mysql 5.7 linux環境下安裝部署

本文轉自:http://cache.baiducontent.com/c?m=9d78d513d99d1af31fa7837e7c01a7640e2480744ad2c7657dc39339d5371b564616f4bb50351174868d6b6770a85e5d9ae73605200250b28cc9f81596fad1763888566b3b5dc51f05d269b8cc3232c050cb06a8e94ab9e4e733e3b9d5a7c855239c03113dc0ae840046528878f1672cfef6c715404810cdbc7133a34e775ec37406ab02a9eb363d0483f4d8411f836c8b304fc0b263e77841ee4de5021c2743a747b40e52&p=8b2a975692db09fe1fbd9b7d0d1782&newp=ce34c54ad5c340ef44f1d62d021491231610db2151d4d4156b82c825d7331b001c3bbfb423231304d4c27d6d0ba54d56ebf4317534072ba3dda5c91d9fb4c57479c83b2832&user=baidu&fm=sc&query=linux+%B0%B2%D7%B0+tar%2Egz+5%2E7mysql++mysql%5Finstall%5Fdb&qid=b2aa7fb1000bcf4a&p1=4


很感謝該博主分享,之前在網上找了很多帖子無果。重裝虛擬機N次。


1、下載安裝包 並放在/data/software/目錄下
http://dev.mysql.com/downloads/mysql/#downloads 



查看是否安裝過mysql

[root@localhost ~]# rpm -qa | grep mysql
mysql-server-5.1.71-1.el6.x86_64
mysql-libs-5.1.71-1.el6.x86_64
mysql-5.1.71-1.el6.x86_64
qt-mysql-4.6.2-26.el6_4.x86_64

停止mysql服務

[root@localhost ~]# service mysqld stop
Stopping mysqld:  [  OK  ]
[root@localhost ~]# rpm -e --nodeps mysql-server-5.1.71-1.el6.x86_64
[root@localhost ~]# rpm -e --nodeps mysql-libs-5.1.71-1.el6.x86_64
[root@localhost ~]# rpm -e --nodeps mysql-5.1.71-1.el6.x86_64

[root@localhost ~]# rpm -e --nodeps qt-mysql-4.6.2-26.el6_4.x86_64

[root@localhost ~]# find / -name mysql
.....
[root@localhost ~]# rm  -rf ....





準備工作(創建mysql用戶及其mysql用戶組 生產用戶目錄 及其設置該賬號不能登錄)
[root@localhost ~]# userdel mysql
[root@localhost ~]# groupdel mysql
groupdel: group 'mysql' does not exist
[root@localhost ~]# groupadd mysql
[root@localhost ~]# useradd -g mysql mysql -d /home/mysql -s /sbin/nologin
[root@localhost ~]# 


解壓tar.gz 並重命名 轉讓所屬權限給mysql賬號

<span style="font-size:14px;">[root@localhost ~]# cd /usr/local/
[root@localhost local]# tar -vxzf /data/software/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz 
mysql-5.7.13-linux-glibc2.5-x86_64/
mysql-5.7.13-linux-glibc2.5-x86_64/README
mysql-5.7.13-linux-glibc2.5-x86_64/lib/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/libmysqlclient.a
mysql-5.7.13-linux-glibc2.5-x86_64/lib/libmysqlclient.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/libmysqlservices.a
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/char.bin
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/right-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/left-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/dicrc
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/matrix.bin
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/pos-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/unk.dic
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/sys.dic
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_sjis/rewrite.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/char.bin
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/right-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/left-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/dicrc
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/matrix.bin
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/pos-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/unk.dic
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/sys.dic
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_utf-8/rewrite.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/char.bin
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/right-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/left-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/dicrc
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/matrix.bin
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/pos-id.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/unk.dic
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/sys.dic
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/dic/ipadic_euc-jp/rewrite.def
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/etc/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/mecab/etc/mecabrc
mysql-5.7.13-linux-glibc2.5-x86_64/lib/libmysqlclient.so.20.3.0
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_session_in_thd.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_2_sessions.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_processlist.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/version_token.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_commit.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_errors.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/semisync_slave.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/adt_null.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_replication.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/mysql_no_login.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/rewrite_example.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/test_udf_services.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/validate_password.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/keyring_udf.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/innodb_engine.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/rewriter.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_complex.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_session_info.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_framework.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_sqlmode.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/mypluglib.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_x_sessions_init.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/mysqlx.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_shutdown.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_services_threaded.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/semisync_master.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_session_in_thd.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_2_sessions.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_processlist.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/version_token.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_commit.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_errors.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/semisync_slave.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/adt_null.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_replication.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/mysql_no_login.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/rewrite_example.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/test_udf_services.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/validate_password.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/keyring_udf.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/innodb_engine.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/rewriter.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_complex.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_session_info.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_framework.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_sqlmode.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/mypluglib.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_x_sessions_init.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/mysqlx.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_shutdown.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_services_threaded.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/semisync_master.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_x_sessions_deinit.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libmemcached.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_cmds_1.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/locking_service.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libpluginmecab.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_views_triggers.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/ha_example.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_all_col_types.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/auth_socket.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_stored_procedures_functions.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/test_security_context.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_session_detach.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_sql_lock.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/keyring_file.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/debug/libtest_services.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_x_sessions_deinit.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libmemcached.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_cmds_1.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/locking_service.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libpluginmecab.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_views_triggers.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/ha_example.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_all_col_types.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/auth_socket.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_stored_procedures_functions.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/test_security_context.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_session_detach.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_sql_lock.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/keyring_file.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/plugin/libtest_services.so
mysql-5.7.13-linux-glibc2.5-x86_64/lib/libmysqld.a
mysql-5.7.13-linux-glibc2.5-x86_64/lib/libmysqlclient.so.20
mysql-5.7.13-linux-glibc2.5-x86_64/lib/libmysqld-debug.a
mysql-5.7.13-linux-glibc2.5-x86_64/lib/pkgconfig/
mysql-5.7.13-linux-glibc2.5-x86_64/lib/pkgconfig/mysqlclient.pc
mysql-5.7.13-linux-glibc2.5-x86_64/support-files/
mysql-5.7.13-linux-glibc2.5-x86_64/support-files/magic
mysql-5.7.13-linux-glibc2.5-x86_64/support-files/mysql.server
mysql-5.7.13-linux-glibc2.5-x86_64/support-files/mysqld_multi.server
mysql-5.7.13-linux-glibc2.5-x86_64/support-files/mysql-log-rotate
mysql-5.7.13-linux-glibc2.5-x86_64/support-files/my-default.cnf
mysql-5.7.13-linux-glibc2.5-x86_64/share/
mysql-5.7.13-linux-glibc2.5-x86_64/share/innodb_memcached_config.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/hungarian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/hungarian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/greek/
mysql-5.7.13-linux-glibc2.5-x86_64/share/greek/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/swe7.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/koi8u.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/latin7.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/cp1251.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/README
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/ascii.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/macroman.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/cp1257.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/greek.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/dec8.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/latin5.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/cp1250.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/cp850.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/Index.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/latin2.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/hebrew.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/geostd8.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/cp852.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/macce.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/koi8r.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/hp8.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/armscii8.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/keybcs2.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/cp1256.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/latin1.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/charsets/cp866.xml
mysql-5.7.13-linux-glibc2.5-x86_64/share/czech/
mysql-5.7.13-linux-glibc2.5-x86_64/share/czech/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/mysql_sys_schema.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/aclocal/
mysql-5.7.13-linux-glibc2.5-x86_64/share/aclocal/mysql.m4
mysql-5.7.13-linux-glibc2.5-x86_64/share/swedish/
mysql-5.7.13-linux-glibc2.5-x86_64/share/swedish/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/uninstall_rewriter.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/polish/
mysql-5.7.13-linux-glibc2.5-x86_64/share/polish/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/mysql_system_tables.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/estonian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/estonian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/norwegian-ny/
mysql-5.7.13-linux-glibc2.5-x86_64/share/norwegian-ny/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/ukrainian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/ukrainian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/slovak/
mysql-5.7.13-linux-glibc2.5-x86_64/share/slovak/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/norwegian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/norwegian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/french/
mysql-5.7.13-linux-glibc2.5-x86_64/share/french/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/portuguese/
mysql-5.7.13-linux-glibc2.5-x86_64/share/portuguese/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/german/
mysql-5.7.13-linux-glibc2.5-x86_64/share/german/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/italian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/italian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/russian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/russian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/english/
mysql-5.7.13-linux-glibc2.5-x86_64/share/english/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/japanese/
mysql-5.7.13-linux-glibc2.5-x86_64/share/japanese/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/dutch/
mysql-5.7.13-linux-glibc2.5-x86_64/share/dutch/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/bulgarian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/bulgarian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/korean/
mysql-5.7.13-linux-glibc2.5-x86_64/share/korean/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/errmsg-utf8.txt
mysql-5.7.13-linux-glibc2.5-x86_64/share/spanish/
mysql-5.7.13-linux-glibc2.5-x86_64/share/spanish/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/mysql_system_tables_data.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/fill_help_tables.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/romanian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/romanian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/danish/
mysql-5.7.13-linux-glibc2.5-x86_64/share/danish/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/share/install_rewriter.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/mysql_test_data_timezone.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/dictionary.txt
mysql-5.7.13-linux-glibc2.5-x86_64/share/mysql_security_commands.sql
mysql-5.7.13-linux-glibc2.5-x86_64/share/serbian/
mysql-5.7.13-linux-glibc2.5-x86_64/share/serbian/errmsg.sys
mysql-5.7.13-linux-glibc2.5-x86_64/COPYING
mysql-5.7.13-linux-glibc2.5-x86_64/bin/
mysql-5.7.13-linux-glibc2.5-x86_64/bin/myisampack
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqlshow
mysql-5.7.13-linux-glibc2.5-x86_64/bin/resolveip
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_plugin
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqld-debug
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqldumpslow
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqltest_embedded
mysql-5.7.13-linux-glibc2.5-x86_64/bin/myisam_ftdump
mysql-5.7.13-linux-glibc2.5-x86_64/bin/myisamlog
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_client_test_embedded
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqlcheck
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqladmin
mysql-5.7.13-linux-glibc2.5-x86_64/bin/resolve_stack_dump
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_tzinfo_to_sql
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqlslap
mysql-5.7.13-linux-glibc2.5-x86_64/bin/lz4_decompress
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqld
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqlxtest
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqldump
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqld_multi
mysql-5.7.13-linux-glibc2.5-x86_64/bin/replace
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_install_db
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqlimport
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqld_safe
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqlpump
mysql-5.7.13-linux-glibc2.5-x86_64/bin/zlib_decompress
mysql-5.7.13-linux-glibc2.5-x86_64/bin/perror
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysqlbinlog
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_upgrade
mysql-5.7.13-linux-glibc2.5-x86_64/bin/myisamchk
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_config_editor
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql
mysql-5.7.13-linux-glibc2.5-x86_64/bin/innochecksum
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_secure_installation
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_ssl_rsa_setup
mysql-5.7.13-linux-glibc2.5-x86_64/bin/my_print_defaults
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_embedded
mysql-5.7.13-linux-glibc2.5-x86_64/bin/mysql_config
mysql-5.7.13-linux-glibc2.5-x86_64/man/
mysql-5.7.13-linux-glibc2.5-x86_64/man/man8/
mysql-5.7.13-linux-glibc2.5-x86_64/man/man8/mysqld.8
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/myisamchk.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqldump.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_client_test_embedded.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqlman.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/innochecksum.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqldumpslow.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_install_db.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_client_test.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/replace.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqld_safe.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_upgrade.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqlbinlog.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqltest_embedded.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_config_editor.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqld_multi.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/resolve_stack_dump.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqlcheck.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql.server.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/my_print_defaults.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_tzinfo_to_sql.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/myisam_ftdump.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_ssl_rsa_setup.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqlshow.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql-stress-test.pl.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqlpump.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_plugin.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/perror.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_config.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/comp_err.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/resolveip.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqlimport.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/myisampack.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/zlib_decompress.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/myisamlog.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql-test-run.pl.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/lz4_decompress.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqlslap.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysqladmin.1
mysql-5.7.13-linux-glibc2.5-x86_64/man/man1/mysql_secure_installation.1
mysql-5.7.13-linux-glibc2.5-x86_64/include/
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_thread_local.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_list.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/sql_state.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_dbug.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysqld_ername.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/big_endian.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_command.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/byte_order_generic_x86.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/plugin_keyring.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/typelib.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/m_string.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/plugin_audit.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/thr_cond.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_xml.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/byte_order_generic.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/sslopt-case.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql_version.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_global.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql_time.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/sql_common.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql_com_server.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/keycache.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql_com.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/sslopt-longopts.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_dir.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/plugin_validate_password.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysqld_error.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/plugin_group_replication.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_thread.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_alloc.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/m_ctype.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/sslopt-vars.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/little_endian.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_sys.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/errmsg.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/thr_rwlock.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/decimal.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/binary_log_types.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_locking.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_srv_session.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_keyring.h.pp
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_command.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_ssl_wrapper.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/client_authentication.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_auth_common.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/group_replication_priv.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_mysql_alloc.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_keyring.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/client_plugin.h.pp
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_auth.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/thread_type.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/thread_pool_priv.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_auth.h.pp
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_audit.h.pp
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/services.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_trace.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/innodb_priv.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_audit.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_my_snprintf.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/get_password.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_thread_scheduler.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/client_plugin.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_thd_wait.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_thd_engine_lock.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_security_context.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_srv_session_info.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_rpl_transaction_ctx.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_my_plugin_log.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/services.h.pp
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_mysql_string.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_parser.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/mysql_lex_string.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_rpl_transaction_write_set.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_validate_password.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_mysql_password_policy.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_socket.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_mdl.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_sp.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_transaction.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_memory.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_stage.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_thread.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_file.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_idle.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_ps.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/psi_base.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_statement.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/psi.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/mysql_table.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/psi/psi_memory.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_mysql_keyring.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_group_replication.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/com_data.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_ftparser.h.pp
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/plugin_ftparser.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_rules_table.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql/service_thd_alloc.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/plugin.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_config.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/plugin_ftparser.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_compiler.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/thr_mutex.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_byteorder.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/mysql_embed.h
mysql-5.7.13-linux-glibc2.5-x86_64/include/my_getopt.h
mysql-5.7.13-linux-glibc2.5-x86_64/docs/
mysql-5.7.13-linux-glibc2.5-x86_64/docs/INFO_SRC
mysql-5.7.13-linux-glibc2.5-x86_64/docs/ChangeLog
mysql-5.7.13-linux-glibc2.5-x86_64/docs/INFO_BIN
[root@localhost local]# mv mysql-5.7.13-linux-glibc2.5-x86_64/ mysql
[root@localhost local]# ls
bin  etc  games  include  lib  lib64  libexec  mysql  sbin  share  src
[root@localhost local]# chown -R mysql mysql/
[root@localhost local]# chgrp -R mysql mysql/
[root@localhost local]# ls -al
total 52
drwxr-xr-x. 13 root  root  4096 Aug  5 04:42 .
drwxr-xr-x. 13 root  root  4096 Nov 30  2013 ..
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 bin
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 etc
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 games
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 include
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 lib
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 lib64
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 libexec
drwxr-xr-x.  9 mysql mysql 4096 May 25 15:04 mysql
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 sbin
drwxr-xr-x.  5 root  root  4096 Nov 30  2013 share
drwxr-xr-x.  2 root  root  4096 Sep 23  2011 src
[root@localhost local]# </span>

創建數據庫文件夾

[root@localhost local]# mkdir /usr/local/data
<pre name="code" class="python">[root@localhost mysql]# chown -R mysql data/
[root@localhost mysql]# chgrp -R mysql data/
[root@localhost local]#

ps:(上面是默認路徑。如果你希望是其他路徑也可以創建軟連接進行連接 如:)

<span style="color:#ff0000;">mkdir -p /usr/local/mysql/bin
ln -s /apps/mysql/bin/mysqld /usr/local/mysql/bin/mysqld</span>

安裝和初始化


[root@localhost mysql]# chown -R mysql data/
[root@localhost mysql]# chgrp -R mysql data/


[root@localhost mysql]# bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
2016-06-01 15:23:25 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2016-06-01 15:23:30 [WARNING] The bootstrap log isn't empty:
2016-06-01 15:23:30 [WARNING] 2016-06-01T22:23:25.491840Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead
2016-06-01T22:23:25.492256Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-06-01T22:23:25.492260Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
----------------------
如果改變默認安裝路徑,則需要
1)/etc/my.cnf、/etc/init.d/mysqld中修改
basedir='/apps/mysql'
datadir='/apps/mysql/data'
2)創建ln
mkdir -p /usr/local/mysql/bin
ln -s /apps/mysql/bin/mysqld /usr/local/mysql/bin/mysqld
----------------------

[root@localhost mysql]#

[root@localhost mysql]# cp -a ./support-files/my-default.cnf /etc/my.cnf
[root@localhost mysql]# cp -a ./support-files/mysql.server  /etc/init.d/mysqld

[root@localhost mysql]# cd bin/
[root@localhost bin]# ./mysqld_safe --user=mysql &
[1] 2932
[root@localhost bin]# 2016-06-01T22:27:09.708557Z mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
2016-06-01T22:27:09.854913Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

[root@localhost bin]# /etc/init.d/mysqld restart
Shutting down MySQL..2016-06-01T22:27:50.498694Z mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.localdomain.pid ended
 SUCCESS! 
Starting MySQL. SUCCESS! 
[1]+  Done                    ./mysqld_safe --user=mysql
[root@localhost bin]# 
//設置開機啓動
[root@localhost bin]# chkconfig --level 35 mysqld on
[root@localhost bin]#

6.初始化密碼
mysql5.7會生成一個初始化密碼,而在之前的版本首次登陸不需要登錄。
[root@localhost bin]# cat /root/.mysql_secret 
# Password set for user 'root@localhost' at 2016-06-01 15:23:25 
,xxxxxR5H9
[root@localhost bin]# ./mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.12

Copyright (c) 2000, 2016, 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> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

7.添加遠程訪問權限

mysql> use mysql; 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A


Database changed
mysql> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

1、初始化root密碼

進入mysql數據庫

mysql>update user set password=PASSWORD(‘123456’) where User='root';
2、允許mysql遠程訪問,可以使用以下三種方式:

a、改表。

mysql -u root –p
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
b、授權。

例如,你想root使用123456從任何主機連接到mysql服務器。

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
如果你想允許用戶jack從ip爲10.10.50.127的主機連接到mysql服務器,並使用654321作爲密碼

mysql>GRANT ALL PRIVILEGES ON *.* TO 'jack'@’10.10.50.127’ IDENTIFIED BY '654321' WITH GRANT OPTION;
mysql>FLUSH RIVILEGES
c:在安裝mysql的機器上運行:

//進入MySQL服務器
d:\mysql\bin\>mysql -h localhost -u root
//賦予任何主機訪問數據的權限
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION
//使修改生效
mysql>FLUSH PRIVILEGES
//退出MySQL服務器
mysql>EXIT


rpm -e --nodeps
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章