FreeBSD安装MySQL5.7.17

[[email protected] /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/
[[email protected] /usr/ports/databases/mysql57-server]#

启动mysql:

[[email protected] ~]# /usr/local/etc/rc.d/mysql-server start

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

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

[email protected] [(none)]> exit
Bye
[[email protected] /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.
[[email protected] /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.
[[email protected] /usr/ports/databases/mysql57-client]# mysql -uroot
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)
[[email protected] /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.

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

[email protected] [(none)]>

时间: 2024-08-07 00:17:09

FreeBSD安装MySQL5.7.17的相关文章

centos6.7编译安装mysql5.7.17

centos6.7编译安装mysql5.7.17 2017-03-24 09:57:15 提示:mysql5.7.17和之前5.56以前的版本安装不一样,需要用cmake 另外,看本文档的mysql编译前我说一点,第一次一定要大概的看完整个过程,不能一直跟着文档做,否则后面容易遇到问题.比如编译完会特别占用磁盘空间,万一之前分配的空间不够,那样就会丢失很多重要文件导致失败. 安装前工作: 1,从官方网址下载MySQL5.7.17源码包 http://dev.MySQL.com/downloads

centos6.5 编译安装Mysql5.7.17

一.安装环境准备 centos 6.5 二.下载mysql source_code  这里说一下,进入myql下载页面后选择source_code:  然后选择 Generic Linux (Architecture Independent), Compressed TAR Archive   Includes Boost Headers 这个包下载.  也可以用下面的地址:  wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boo

centos7中编译安装mysql5.7.17

MySQL 的安装方式有很多,最常见的就是编译安装和二进制安装: 在这里我将两种安装方式都介绍一下,自由选择: 首先我们来看一下编译安装的步骤: 首先,到官方网站中下载源码包: https://dev.mysql.com/downloads/mysql 选择下载源码包: 有很多针对不同系统的源码包,我们选择通用版: 下载完成后,放到我们服务器上: 接下来按照步骤进行解压编译安装即可; MySQL从5.5开始,使用cmake 进行编译设置:因此,我们还要安装cmake编译工具: shell > y

一键编译安装mysql-5.6.17

简单编译mysql5.6.17 配置文件my.cnf 请自行配置 cat mysql.sh mkdir -p /opt/appcd /opt/app #创建文件存放目录 wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.17.tar.gztar -xf mysql-5.6.17.tar.gzyum install -y make gcc-c++ cmake bison-devel  ncurses-devel #下载软件包并解

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

1.mysql5.7.17安装在/usr/local/mysql目录里面,也可以安装在其他地方 (安装包最好与Linux系统一样,eg;64位的就是"mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz",官网可下载) mkdir /usr/local/mysql 2.解压并复制 tar -xvf mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz mv mysql-5.7.17-linux-glibc2.5-x86_64/

安装mysql5.7.17 教程亲试 无误(win8)

MySQL是最流行的开源数据库之一,但在Python标准库中并没有集成MySQL接口程序,MySQLdb是一个第三方包,需独立下载并安装.Python连接MySQL的关键之处在于设置数据库连接,在连接成功之后,其实不管后端是何种数据库,对DB-API对象的属性和方法进行操作都是一样 1  MySQL5.7.17安装教程 http://jingyan.baidu.com/article/363872ec2e27076e4ba16fc3.html 2  (要用python的前提下) 安装链接里的第二

CetOS7.4手工编译安装mysql-5.7.17(内附源码包)

简介 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle旗下产品.MySQL是最流行的关系型数据库管理系统之一,在WEB应用方面,MySQL是最好的关系数据库管理系统应用软件.MySQL是一种关系数据库管理系统,关系数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,这样就增加了速度并提高了灵活性.MySQL所使用的SQL语言是用于访问数据库的最常用标准化语言.MySQL软件采用了双授权政策,分为社区版和商业版,由于其体积小.速度快.总体拥有成

Linux下通用二进制安装包安装MySQL-5.7.17

解压拷贝 mv mysql-5.7.14-linux-glibc2.5-i686 /usr/local/mysql 先创建mysql用户 groupadd mysql useradd -r -g mysql -s /bin/false mysql 创建mysql的数据目录,该目录在初始化数据库的时候会用到 mkdir /mysql /mysql/data /mysql/log 修改目录权限 chown -R mysql:mysql /usr/local/mysql /mysql 创建my.cnf

centos7.2安装mysql5.7.17

CentOS 7之后的版本yum的默认源中使用MariaDB替代原先MySQL,因此安装方式较为以往有一些改变: 下载mysql的源 wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm 安装yum库 yum localinstall -y mysql57-community-release-el7-7.noarch.rpm 安装MySQL yum install -y mysql-community-s