赞
踩
关注微信公众号:CodingTechWork,一起学习进步。
使用mac安装mysql服务端供自己本地调试使用。
官方下载链接https://www.mysql.com/downloads/
点击进入Mysql社区下载页面
选择Mysql社区服务端(Mysql Community Server
)下载
选择macOS
,并选择对应的版本,由于我的mac
是英特尔的,而非ARM
,所以选择了x86,64-bit
的DMG
压缩包下载。
直接点击下载,无需登录或注册
打开终端执行以下操作
vim ~/.bash_profile
,加入环境变量PATH=$PATH:/usr/local/mysql/bin
,保存并退出。source ~/.bash_profile
mysql --version
显示对应的版本mysql Ver 8.0.29 for macos12 on x86_64 (MySQL Community Server - GPL)
mysql -uroot -p
,输入密码[xxxx %] 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.29 MySQL Community Server - GPL Copyright (c) 2000, 2022, 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. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。