mysql installing_Mysql+linux安装

建议在Linux中使用RPM包来安装MySQL

本次采用二进制安装(版本为5.7)

To install and use a MySQL binary distribution, the command

sequence looks like this:

shell> groupadd mysql

shell> useradd -r -g mysql mysql--useradd -g mysql mysql

shell> cd /usr/local

shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz

shell> ln -s full-path-to-mysql-VERSION-OS mysql

shell> cd mysql

shell> mkdir mysql-files

shell> chmod 770 mysql-files

shell> chown -R mysql .

shell> chgrp -R mysql .

shell> bin/mysql_install_db --user=mysql    # Before MySQL 5.7.6

shell> bin/mysqld --initialize --user=mysql # MySQL 5.7.6 and up

shell> bin/mysql_ssl_rsa_setup              # MySQL 5.7.6 and up

shell> chown -R root .

shell> chown -R mysql data mysql-files

shell> bin/mysqld_safe --user=mysql &--启动mysql服务器

[root@dgryxrdb mysql]# bin/mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data

2015-04-17T02:42:12.943581Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2015-04-17T02:42:13.359873Z 0 [Warning] InnoDB: New log files created, LSN=45790

2015-04-17T02:42:13.418680Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2015-04-17T02:42:13.481356Z 0 [Warning] Failed to setup SSL

2015-04-17T02:42:13.481394Z 0 [Warning] SSL error: SSL context is not usable without certificate and private key

2015-04-17T02:42:13.497882Z 1 [Warning] A temporary password is generated for root@localhost: -bb84ecF*!d4

[root@dgryxrdb mysql]# bin/mysql_ssl_rsa_setup

OpenSSL 1.0.1e-fips 11 Feb 2013

Generating a 2048 bit RSA private key

..................................................+++

.........+++

writing new private key to 'ca-key.pem'

-----

writing RSA key

Signature ok

subject=/CN=MySQL_Server_5.7.7-rc_Auto_Generated_CA_Certificate

Getting Private key

Generating a 2048 bit RSA private key

...........................................................................................+++

........+++

writing new private key to 'server-key.pem'

-----

writing RSA key

Signature ok

subject=/CN=MySQL_Server_5.7.7-rc_Auto_Generated_Server_Certificate

Getting CA Private Key

Generating a 2048 bit RSA private key

....................+++

..................................................+++

writing new private key to 'client-key.pem'

-----

writing RSA key

Signature ok

subject=/CN=MySQL_Server_5.7.7-rc_Auto_Generated_Server_Certificate

Getting CA Private Key

server-cert.pem: OK

client-cert.pem: OK

Generating RSA private key, 2048 bit long modulus

........................................+++

..................................................................................................+++

e is 65537 (0x10001)

writing RSA key

[root@dgryxrdb mysql]# mysqld_safe --user=mysql &

[1] 19371

[root@dgryxrdb mysql]# 150417 14:00:53 mysqld_safe Logging to '/usr/local/mysql/data/dgryxrdb.localdomain.err'.

150417 14:00:53 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

安装完毕后可以修改用户权限,否则无法登录   以  --skip-grant-tables登录,修改密码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值