[root@tuhooo /usr/ports/databases/mysql57-server]# make install
===>  Installing for mysql57-server-5.7.17_3
===>   mysql57-server-5.7.17_3 depends on package: perl5>=5.24<5.25 - found
===>   mysql57-server-5.7.17_3 depends on shared library: libevent.so - found (/usr/local/lib/libevent.so)
===>   mysql57-server-5.7.17_3 depends on shared library: liblz4.so - found (/usr/local/lib/liblz4.so)
===>   mysql57-server-5.7.17_3 depends on shared library: libedit.so.0 - found (/usr/local/lib/libedit.so.0)
===>   mysql57-server-5.7.17_3 depends on shared library: libmysqlclient.so.20 - found (/usr/local/lib/mysql/libmysqlclient.so.20)
===>  Checking if mysql57-server already installed
===>   Registering installation for mysql57-server-5.7.17_3
Installing mysql57-server-5.7.17_3...
===> Creating groups.
Creating group 'mysql' with gid '88'.
===> Creating users
Creating user 'mysql' with uid '88'.
*****************************************************************************

Remember to run mysql_upgrade the first time you start the MySQL server
after an upgrade from an earlier version.

Initial password for first time use of MySQL is saved in $HOME/.mysql_secret
ie. when you want to use "mysql -u root -p" first you should see password
in /root/.mysql_secret

MySQL57 has a default %%ETCDIR%%/my.cnf,
remember to replace it wit your own
or set `mysql_optfile="$YOUR_CNF_FILE` in rc.conf.

*****************************************************************************

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/lib/mysql/plugin/mysqlx.so
/usr/local/lib/mysql/plugin/group_replication.so
/usr/local/libexec/mysqld

This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/mysql-server

If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.mysql.com/
[root@tuhooo /usr/ports/databases/mysql57-server]#

启动mysql:

[root@tuhooo ~]# /usr/local/etc/rc.d/mysql-server start

root@localhost [(none)]> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
root@localhost [(none)]> set password=password("123456");
Query OK, 0 rows affected, 1 warning (0.09 sec)

root@localhost [(none)]> alter user 'root'@'localhost' password expire never;
Query OK, 0 rows affected (0.01 sec)

root@localhost [(none)]> exit
Bye
[root@tuhooo /usr/ports/databases/mysql57-client]# mysql_upgrade
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
[root@tuhooo /usr/ports/databases/mysql57-client]# mysql_upgrade -uroot -p
Enter password:
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.engine_cost                                  OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.gtid_executed                                OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.server_cost                                  OK
mysql.servers                                      OK
mysql.slave_master_info                            OK
mysql.slave_relay_log_info                         OK
mysql.slave_worker_info                            OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
The sys schema is already up to date (version 1.5.1).
Checking databases.
sys.sys_config                                     OK
Upgrade process completed successfully.
Checking if update is needed.
[root@tuhooo /usr/ports/databases/mysql57-client]# mysql -uroot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@tuhooo /usr/ports/databases/mysql57-client]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.7.17-log Source distribution

Copyright (c) 2000, 2016, 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.

root@localhost [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.01 sec)

root@localhost [(none)]>

FreeBSD安装MySQL5.7.17的更多相关文章

  1. centos6.7编译安装mysql5.7.17

    centos6.7编译安装mysql5.7.17 2017-03-24 09:57:15 提示:mysql5.7.17和之前5.56以前的版本安装不一样,需要用cmake 另外,看本文档的mysql编 ...

  2. lnmp之阿里云源码安装mysql5.7.17

    mysql5.7.17一直号称世界上最好的mysql 那么就在阿里云主机linux安装它(采用的源码安装mysql5.7.17) 我在阿里云主机上安装它 连接阿里云主机 进入,跟我们自己装的虚拟机一毛 ...

  3. CentOS7 实战源码安装mysql5.7.17数据库服务器

    CentOS7 实战源码安装mysql5.7.17数据库服务器 简介:实战演练mysql数据库服务器的搭建  mysql简介: mysql是一个开源的关系型数据库管理系统,现在是oracle公司旗下的 ...

  4. linux下安装mysql5.7.17及简单配置

    原文:http://www.th7.cn/db/mysql/201612/218745.shtml 1.mysql5.7.17安装在/usr/local/mysql目录里面,也可以安装在其他地方 (安 ...

  5. Linux安装mysql-5.7.17

    一.检查系统是否有自带安装MySQL 1.检查 [root@centos ~]# rpm -qa | grep -i mysql mysql-libs-5.1.71-1.el6.x86_64 2.卸载 ...

  6. centos7下安装mysql5.7.17

    约定:本文基于Centos7,Mysql5.7.17,经过博主多次测试成功 1.下载mysql.tar.gz 官网下载MySQL安装包,Linux-Generic 64位(根据系统选择64or32) ...

  7. kali2016.2(debian)快速安装mysql5.7.17

    糊里糊涂的删除了kali原本的mysql5.6.27版本,原本的mysql与很多软件关联在一起,每次安装都失败,后来把相关的都卸载了(悲催的浪费了一天) 下载地址  debian mysql下载地址 ...

  8. 二进制包形式安装mysql5.7.17

    mysql5.7与mysql5.5的安装方式有些区别,如果按照5.5的方式来安装5.7就会有很多报错信息,下面介绍mysql5.7.17的二进制安装方式. 首先安装依赖包: yum -y instal ...

  9. linux 下安装mysql5.7.17

    安装前的环境准备 linux 环境准备 内核参数建议值 1.调整最大文件数限制 直接执行 ulimit -n 65535 或写入/etc/sysctl.conf  重启后生效 2.修改IO 调度器设置 ...

随机推荐

  1. SQL函数学习(十六):STUFF()函数

    16.STUFF()函数 STUFF()函数用于删除指定长度的字符,并可以在制定的起点处插入另一组字符. 16.1 STUFF()函数语法 select stuff(列名,开始位置,长度,替代字符串) ...

  2. C#正则表达式开源工具

    先交代一下背景,最近工作中经常用到正则表达式,而正则表达式这个东西我个人觉得很鸡肋,不用吧,有些功能实现起来会很麻烦.用吧,又不是说工作中经常用到,只是有时候有些需要求用到而已.但是正则表达式只要一段 ...

  3. 前端h5开发发布ios

    1.首先要有一个html5+的软件HBuilder 2.整体完成然后就点发布,主要注意页面入口就是你的网页的入口 3.下载一个appuploader软件,无需mac本就可以方便的申请证书和描述(因为发 ...

  4. 简单php连接数据库作操作

    1.近期稳定版本 <?php header('Content-Type: application/json'); $output = []; $host = ''; //MySQL服务器地址 $ ...

  5. LWIP的移植笔记

    第一次发表博客,文章摘录于还不懂同学的专栏 lwIp的作者做了大量的工作以方便像我这种懒人移植该协议栈,基本上只需修改一个配置头文件和改写3个函数即可完成lwIP的移植.要改写的函数位于lwIP-1. ...

  6. osgMulitiplerendertargets sample 中fbo使用【HTC VIVE开发中应用】

    osgmultiplerendertargets.cpp ...................................... // now create the camera to do t ...

  7. VR开发者必看:4大最为值得关注的内容平台【转】

            时间 2016-01-19 14:12:57 原文  http://www.sfw.cn/xinwen/478369.html 主题 虚拟现实 Oculus 对很多有意涉及VR行业的内 ...

  8. Java solr 分词

    代码如下: import java.io.IOException; import java.util.*; import org.apache.solr.client.solrj.SolrClient ...

  9. 最短路径——Floyd,Dijkstra(王道)

    题目描述: 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt.但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线 ...

  10. Netty源码细节-accept、read(Linux os层 + Netty层代码细节)(转)

    原文:http://budairenqin.iteye.com/blog/2215899 这篇分析一下accept的细节, 我觉得网络IO相关开发很多时候不能仅仅局限于java层, 尤其从accept ...