美文网首页
MySQL安装流程

MySQL安装流程

作者: 亦猿非猿 | 来源:发表于2018-11-18 21:59 被阅读2次

纯属一篇MySQL安装笔记,没太大技术含量
记录一下,在安装过程中进行的环境路径的设置

下载安装

官网地址:MySQL官网

进去后,按 DOWNOADS->Commnity->MySQL Community Server 就可以找到下载的位置。

image

选择下载为dmg文件,一路确定就可以了
安装完成后,会提示默认密码,记得保存!

image

启动MySQL

安装成功后,在系统偏好中启动
系统偏好设置->MySQL->Start MySQL Server

image

设置启动别名

默认安装后,需要启动MySQL都要到安装路径下,默认路径为/usr/local/mysql/bin/mysql,设置别名是为了方便直接运行MySQL命令

alias 别名自定义命令

在配置文件中,设置别名(用的是on my zsh,配置文件为.zshrc)

alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin

立即生效修改

➜  ~ source .zshrc

查看所有命令别名

➜  ~ alias

在本次session中临时设置别名,重启会生效

➜  ~ alias 别名=原有名称

修改密码登陆

修改默认密码

➜  ~ mysqladmin -u root -p password
Enter password:默认密码
New password:新密码
Confirm new password:新密码
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.

登陆

➜  ~ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.21 MySQL Community Server (GPL)

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

mysql>

退出MySQL

mysql> quit
Bye

相关文章

  • Mac MySql 安装

    Mac 安装MySql的流程

  • 2018-10-16 Magento 从零开始安装 centos

    整个安装流程使用 yum 安装 , 不需手动编译。 大体流程如下: Centos 安装 Apache mysql ...

  • 解压版mysql+免破解版Navicat,好用!

    解压版mysql安装流程 获取mysql压缩包获取地址: 获取压缩包后可安装压缩包内的安装说明执行安装流程(整体配...

  • mysql安装流程

  • MySQL安装流程

    纯属一篇MySQL安装笔记,没太大技术含量记录一下,在安装过程中进行的环境路径的设置 下载安装 官网地址:MySQ...

  • MySQL安装流程

    系统:Centos 64位 第一步:下载tar.gz 1、进入官方下载首页:https://www.mysql.c...

  • mysql学习笔记

    1、mysql安装流程 参照这个教程进行安装没有问题的 http://jingyan.baidu.com/arti...

  • zabbix的安装配置

    zabbix_server的安装流程 1. 创建 zabbix database mysql> CREATE DA...

  • 百度云配置服务器(一)

    基本流程 使用云服务器搭建LNMP平台的操作步骤如下: 准备编译环境。 安装Nginx。 安装MySQL。 安装P...

  • 日记 2018-01-02

    一、Mysql的安装流程(mysql5.5版本) 注意:安装之前,请关闭杀毒软件和防火墙。 然后,点击下一步。 选...

网友评论

      本文标题:MySQL安装流程

      本文链接:https://www.haomeiwen.com/subject/ouiwfqtx.html