《MySQL5.6Linux安装》由会员分享,可在线阅读,更多相关《MySQL5.6Linux安装(7页珍藏版)》请在金锄头文库上搜索。
1、文档供参考,可复制、编制,期待您的好评与关注! Mysql安装过程(linux:2.6.18-194.el5,Mysql:) 1、安装rootRAC2 mysql# rpm -ivh MySQL-server-5.6.12-2.rhel5.x86_64.rpm Preparing. # 100% 1:MySQL-server # 100%rootRAC2 mysql# rpm -ivh MySQL-client-5.6.12-2.rhel5.x86_64.rpm Preparing. # 100% 1:MySQL-client # 100%2、安装完查看默认3306端口没有开rootRAC2
2、mysql# netstat -natActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:833 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 :22 :* LISTEN
3、 tcp 0 0 :ffff:192.168.72.5:22 :ffff:192.168.72.1:63851 ESTABLISHED tcp 0 0 :ffff:192.168.72.5:22 :ffff:192.168.72.1:62929 ESTABLISHED 3、将mysql启动rootRAC2 init.d# service mysql startStarting MySQL.确定4、再次确认端口是打开的rootRAC2 init.d# netstat -natActive Internet connections (servers and established)Proto Re
4、cv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:833 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 :3306 :* LISTEN tcp 0 0 :22 :* LISTEN tcp 0 0 :ffff:192.168.72.5:22 :ffff:192.168.72.1:63851
5、ESTABLISHED tcp 0 0 :ffff:192.168.72.5:22 :ffff:192.168.72.1:62929 ESTABLISHED 5、连接mysqlrootRAC2 bin# mysql -u rootERROR 1045 (28000): Access denied for user rootlocalhost (using password: NO)在网上查资料,可以这样来解决:rootRAC2 bin# /etc/init.d/mysql stopShutting down MySQL.确定rootRAC2 bin# mysqld_safe -user=mys
6、ql -skip-grant-tables -skip-networking &1 6025rootRAC2 bin# 130716 19:00:36 mysqld_safe Logging to /var/lib/mysql/RAC2.err.130716 19:00:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysqlrootRAC2 bin# mysql -u root mysqlReading table information for completion of table and colum
7、n namesYou can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection id is 2Server version: 5.6.12 MySQL Community Server (GPL)Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a register
8、ed trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type help; or h for help. Type c to clear the current input statement.mysql show databases;+-+| Database |+-+| information_schema | mysql | performance_schema | test |+-+4 rows in set (0.
9、00 sec)mysql use mysql;Database changedmysql show tables;+-+| Tables_in_mysql |+-+| columns_priv | db | event | func | general_log | help_category | help_keyword | help_relation | help_topic | innodb_index_stats | innodb_table_stats | ndb_binlog_index | plugin | proc | procs_priv | proxies_priv | se
10、rvers | slave_master_info | slave_relay_log_info | slave_worker_info | slow_log | tables_priv | time_zone | time_zone_leap_second | time_zone_name | time_zone_transition | time_zone_transition_type | user |+-+28 rows in set (0.00 sec)mysql desc user;+-+-+-+-+-+-+| Field | Type | Null | Key | Default | Extra |+-+-