MySQL5.6_Linux安装_第1页
MySQL5.6_Linux安装_第2页
MySQL5.6_Linux安装_第3页
MySQL5.6_Linux安装_第4页
MySQL5.6_Linux安装_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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 mysql# netstat -nat

2、active 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 tcp 0 0 :ffff:192

3、.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 start starting mysql.确定 4、再次确认端口是打开的rootrac2 init.d# netstat -nat active internet connections (servers and established) proto recv-q send-q

4、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 established

5、tcp 0 0 :ffff:192.168.72.5:22 :ffff:192.168.72.1:62929 established 5、连接 mysql rootrac2 bin# mysql -u root error 1045 (28000): access denied for user rootlocalhost (using password: no) 在网上查资料,可以这样来解决:rootrac2 bin# /etc/init.d/mysql stop shutting down mysql.确定 rootrac2 bin# mysqld_safe -user=mysql -sk

6、ip-grant-tables -skip-networking & 1 6025 rootrac2 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 rootrac2 bin# mysql -u root mysql reading table information for completion of table and co

7、lumn names you can turn off this feature to get a quicker startup with -a welcome to the mysql monitor. commands end with ; or g. your mysql connection id is 2 server version: 5.6.12 mysql community server (gpl) copyright (c) 2000, 2013, oracle and/or its affiliates. all rights reserved. oracle is a

8、 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 show databases; +-+ | database | +-+ | information_schema | | mysql | | performance_schema | | tes

9、t | +-+ 4 rows in set (0.00 sec) mysql use mysql; database changed mysql 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_

10、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

11、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 |

12、 | | 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_pr

13、iv | 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

14、 | 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 | | | c

15、reate_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,x50

16、9,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_u

17、ser_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 ho

18、sr in field list mysql select host,user,password from user; +-+-+-+ | host | user | password | +-+-+-+ | localhost | root | *34f5f8a5c7f9ea100fb15f7fcf1bc31271c3d43c | | rac2 | root | *34f5f8a5c7f9ea100fb15f7fcf1bc31271c3d43c | | 127.0.0.1 | root | *34f5f8a5c7f9ea100fb15f7fcf1bc31271c3d43c | | :1 |

19、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: 0 mysql commit - ; query ok, 0 rows affected (0.00 sec) 执行

20、下面这一句,是因为上面使表处于:the mysql server is running with the -skip-grant-tables option ,如果不执行下面这句,即使连上数据库也执行不了操作。mysql flush privileges; query ok, 0 rows affected (0.00 sec) mysql quit bye rootrac2 bin# /etc/init.d/mysql restart shutting 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 rootrac2 bin# mysql -u root -p enter password: welcome to the mysql monitor. commands end with ; or g. your mysql connection id is 1 server version: 5.6.12 cop

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论