FreeBSD MySQL 8.X
2021/12/31 19:16:23
本文主要是介绍FreeBSD MySQL 8.X,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
mysql 80
安装 (以下二选一)
# pkg install mysql80-server 或者 # cd /usr/ports/databases/mysql80-server/ && make install clean
启动服务
# sysrc mysql_enable=YES # service mysql-server start
登录
mysql 8.0 默认密码是空,直接回车即可。
root@ykla:~ # mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 8 Server version: 8.0.27 Source distribution Copyright (c) 2000, 2021, Oracle and/or its affiliates. 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)]>
修改密码
设置密码为z
,然后刷新权限。
root@localhost [(none)]> alter user 'root'@'localhost' identified by 'z'; Query OK, 0 rows affected (0.02 sec) root@localhost [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec)
重新登录:
root@localhost [(none)]> quit; Bye root@ykla:~ # mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 9 Server version: 8.0.27 Source distribution Copyright (c) 2000, 2021, Oracle and/or its affiliates. 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 MySQL 8.X的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-20部署MySQL集群入门:新手必读指南
- 2024-11-20部署MySQL集群教程:初学者指南
- 2024-11-20部署MySQL集群项目实战:新手教程
- 2024-11-20部署MySQL集群资料:新手入门教程
- 2024-11-20MySQL集群部署教程:入门级详解
- 2024-11-20MySQL集群教程:入门与实践指南
- 2024-11-20部署MySQL集群教程:新手入门指南
- 2024-11-20MySQL读写分离教程:轻松入门
- 2024-11-20部署MySQL集群入门:一步一步搭建你的数据库集群
- 2024-11-19部署MySQL集群学习:入门教程