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登入,修改密碼
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28258625/viewspace-1651159/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- BiocManager安裝,devtools安裝dev
- Linux安裝解除安裝MySQLLinuxMySql
- linux 安裝yum 安裝phpLinuxPHP
- Ubuntu解除安裝和安裝Ubuntu
- 02 安裝git、安裝TortoiseGitGit
- cocoapods安裝/解除安裝/使用
- JDK安裝和解除安裝JDK
- ffmpeg安裝之mac安裝Mac
- docker安裝及解除安裝Docker
- [ 安裝 ] Zeppelin安裝步驟!
- win10安裝版怎麼安裝_安裝版win10安裝教程Win10
- ElasticSearch的安裝和使用,Postman的安裝,Kibana的安裝,EShead外掛的安裝ElasticsearchPostman
- Mac Redis安裝與解除安裝MacRedis
- 安裝了IDLE後安裝tensorflow
- kratos安裝及依賴安裝
- Linux 解除安裝openjdk 安裝oraclejdkLinuxJDKOracle
- debian安裝和解除安裝vmware
- JDK的安裝與解除安裝JDK
- linux 解除安裝jdk和安裝LinuxJDK
- 【推薦 - glibc安裝】MySQL - 安裝MySql
- linux下安裝snap安裝工具Linux
- [雲原生]Docker - 安裝&解除安裝Docker
- Ubuntu安裝和解除安裝mongodbUbuntuMongoDB
- window下安裝並使用nvm(含解除安裝node、解除安裝nvm、全域性安裝npm)NPM
- 安裝
- air安裝win10怎麼解除安裝_air安裝win10如何解除安裝AIWin10
- Centos Docker安裝、升級、解除安裝CentOSDocker
- Webpack學習 – Webpack安裝及安裝Web
- Linux-Ubuntu-mysql-安裝&解除安裝LinuxUbuntuMySql
- Centos7.9安裝解除安裝DockerCentOSDocker
- Centos7安裝安裝部署dockerCentOSDocker
- Linux系統安裝——Centos 7.6安裝LinuxCentOS
- PostgreSQL 10.12 安裝系列 - 原始碼安裝SQL原始碼
- PostgreSQL 10.12 安裝系列 - 本地RPM安裝SQL
- 【 Linux 軟體安裝 】- 1 JDK安裝LinuxJDK
- Python pip的安裝及解除安裝Python
- CentOS7安裝php、安裝MySqlCentOSPHPMySql
- vs2015解除安裝和安裝