`

linux 安装 mysql

 
阅读更多
#忽略大小写检查已安装的mysql
[root@dbserver Mysql]# rpm -qa|grep -i mysql
perl-DBD-MySQL-4.023-5.el7.x86_64
qt3-MySQL-3.3.8b-51.el7.x86_64
qt-mysql-4.8.5-8.el7.x86_64
akonadi-mysql-1.9.2-4.el7.x86_64
#卸载自带的MySQL
[root@dbserver Mysql]# rpm -e perl-DBD-MySQL-4.023-5.el7.x86_64 --nodeps
[root@dbserver Mysql]# rpm -e qt3-MySQL-3.3.8b-51.el7.x86_64 --nodeps
[root@dbserver Mysql]# rpm -e qt-mysql-4.8.5-8.el7.x86_64 --nodeps
[root@dbserver Mysql]# rpm -e akonadi-mysql-1.9.2-4.el7.x86_64 --nodeps
[root@dbserver Mysql]# rpm -qa|grep -i mariadb
mariadb-5.5.41-2.el7_0.x86_64
mariadb-devel-5.5.41-2.el7_0.x86_64
mariadb-server-5.5.41-2.el7_0.x86_64
mariadb-libs-5.5.41-2.el7_0.x86_64
#卸载mariadb
[root@dbserver Mysql]# rpm -e mariadb-5.5.41-2.el7_0.x86_64 --nodeps
[root@dbserver Mysql]# rpm -e mariadb-devel-5.5.41-2.el7_0.x86_64 --nodeps
[root@dbserver Mysql]# rpm -e mariadb-server-5.5.41-2.el7_0.x86_64 --nodeps
[root@dbserver Mysql]# rpm -e mariadb-libs-5.5.41-2.el7_0.x86_64 --nodeps
#安装
[root@dbserver Mysql]# rpm -ivh MySQL-server-5.6.26-1.linux_glibc2.5.x86_64.rpm
警告:MySQL-server-5.6.26-1.linux_glibc2.5.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:MySQL-server-5.6.26-1.linux_glibc################################# [100%]
======================================================================
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 at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

  http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

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@dbserver Mysql]# vi /root/.mysql_secret
[root@dbserver Mysql]# id mysql
uid=27(mysql) gid=27(mysql) 组=27(mysql)
[root@dbserver /]# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@dbserver Mysql]# service mysql start
Starting MySQL.                                            [  确定  ]
[root@dbserver Mysql]# netstat -anp|grep 3306
tcp6       0      0 :::3306                 :::*                    LISTEN      10202/mysqld
[root@dbserver Mysql]# rpm -ivh MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm
警告:MySQL-client-5.6.26-1.linux_glibc2.5.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:MySQL-client-5.6.26-1.linux_glibc################################# [100%]
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics