How to install and configure mysql on MAC

Source: Internet
Author: User
Tags mysql download

How to install and configure mysql on MAC

1. Download MySQL

Visit the MySQL official website http://www.mysql.com/downloads/ and then on the page will see "MySQL Community Server" below a "download" click.


Go to the MySQL download interface (http://www.mysql.com/downloads/mysql/), if you are using Mac OS access, then it will be selected for you by default Mac OS X platform, the following lists the MySQL versions that can be used on Mac OS. If you are using another Platform, Select the "Select Platform" option from the drop-down list.

There are many MySQL versions on Mac OS, including platform-based, such as 10.5/second and. dmg. Here I choose. dmg. Click download on the right to download.


Next, you will be redirected to another interface, which prompts you to register it. You can directly select "No thanks, just take me to downloads!" at the bottom !", Then, the download page is displayed. This page lists many servers for download. You can select a server to download.

Ii. Install MySQL

Open the MySQL installation package:


Install

Mysql-5.5.16-osx10.6-x86_64.pkg: This is the main MySql package;

MySQL_StartupItem.pkg: MySql startup item;

MySQL. prefPane: After the installation is complete, it will appear in the system preference settings, which are MySQL preference settings, which are mainly used to start the MySQL service.

 Iii. Download and install MySQL Workbench (GUI Tool)

3.1 download MySQL Workbench

Access http://www.mysql.com/downloads/ has a MySQL Workbench (GUI Tool) item below, click DOWNLOAD under it to enter the DOWNLOAD interface:

Then select the version and then select the server for download. There seems to be only one version:

 

3.2 install MySQL Workbench

After the download is complete, the installation is very simple. You can double-click it to install it. After the installation is complete, we can see the MySQL Workbench. app program in the "application. Double-click to open:

MySql Workbench has been installed.

After the installation is complete, we will talk about connecting MySQL Workbench to the MySQL database and then managing the database.

3.3 create a new connection

The main interface of MySQL Workbench includes three modules: SQL Development, Data Modeling, and Server Administration. Under SQL Development, a "New Connection" dialog box is displayed after you click "New Connection". After Entering the Connection Name, click "OK. You can complete a connection to the local database.

After the connection is completed, the connection just created appears on the main interface, for example:

Double-click the Connection name or select a Connection and click "Open Connection to Start Querying" to go to the database operation interface:

All these prerequisites are that the database service must be enabled.

3.4 manage the database access password

The default password of MySQL is root/root. Normally, we can use MySQL Workbench to manage the database, however, when we access MySQL through jdbc in programming code, we will find that using this account is not good and cannot be accessed, because MySQL requires us to change the password, that is to say, the root password is the default password, that is, the weak password, which must be modified before it can be used in the code. Therefore, we need to manage the database access password.

Create a Server Instance

In the "Server Administration" module, after clicking "New Server Instance", a "Create New Server Instance Profile" dialog box is displayed, which can be completed step by step, generally, the local database is OK directly with the default settings. After that, we can see the created instance on the far right of the main interface of Workbench.

 

Double-click the manager to open it. The password is required here. The root account is the one that has not been changed yet. Then there is a "SECURITY" sub-menu item "Users and Privileges" under the left-side menu bar. The following interface is displayed when you select this item:

In the right-side pane, there is a list of User Accounts. Select the account in which you want to change the password and change the password on the right.

The above is how to install and configure MySQL in MAC. I hope it will be helpful for your learning.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.