Home Database Mysql Tutorial MAC下MySQL的安装与使用

MAC下MySQL的安装与使用

Jun 07, 2016 pm 03:47 PM
mac mysql download use Install

一、下载MySql + MySqlWorkBench 访问MySQL的官网http://dev.mysql.com/downloads/ 或者http://pan.baidu.com/s/1gdu40T1 在首页会看到”MySQL Community Server” 和”MySQL Workbench” 此处以”MySQL Community Server”为例 点击DOWNLOAD按钮进行到下载

一、下载MySql + MySqlWorkBench
访问MySQL的官网http://dev.mysql.com/downloads/
或者http://pan.baidu.com/s/1gdu40T1
在首页会看到”MySQL Community Server” 和”MySQL Workbench”
此处以”MySQL Community Server”为例
MAC下MySQL的安装与使用

点击DOWNLOAD按钮进行到下载选择页,默认已经根据当前系统选择了”MAC OS X”列出了可供下载的mysql版本
MAC下MySQL的安装与使用

此处选择Mac OS X 10.9 (x86, 64-bit), DMG Archive(64位dmg文件)之后点击DownLoad进入下载页
MAC下MySQL的安装与使用
直接选择最底部的”No thanks, just start my download.”开始下载

“MySQL Workbench”同样按照这样的方式下载

二、安装
下载完成后,开始安装,首先安装mysql,双击mysql安装包
MAC下MySQL的安装与使用
直接双击安装,安装完成后会出现在系统的偏好设置中

现在打开系统的偏好设置,发现mysql已成功安装
MAC下MySQL的安装与使用

现在开始安装MySQL Workbench,同样的打开安装包,直接将MySQLWorkBench拖到Applications中

三、使用
在系统应用程序中找到MySQLWorkBench并打开
MAC下MySQL的安装与使用
之后就需要将MySQLWorkBench连接到mySql来进行统一的管理

在上图中可以看到主界面主要有三个模块组成:MySQL Connection,Shortcuts,Models所组成
其中在MySQL Connection右边有一个“+”号按钮,点击之后就会出现一个“Setup New Connection”的对话框,填写完Connetion Name之后直接点击Ok。即可完成一个连接到本地数据库的连接。
MAC下MySQL的安装与使用

点击ok之后,回到主界面就会出现刚才建立的连接
MAC下MySQL的安装与使用

点击刚才新建的连接John,输入秘密,账户信息默认是root/root,即可进入下面的数据库操作页面
MAC下MySQL的安装与使用

可以看到左侧有 MANAGEMENT,INSTANCE,PERFORMANCE,SCHEMAS共四个模块,其中可以在INSTANCE下可以启动或者关闭MySQL服务,在SCHEMAS下展示的是当前连接下的所有数据库,默认会有一个名为test的数据库,此处我们可以新建一个数据库,右击SCHEMAS处的空白处选择“Create Schema…”
MAC下MySQL的安装与使用
在Scheme Name处输入数据库的名称点击apply,然后一直点击apply即可创建一个数据库

或者也可以使用sql语句创建数据库:CREATE SCHEMA 数据库名称 ;

创建完成后点击SCHEMAS右侧的刷新按钮刷新SCHEMAS,会发现SCHEMAS下多出来一个刚才新建的数据库
在该数据库名称上右击选择”Set as Default Schema”,则此后所编写的sql语句默认都是对此数据库进行的操作

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Unable to log in to mysql as root Unable to log in to mysql as root Apr 08, 2025 pm 04:54 PM

The main reasons why you cannot log in to MySQL as root are permission problems, configuration file errors, password inconsistent, socket file problems, or firewall interception. The solution includes: check whether the bind-address parameter in the configuration file is configured correctly. Check whether the root user permissions have been modified or deleted and reset. Verify that the password is accurate, including case and special characters. Check socket file permission settings and paths. Check that the firewall blocks connections to the MySQL server.

mysql whether to change table lock table mysql whether to change table lock table Apr 08, 2025 pm 05:06 PM

When MySQL modifys table structure, metadata locks are usually used, which may cause the table to be locked. To reduce the impact of locks, the following measures can be taken: 1. Keep tables available with online DDL; 2. Perform complex modifications in batches; 3. Operate during small or off-peak periods; 4. Use PT-OSC tools to achieve finer control.

RDS MySQL integration with Redshift zero ETL RDS MySQL integration with Redshift zero ETL Apr 08, 2025 pm 07:06 PM

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.

Query optimization in MySQL is essential for improving database performance, especially when dealing with large data sets Query optimization in MySQL is essential for improving database performance, especially when dealing with large data sets Apr 08, 2025 pm 07:12 PM

1. Use the correct index to speed up data retrieval by reducing the amount of data scanned select*frommployeeswherelast_name='smith'; if you look up a column of a table multiple times, create an index for that column. If you or your app needs data from multiple columns according to the criteria, create a composite index 2. Avoid select * only those required columns, if you select all unwanted columns, this will only consume more server memory and cause the server to slow down at high load or frequency times For example, your table contains columns such as created_at and updated_at and timestamps, and then avoid selecting * because they do not require inefficient query se

The relationship between mysql user and database The relationship between mysql user and database Apr 08, 2025 pm 07:15 PM

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

Do mysql need to pay Do mysql need to pay Apr 08, 2025 pm 05:36 PM

MySQL has a free community version and a paid enterprise version. The community version can be used and modified for free, but the support is limited and is suitable for applications with low stability requirements and strong technical capabilities. The Enterprise Edition provides comprehensive commercial support for applications that require a stable, reliable, high-performance database and willing to pay for support. Factors considered when choosing a version include application criticality, budgeting, and technical skills. There is no perfect option, only the most suitable option, and you need to choose carefully according to the specific situation.

Can mysql run on android Can mysql run on android Apr 08, 2025 pm 05:03 PM

MySQL cannot run directly on Android, but it can be implemented indirectly by using the following methods: using the lightweight database SQLite, which is built on the Android system, does not require a separate server, and has a small resource usage, which is very suitable for mobile device applications. Remotely connect to the MySQL server and connect to the MySQL database on the remote server through the network for data reading and writing, but there are disadvantages such as strong network dependencies, security issues and server costs.

How to optimize MySQL performance for high-load applications? How to optimize MySQL performance for high-load applications? Apr 08, 2025 pm 06:03 PM

MySQL database performance optimization guide In resource-intensive applications, MySQL database plays a crucial role and is responsible for managing massive transactions. However, as the scale of application expands, database performance bottlenecks often become a constraint. This article will explore a series of effective MySQL performance optimization strategies to ensure that your application remains efficient and responsive under high loads. We will combine actual cases to explain in-depth key technologies such as indexing, query optimization, database design and caching. 1. Database architecture design and optimized database architecture is the cornerstone of MySQL performance optimization. Here are some core principles: Selecting the right data type and selecting the smallest data type that meets the needs can not only save storage space, but also improve data processing speed.

See all articles