Mac install MySQL and Workbench

Source: Internet
Author: User
Tags mysql login

Install MySQL login MySQL website

Open website Download MySQL Community Server, select download below DMG file

Click Download, here is 8.0.11 version

Then select No thanks just start my download skip registration direct download

Installation steps

Open the Setup program

Always choose to continue

Select the first option in the configuration and set the initial password

Installation is complete.

Configuring the Environment

The MySQL service is turned on by default after the 8.0.11 version is installed, so you do not need to select MySQL and open the service specifically to System Preferences

The purpose of the environment configuration is to enter MySQL at the command line without entering cd/usr/local/mysql/bin/each time to enter the appropriate folder

Open a. bash_profile file with a text editor

vim ~/.bash_profile

Set path

After entering the text editing environment, press I to enter insert mode, enter

PATH=$PATH:/usr/local/mysql/bin

and save (vim, first press the ESC key, and then enter: WQ)

At the command line, enter

source ~/.bash_profile

The path configuration is complete.

Log in to MySQL

Open terminal, enter Mysql-u root-p

Enter MySQL by entering the password you previously set

Into success

Install Workbench Login Workbench Website

Login website https://dev.mysql.com/downloads/workbench/

Pull to the bottom.

Click Download to enter a new page

Click No thanks, just start my download skip registration start download

Installation steps

Open the Setup program

Drag the Mysqlworkbench icon to the applications to complete the installation

Test connection

Open the Installed Workbench

Click on the local instance 3306, if you can access this interface, instructions for installation complete

If the connection fails, you need to complete the following steps to restart MySQL

The first step

Click on the Apple logo in the top left corner, enter System Preferences, click the bottom point MySQL

In the new page, click Stop MySQL server to close the MySQL service

Step Two

Open Terminal input

cd/usr/local/mysql/bin/

Enter after carriage return

sudo su

To log in to administrator permissions, enter a password

Enter after carriage return

./mysqld_safe--skip-grant-tables &

To disable the MySQL authentication feature

Automatically restart MySQL after enter

When done, reopen Workbench Click Root instance 3306 to connect successfully

Mac install MySQL and Workbench

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.