freebsd 安装mysql5.7,FreeBSD安装MySQL5.7.17

[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 serverafter an upgrade from an earlier version.

Initial password for first time use of MySQL is saved in $HOME/.mysql_secretie. 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 -pEnter 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

标签:boot   ice   use   ase   ica   mysq   status   mysqld   dir

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉

本文系统来源:http://www.cnblogs.com/tuhooo/p/6661412.html

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值