http://blog.csdn.net/hyrongg/article/details/8866732
-
[root@CentOS ~]# rpm -qa | grep -i mysql
-
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
-
[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
-
[root@CentOS ~]# rpm -qa | grep -i mysql
-
[root@CentOS ~]# service mysql stop;
-
mysql: unrecognized service
-
[root@CentOS ~]# find / -name mysql
-
/var/lib/mysql
-
/var/lib/mysql/mysql
-
/usr/lib64/mysql
-
[root@CentOS ~]# rm -fr /var/lib/mysql
-
[root@CentOS ~]# rm -fr /var/lib/mysql/mysql
-
[root@CentOS ~]# rm -fr /usr/lib64/mysql
-
[root@CentOS ~]# find / -name mysql
-
[root@CentOS ~]# find / -name my.cnf
-
/usr/my.cnf
-
[root@CentOS ~]# rm -rf /usr/my.cnf
-
[root@CentOS ~]# cd software
-
[root@CentOS software]# ls -la
-
total 113636
-
drwxr-xr-x. 2 root root 4096 Apr 28 22:54 .
-
dr-xr-x---. 4 root root 4096 Apr 28 23:51 ..
-
-rw-r--r--. 1 root root 23010605 Apr 8 10:44 MySQL-client-5.6.11-1.linux_glibc2.5.x86_64.rpm
-
-rw-r--r--. 1 root root 4554286 Apr 8 10:44 MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64.rpm
-
-rw-r--r--. 1 root root 88787351 Apr 8 10:45 MySQL-server-5.6.11-1.linux_glibc2.5.x86_64.rpm
-
[root@CentOS software]# clear
-
[root@CentOS software]# ls -la
-
total 113636
-
drwxr-xr-x. 2 root root 4096 Apr 28 22:54 .
-
dr-xr-x---. 4 root root 4096 Apr 28 23:51 ..
-
-rw-r--r--. 1 root root 23010605 Apr 8 10:44 MySQL-client-5.6.11-1.linux_glibc2.5.x86_64.rpm
-
-rw-r--r--. 1 root root 4554286 Apr 8 10:44 MySQL-devel-5.6.11-1.linux_glibc2.5.x86_64.rpm
-
-rw-r--r--. 1 root root 88787351 Apr 8 10:45 MySQL-server-5.6.11-1.linux_glibc2.5.x86_64.rpm
-
[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
-
-uvh: unknown option
-
[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
-
Preparing... ########################################### [100%]
-
1:MySQL-devel ########################################### [ 33%]
-
2:MySQL-client ########################################### [ 67%]
-
3:MySQL-server ########################################### [100%]
-
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).
-
2013-04-29 00:09:00 14579 [Note] InnoDB: The InnoDB memory heap is disabled
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Compressed tables use zlib 1.2.3
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Using Linux native AIO
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Using CPU crc32 instructions
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Initializing buffer pool, size = 128.0M
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Completed initialization of buffer pool
-
2013-04-29 00:09:00 14579 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Database physically writes the file full: wait...
-
2013-04-29 00:09:00 14579 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
-
2013-04-29 00:09:01 14579 [Warning] InnoDB: New log files created, LSN=45781
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Doublewrite buffer not found: creating new
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Doublewrite buffer created
-
2013-04-29 00:09:01 14579 [Note] InnoDB: 128 rollback segment(s) are active.
-
2013-04-29 00:09:01 14579 [Warning] InnoDB: Creating foreign key constraint system tables.
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Foreign key constraint system tables created
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Creating tablespace and datafile system tables.
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Tablespace and datafile system tables created.
-
2013-04-29 00:09:01 14579 [Note] InnoDB: Waiting for purge to start
-
2013-04-29 00:09:01 14579 [Note] InnoDB: 5.6.11 started; log sequence number 0
-
A random root password has been set. You will find it in '/root/.mysql_secret'.
-
2013-04-29 00:09:03 14579 [Note] Binlog end
-
2013-04-29 00:09:03 14579 [Note] InnoDB: FTS optimize thread exiting.
-
2013-04-29 00:09:03 14579 [Note] InnoDB: Starting shutdown...
-
2013-04-29 00:09:04 14579 [Note] InnoDB: Shutdown completed; log sequence number 1625977
-
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).
-
2013-04-29 00:09:04 14602 [Note] InnoDB: The InnoDB memory heap is disabled
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Compressed tables use zlib 1.2.3
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Using Linux native AIO
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Using CPU crc32 instructions
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Initializing buffer pool, size = 128.0M
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Completed initialization of buffer pool
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Highest supported file format is Barracuda.
-
2013-04-29 00:09:04 14602 [Note] InnoDB: 128 rollback segment(s) are active.
-
2013-04-29 00:09:04 14602 [Note] InnoDB: Waiting for purge to start
-
2013-04-29 00:09:04 14602 [Note] InnoDB: 5.6.11 started; log sequence number 1625977
-
2013-04-29 00:09:05 14602 [Note] Binlog end
-
2013-04-29 00:09:05 14602 [Note] InnoDB: FTS optimize thread exiting.
-
2013-04-29 00:09:05 14602 [Note] InnoDB: Starting shutdown...
-
2013-04-29 00:09:06 14602 [Note] InnoDB: Shutdown completed; log sequence number 1625987
-
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
-
You will find that password in '/root/.mysql_secret'.
-
You must change that password on your first connect,
-
no other statement but 'SET PASSWORD' will be accepted.
-
See the manual for the semantics of the 'password expired' flag.
-
Also, the account for the anonymous user has been removed.
-
In addition, you can run:
-
/usr/bin/mysql_secure_installation
-
which will also give you the option of removing the test database.
-
This is strongly recommended for production servers.
-
See the manual for more instructions.
-
Please report any problems with the /usr/bin/mysqlbug script!
-
The latest information about MySQL is available on the web at
-
-
Support MySQL by buying support/licenses at
-
New default config file was created as /usr/my.cnf and
-
will be used by default by the server when you start it.
-
You may edit this file to change server settings
-
[root@CentOS software]# mysql
-
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
-
[root@CentOS ~]# mysqld_safe --skip-grant-tables &
-
[1] 14662
-
[root@CentOS ~]# 130429 00:17:30 mysqld_safe Logging to '/var/lib/mysql/CentOS.err'.
-
130429 00:17:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
-
[root@CentOS ~]# mysql
-
Welcome to the MySQL monitor. Commands end with ; or \g.
-
Your MySQL connection id is 1
-
Server version: 5.6.11 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 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> use mysql;
-
Reading table information for completion of table and column names
-
You can turn off this feature to get a quicker startup with -A
-
Database changed
-
mysql> update user set password=PASSWORD('qwerty1234');
-
Query OK, 4 rows affected (0.00 sec)
-
Rows matched: 4 Changed: 4 Warnings: 0
-
mysql> exit
-
Bye
-
[root@CentOS ~]# service mysql stop;
-
Shutting down MySQL.. SUCCESS!
-
[root@CentOS ~]# service mysql start;
-
Starting MySQL. SUCCESS!
-
[root@CentOS ~]# 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.11
-
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
-
Oracle is a 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>
阅读(1088) | 评论(0) | 转发(0) |