更新时间:2019年11月04日14时30分 来源:黑马程序员 浏览次数:
MySQL-server-5.5.31-2.el6.i686.rpm
MySQL-client-5.5.31-2.el6.i686.rpm
rpm -qa | grep mysql
rpm -e mysql- libs- 5. 1. 66- 2. el6_ 3. i686 --nodeps
rpm -ivh MySQL- server- 5. 5. 31- 2. el6. i686.
rpm -ivh MySQL- client- 5. 5. 31- 2. el6. i686.
service mysql start
mysql_ secure_ installation
[root@ localhost Downloads]# mysql_ secure_ installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT
IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE!
PLEASE READ EACH STEP CAREFULLY!In order to log into MySQL to secure it, we' ll need the current
password for the root user.
If you' ve just installed MySQL, and you haven' t set the root password yet, the password will
be blank, so you should just press enter here.
Enter current password for root (enter for none):
mysql -uroot -pitcast
[root@ localhost Downloads]# mysql -uroot -pitcast Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 Server
version: 5. 5. 31 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 >
mysql > show databases;
+--------------------+
| Database |
+--------------------+
| information_ schema |
| mysql |
| performance_ schema|
| test |
+--------------------+
4 rows in set (0. 00 sec)