mysql5.6下载linux云盘,mysql5.6linux安装

62e50291a81fc54b507f33cb80033297.gif mysql5.6linux安装

(7页)

1ed7a68d5b5800cb29df036345e3cef5.gif

本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦!

14.90 积分

Mysql安装过程(linux:2.6.18-194.el5,Mysql:) 1、安装[root@RAC2 mysql]# rpm -ivh MySQL-server-5.6.12-2.rhel5.x86_64.rpm Preparing... ########################################### [100%] 1:MySQL-server ########################################### [100%][root@RAC2 mysql]# rpm -ivh MySQL-client-5.6.12-2.rhel5.x86_64.rpm Preparing... ########################################### [100%] 1:MySQL-client ########################################### [100%]2、安装完查看默认3306端口没有开[root@RAC2 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 www.wenku365.com:631 0.0.0.0:* LISTEN tcp 0 0 www.wenku365.com:25 0.0.0.0:* LISTEN tcp 0 0 :::22 :::* LISTEN 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启动[root@RAC2 init.d]# service mysql startStarting MySQL..[确定]4、再次确认端口是打开的[root@RAC2 init.d]# 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 www.wenku365.com:631 0.0.0.0:* LISTEN tcp 0 0 www.wenku365.com: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 ESTABLISHED tcp 0 0 ::ffff:192.168.72.5:22 ::ffff:192.168.72.1:62929 ESTABLISHED 5、连接mysql[root@RAC2 bin]# mysql -u rootERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)在网上查资料,可以这样来解决:[root@RAC2 bin]# /etc/init.d/mysql stopShutting down MySQL..[确定][root@RAC2 bin]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &[1] 6025[root@RAC2 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/mysql[root@RAC2 bin]# mysql -u root mysqlReading table information for completion of table and column 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 registered 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.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 || servers || 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 |+------------------------+-----------------------------------+------+-----+---------+-------+| Host | char(60) | NO | PRI | | || User | char(16) | NO | PRI | | || Password | char(41) | NO | | | || Select_priv | enum('N','Y') | NO | | N | || Insert_priv | enum('N','Y') | NO | | N | || Update_priv | enum('N','Y') | NO | | N | || Delete_priv | enum('N','Y') | NO | | N | || Create_priv | enum('N','Y') | NO | | N | || Drop_priv | enum('N','Y') | NO | | N | || Reload_priv | enum('N','Y') | NO | | N | || Shutdown_priv | enum('N','Y') | NO | | N | || Process_priv | enum('N','Y') | NO | | N | || File_priv | enum('N','Y') | NO | | N | || Grant_priv | enum('N','Y') | NO | | N | || References_priv | enum('N','Y') | NO | | N | || Index_priv | enum('N','Y') | NO | | N | || Alter_priv | enum('N','Y') | NO | | N | || Show_db_priv | enum('N','Y') | NO | | N | || Super_priv | enum('N','Y') | NO | | N | || Create_tmp_table_priv | enum('N','Y') | NO | | N | || Lock_tables_priv | enum('N','Y') | NO | | N | || Execute_priv | enum('N','Y') | NO | | N | || Repl_slave_priv | enum('N','Y') | NO | | N | || Repl_client_priv | enum('N','Y') | NO | | N | || Create_view_priv | enum('N','Y') | NO | | N | || Show_view_priv | enum('N','Y') | NO | | N | || Create_routine_priv | enum('N','Y') | NO | | N | || Alter_routine_priv | enum('N','Y') | NO | | N | || Create_user_priv | enum('N','Y') | NO | | N | || Event_priv | enum('N','Y') | NO | | N | || Trigger_priv | enum('N','Y') | NO | | N | || Create_tablespace_priv | enum('N','Y') | NO | | N | || ssl_type | enum('','ANY','X509','SPECIFIED') | NO | | | || ssl_cipher | blob | NO | | NULL | || x509_issuer | blob | NO | | NULL | || x509_subject | blob | NO | | NULL | || max_questions | int(11) unsigned | NO | | 0 | || max_updates | int(11) unsigned | NO | | 0 | || max_connections | int(11) unsigned | NO | | 0 | || max_user_connections | int(11) unsigned | NO | | 0 | || plugin | char(64) | YES | | | || authentication_string | text | YES | | NULL | || password_expired | enum('N','Y') | NO | | N | |+------------------------+-----------------------------------+------+-----+---------+-------+43 rows in set (0.00 sec)mysql> select hosr,user,password from user;ERROR 1054 (42S22): Unknown column 'hosr' in 'field list'mysql> select host,user,password from user;+-----------+------+-------------------------------------------+| host | user | password |+-----------+------+-------------------------------------------+| localhost | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C || RAC2 | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C || www.wenku365.com | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C || ::1 | root | *34F5F8A5C7F9EA100FB15F7FCF1BC31271C3D43C |+-----------+------+-------------------------------------------+4 rows in set (0.00 sec)mysql> update user set password=password('root123') where user='root' and host='localhost';Query OK, 1 row affected (0.00 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> commit -> ;Query OK, 0 rows affected (0.00 sec)执行下面这一句,是因为上面使表处于:The MySQL server is running with the --skip-grant-tables option,如果不执行下面这句,即使连上数据库也执行不了操作。mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> quitBye[root@RAC2 bin]# /etc/init.d/mysql restartShutting down MySQL..130716 19:03:34 mysqld_safe mysqld from pid file /var/lib/mysql/RAC2.pid ended[确定]Starting MySQL..[确定][1]+ Done mysqld_safe --user=mysql --skip-grant-tables --skip-networking[root@RAC2 bin]# mysql -u root -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.6.12Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered 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>下面这步有点诡异啊~mysql> use mysql;ERROR 1820 (HY000): You must SET PASSWORD before executing this statementmysql> show databases;ERROR 1820 (HY000): You must SET PASSWORD before executing this statementmysql> set password=PASSWORD('root123');Query OK, 0 rows affected (0.00 sec)mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || test |+--------------------+4 rows in set (0.00 sec) 关 键 词: mysql5

524d6daf746efaa52c3c71bbfe7ba172.gif  天天文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值