Chinaunix首页 | 论坛 | 博客
  • 博客访问: 750442
  • 博文数量: 217
  • 博客积分: 2401
  • 博客等级: 大尉
  • 技术积分: 2030
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-16 06:58
个人简介

怎么介绍?

文章分类

全部博文(217)

文章存档

2023年(2)

2022年(3)

2021年(29)

2020年(12)

2019年(5)

2018年(5)

2017年(5)

2016年(3)

2015年(6)

2014年(12)

2013年(16)

2012年(9)

2011年(6)

2010年(15)

2009年(30)

2008年(59)

我的朋友

分类: LINUX

2015-10-20 15:46:21

http://blog.csdn.net/hyrongg/article/details/8866732

  1. [root@CentOS ~]# rpm -qa | grep -i mysql  
  2. MySQL-client-5.6.11-1.linux_glibc2.5.x86_64  
  3. MySQL-server-5.6.11-1.linux_glibc2.5.x86_64  
  4. MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64  
  5. [root@CentOS ~]# rpm -e MySQL-client-5.6.11-1.linux_glibc2.5.x86_64 MySQL-server-5.6.11-1.linux_glibc2.5.x86_64 MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64  
  6. [root@CentOS ~]# rpm -qa | grep -i mysql  
  7. [root@CentOS ~]# service mysql stop;  
  8. mysql: unrecognized service  
  9. [root@CentOS ~]# find / -name mysql  
  10. /var/lib/mysql  
  11. /var/lib/mysql/mysql  
  12. /usr/lib64/mysql  
  13. [root@CentOS ~]# rm -fr /var/lib/mysql  
  14. [root@CentOS ~]# rm -fr /var/lib/mysql/mysql  
  15. [root@CentOS ~]# rm -fr /usr/lib64/mysql  
  16. [root@CentOS ~]# find / -name mysql  
  17. [root@CentOS ~]# find / -name my.cnf  
  18. /usr/my.cnf  
  19. [root@CentOS ~]# rm -rf /usr/my.cnf  
  20. [root@CentOS ~]# cd software  
  21. [root@CentOS software]# ls -la  
  22. total 113636  
  23. drwxr-xr-x. 2 root root     4096 Apr 28 22:54 .  
  24. dr-xr-x---. 4 root root     4096 Apr 28 23:51 ..  
  25. -rw-r--r--. 1 root root 23010605 Apr  8 10:44 MySQL-client-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  26. -rw-r--r--. 1 root root  4554286 Apr  8 10:44 MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  27. -rw-r--r--. 1 root root 88787351 Apr  8 10:45 MySQL-server-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  28. [root@CentOS software]# clear  
  29. [root@CentOS software]# ls -la  
  30. total 113636  
  31. drwxr-xr-x. 2 root root     4096 Apr 28 22:54 .  
  32. dr-xr-x---. 4 root root     4096 Apr 28 23:51 ..  
  33. -rw-r--r--. 1 root root 23010605 Apr  8 10:44 MySQL-client-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  34. -rw-r--r--. 1 root root  4554286 Apr  8 10:44 MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  35. -rw-r--r--. 1 root root 88787351 Apr  8 10:45 MySQL-server-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  36. [root@CentOS software]# rpm -uvh MySQL-server-5.6.11-1.linux_glibc2.5.x86_64.rpm MySQL-client-5.6.11-1.linux_glibc2.5.x86_64.rpm MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  37. -uvh: unknown option  
  38. [root@CentOS software]# rpm -ivh MySQL-server-5.6.11-1.linux_glibc2.5.x86_64.rpm MySQL-client-5.6.11-1.linux_glibc2.5.x86_64.rpm MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64.rpm  
  39. Preparing...                ########################################### [100%]  
  40.    1:MySQL-devel            ########################################### [ 33%]  
  41.    2:MySQL-client           ########################################### [ 67%]  
  42.    3:MySQL-server           ########################################### [100%]  
  43. 2013-04-29 00:09:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).  
  44. 2013-04-29 00:09:00 14579 [Note] InnoDB: The InnoDB memory heap is disabled  
  45. 2013-04-29 00:09:00 14579 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins  
  46. 2013-04-29 00:09:00 14579 [Note] InnoDB: Compressed tables use zlib 1.2.3  
  47. 2013-04-29 00:09:00 14579 [Note] InnoDB: Using Linux native AIO  
  48. 2013-04-29 00:09:00 14579 [Note] InnoDB: Using CPU crc32 instructions  
  49. 2013-04-29 00:09:00 14579 [Note] InnoDB: Initializing buffer pool, size = 128.0M  
  50. 2013-04-29 00:09:00 14579 [Note] InnoDB: Completed initialization of buffer pool  
  51. 2013-04-29 00:09:00 14579 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!  
  52. 2013-04-29 00:09:00 14579 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB  
  53. 2013-04-29 00:09:00 14579 [Note] InnoDB: Database physically writes the file full: wait...  
  54. 2013-04-29 00:09:00 14579 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB  
  55. 2013-04-29 00:09:01 14579 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB  
  56. 2013-04-29 00:09:01 14579 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0  
  57. 2013-04-29 00:09:01 14579 [Warning] InnoDB: New log files created, LSN=45781  
  58. 2013-04-29 00:09:01 14579 [Note] InnoDB: Doublewrite buffer not found: creating new  
  59. 2013-04-29 00:09:01 14579 [Note] InnoDB: Doublewrite buffer created  
  60. 2013-04-29 00:09:01 14579 [Note] InnoDB: 128 rollback segment(s) are active.  
  61. 2013-04-29 00:09:01 14579 [Warning] InnoDB: Creating foreign key constraint system tables.  
  62. 2013-04-29 00:09:01 14579 [Note] InnoDB: Foreign key constraint system tables created  
  63. 2013-04-29 00:09:01 14579 [Note] InnoDB: Creating tablespace and datafile system tables.  
  64. 2013-04-29 00:09:01 14579 [Note] InnoDB: Tablespace and datafile system tables created.  
  65. 2013-04-29 00:09:01 14579 [Note] InnoDB: Waiting for purge to start  
  66. 2013-04-29 00:09:01 14579 [Note] InnoDB: 5.6.11 started; log sequence number 0  
  67. A random root password has been set. You will find it in '/root/.mysql_secret'.  
  68. 2013-04-29 00:09:03 14579 [Note] Binlog end  
  69. 2013-04-29 00:09:03 14579 [Note] InnoDB: FTS optimize thread exiting.  
  70. 2013-04-29 00:09:03 14579 [Note] InnoDB: Starting shutdown...  
  71. 2013-04-29 00:09:04 14579 [Note] InnoDB: Shutdown completed; log sequence number 1625977  
  72. 2013-04-29 00:09:04 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).  
  73. 2013-04-29 00:09:04 14602 [Note] InnoDB: The InnoDB memory heap is disabled  
  74. 2013-04-29 00:09:04 14602 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins  
  75. 2013-04-29 00:09:04 14602 [Note] InnoDB: Compressed tables use zlib 1.2.3  
  76. 2013-04-29 00:09:04 14602 [Note] InnoDB: Using Linux native AIO  
  77. 2013-04-29 00:09:04 14602 [Note] InnoDB: Using CPU crc32 instructions  
  78. 2013-04-29 00:09:04 14602 [Note] InnoDB: Initializing buffer pool, size = 128.0M  
  79. 2013-04-29 00:09:04 14602 [Note] InnoDB: Completed initialization of buffer pool  
  80. 2013-04-29 00:09:04 14602 [Note] InnoDB: Highest supported file format is Barracuda.  
  81. 2013-04-29 00:09:04 14602 [Note] InnoDB: 128 rollback segment(s) are active.  
  82. 2013-04-29 00:09:04 14602 [Note] InnoDB: Waiting for purge to start  
  83. 2013-04-29 00:09:04 14602 [Note] InnoDB: 5.6.11 started; log sequence number 1625977  
  84. 2013-04-29 00:09:05 14602 [Note] Binlog end  
  85. 2013-04-29 00:09:05 14602 [Note] InnoDB: FTS optimize thread exiting.  
  86. 2013-04-29 00:09:05 14602 [Note] InnoDB: Starting shutdown...  
  87. 2013-04-29 00:09:06 14602 [Note] InnoDB: Shutdown completed; log sequence number 1625987  
  88. A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !  
  89. You will find that password in '/root/.mysql_secret'.  
  90. You must change that password on your first connect,  
  91. no other statement but 'SET PASSWORD' will be accepted.  
  92. See the manual for the semantics of the 'password expired' flag.  
  93. Also, the account for the anonymous user has been removed.  
  94. In addition, you can run:  
  95.   /usr/bin/mysql_secure_installation  
  96. which will also give you the option of removing the test database.  
  97. This is strongly recommended for production servers.  
  98. See the manual for more instructions.  
  99. Please report any problems with the /usr/bin/mysqlbug script!  
  100. The latest information about MySQL is available on the web at  
  101.   
  102. Support MySQL by buying support/licenses at 
  103. New default config file was created as /usr/my.cnf and  
  104. will be used by default by the server when you start it.  
  105. You may edit this file to change server settings  
  106. [root@CentOS software]# mysql  
  107. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)  
  108. [root@CentOS ~]# mysqld_safe --skip-grant-tables &  
  109. [1] 14662  
  110. [root@CentOS ~]# 130429 00:17:30 mysqld_safe Logging to '/var/lib/mysql/CentOS.err'.  
  111. 130429 00:17:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql  
  112. [root@CentOS ~]# mysql  
  113. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  114. Your MySQL connection id is 1  
  115. Server version: 5.6.11 MySQL Community Server (GPL)  
  116. Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.  
  117. Oracle is a registered trademark of Oracle Corporation and/or its  
  118. affiliates. Other names may be trademarks of their respective  
  119. owners.  
  120. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  
  121. mysql> use mysql;  
  122. Reading table information for completion of table and column names  
  123. You can turn off this feature to get a quicker startup with -A  
  124. Database changed  
  125. mysql> update user set password=PASSWORD('qwerty1234');  
  126. Query OK, 4 rows affected (0.00 sec)  
  127. Rows matched: 4  Changed: 4  Warnings: 0  
  128. mysql> exit  
  129. Bye  
  130. [root@CentOS ~]# service mysql stop;  
  131. Shutting down MySQL.. SUCCESS!  
  132. [root@CentOS ~]# service mysql start;  
  133. Starting MySQL. SUCCESS!  
  134. [root@CentOS ~]# mysql -u root -p  
  135. Enter password:  
  136. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  137. Your MySQL connection id is 1  
  138. Server version: 5.6.11  
  139. Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.  
  140. Oracle is a registered trademark of Oracle Corporation and/or its  
  141. affiliates. Other names may be trademarks of their respective  
  142. owners.  
  143. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  
  144. mysql>  

阅读(1043) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~