歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

linux安裝mysql5.6實時教程和配置

\
接下來就是安裝了分別依次執行:
[root@iZ25in7iu0fZ rpm]# rpm -ivh MySQL-server-5.6.15-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
2015-03-06 08:16:03 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_fZ喎�"http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcl90aW1lc3RhbXAgc2VydmVyIG9wdGlvbiAoc2VlIGRvY3VtZW50YXRpb24gZm9yIG1vcmUgZGV0YWlscykuPGJyPgoyMDE1LTAzLTA2IDA4OjE2OjAzIDI4NjI5IFtOb3RlXSBJbm5vREI6IFRoZSBJbm5vREIgbWVtb3J5IGhlYXAgaXMgZGlzYWJsZWQ8YnI+CjIwMTUtMDMtMDYgMDg6MTY6MDMgMjg2MjkgW05vdGVdIElubm9EQjogTXV0ZXhlcyBhbmQgcndfbG9ja3MgdXNlIEdDQyBhdG9taWMgYnVpbHRpbnM8YnI+CjIwMTUtMDMtMDYgMDg6MTY6MDMgMjg2MjkgW05vdGVdIElubm9EQjogQ29tcHJlc3NlZCB0YWJsZXMgdXNlIHpsaWIgMS4yLjM8YnI+CjIwMTUtMDMtMDYgMDg6MTY6MDMgMjg2MjkgW05vdGVdIElubm9EQjogVXNpbmcgTGludXggbmF0aXZlIEFJTzxicj4KMjAxNS0wMy0wNiAwODoxNjowMyAyODYyOSBbTm90ZV0gSW5ub0RCOiBVc2luZyBDUFUgY3JjMzIgaW5zdHJ1Y3Rpb25zPGJyPgoyMDE1LTAzLTA2IDA4OjE2OjAzIDI4NjI5IFtOb3RlXSBJbm5vREI6IEluaXRpYWxpemluZyBidWZmZXIgcG9vbCwgc2l6ZSA9IDEyOC4wTTxicj4KMjAxNS0wMy0wNiAwODoxNjowMyAyODYyOSBb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FTS optimize thread exiting.
2015-03-06 08:16:07 28629 [Note] InnoDB: Starting shutdown...
2015-03-06 08:16:08 28629 [Note] InnoDB: Shutdown completed; log sequence number 1625977




2015-03-06 08:16:08 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-03-06 08:16:08 28652 [Note] InnoDB: The InnoDB memory heap is disabled
2015-03-06 08:16:08 28652 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-03-06 08:16:08 28652 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-03-06 08:16:08 28652 [Note] InnoDB: Using Linux native AIO
2015-03-06 08:16:08 28652 [Note] InnoDB: Using CPU crc32 instructions
2015-03-06 08:16:08 28652 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-03-06 08:16:08 28652 [Note] InnoDB: Completed initialization of buffer pool
2015-03-06 08:16:08 28652 [Note] InnoDB: Highest supported file format is Barracuda.
2015-03-06 08:16:08 28652 [Note] InnoDB: 128 rollback segment(s) are active.
2015-03-06 08:16:08 28652 [Note] InnoDB: Waiting for purge to start
2015-03-06 08:16:08 28652 [Note] InnoDB: 5.6.15 started; log sequence number 1625977
2015-03-06 08:16:08 28652 [Note] Binlog end
2015-03-06 08:16:08 28652 [Note] InnoDB: FTS optimize thread exiting.
2015-03-06 08:16:08 28652 [Note] InnoDB: Starting shutdown...
2015-03-06 08:16:10 28652 [Note] InnoDB: Shutdown completed; log sequence number 1625987



[root@iZ25in7iu0fZ rpm]# rpm -ivh MySQL-devel-5.6.15-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
[root@iZ25in7iu0fZ rpm]# rpm -ivh MySQL-client-5.6.15-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]

修改配置文件位置。
[root@iZ25in7iu0fZ rpm]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf初始化MySQL及設置密碼
cp /usr/share/mysql/my-default.cnf /etc/my.cnf
/usr/bin/mysql_install_db
cat /root/.mysql_secret 
記錄最後的密碼
mysql -p ---輸入記錄的密碼,即可登錄mysql。
set password for 'root'@'localhost' =password('新密碼');
flush privileges;
exit設置自啟動
chkconfig mysql on

MySQL的默認安裝位置
Copyright © Linux教程網 All Rights Reserved