成都网站建设设计

将想法与焦点和您一起共享

MySQL5.7.15安装(二进制版本)-创新互联

0.创建mysql用户和组信息[root@gxoradb1 ~]# groupadd mysql [root@gxoradb1 ~]# useradd -r -g mysql -s /bin/false mysql
1.指定安装目录[root@gxoradb1 ~]# cd /usr/local [root@gxoradb1 local]# ls mysql-advanced-5.7.15-linux-glibc2.5-x86_64.tar.gz
2.解压mysql[root@gxoradb1 local]# tar -zxvf mysql-advanced-5.7.15-linux-glibc2.5-x86_64.tar.gz [root@gxoradb1 local]# mv mysql-advanced-5.7.15-linux-glibc2.5-x86_64/ mysql-5.7.15 [root@gxoradb1 local]# ln -s mysql-5.7.15 mysql [root@gxoradb1 local]# ls -la lrwxrwxrwx  1 root root   12 Oct  4 14:58 mysql -> mysql-5.7.15 drwxr-xr-x  9 root root  4096 Oct  4 14:56 mysql-5.7.15
3.调整目录权限[root@gxoradb1 local]# cd mysql [root@gxoradb1 mysql]# mkdir mysql-files[root@gxoradb1 mysql]# chmod 750 mysql-files [root@gxoradb1 mysql]# chown -R mysql:mysql .
The mysql-files directory provides a convenient location to use as the value of the secure_file_priv system variable that limits import/export operations to a specific directory.
4.初始化mysql[root@gxoradb1 mysql]# bin/mysqld --initialize --user=mysql2016-10-04T07:07:05.044029Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-10-04T07:07:05.351321Z 0 [Warning] InnoDB: New log files created, LSN=45790 2016-10-04T07:07:05.396915Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2016-10-04T07:07:05.454329Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 2825c52a-8a01-11e6-abb2-080027b5eb23. 2016-10-04T07:07:05.456104Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2016-10-04T07:07:06.265334Z 0 [Warning] CA certificate ca.pem is self signed. 2016-10-04T07:07:06.503976Z 1 [Note] A temporary password is generated for root@localhost: <5Tk+Gs7frb7 //临时口令[root@gxoradb1 mysql]# bin/mysql_ssl_rsa_setup
5.调整目录权限[root@gxoradb1 mysql]# chown -R root . [root@gxoradb1 mysql]# chown -R mysql data mysql-files
6.启动mysql[root@gxoradb1 mysql]# bin/mysqld_safe --user=mysql & [1] 11211 [root@gxoradb1 mysql]# 2016-10-04T07:10:20.032700Z mysqld_safe Logging to '/usr/local/mysql/data/gxoradb1.err'. 2016-10-04T07:10:20.058270Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
7.创建自启动脚本[root@gxoradb1 mysql]# cp support-files/mysql.server /etc/init.d/mysql.server [root@gxoradb1 mysql]# chkconfig --add mysql.server [root@gxoradb1 mysql]# chkconfig --list mysql.server   mysql.server   0:off  1:off  2:on   3:on   4:on   5:on   6:off
8.登录mysql数据库[root@gxoradb1 ~]# mysql -u root -h localhost -p Enter password: Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.7.15-enterprise-commercial-advanced Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
9.修改root用户口令mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'oracle';mysql> set password for 'root'@'localhost'=password('oracle');


10余年的攸县网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。营销型网站建设的优势是能够根据用户设备显示端的尺寸不同,自动调整攸县建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联公司从事“攸县网站设计”,“攸县网站推广”以来,每个客户项目都认真落实执行。官方文档中对二进制安装的说明shell> yum install libaio //安装libaio包shell> groupadd mysqlshell> useradd -r -g mysql -s /bin/false mysqlshell> cd /usr/localshell> tar zxvf /path/to/mysql-VERSION-OS.tar.gzshell> ln -s full-path-to-mysql-VERSION-OS mysqlshell> cd mysqlshell> mkdir mysql-filesshell> chmod 750 mysql-filesshell> 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-filesshell> bin/mysqld_safe --user=mysql &# Next command is optional shell> cp support-files/mysql.server /etc/init.d/mysql.server
DirectoryContents of Directory
bin,scriptsmysqld server, client and utility programs
dataLog files, databases
docsMySQL manual in Info format
manUnix manual pages
includeInclude (header) files
libLibraries
shareMiscellaneous support files, including error messages, sample configuration files, SQL for database installation

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网站栏目:MySQL5.7.15安装(二进制版本)-创新互联
文章出自:http://chengdu.cdxwcx.cn/article/dsggjp.html