Mac install MySQL

Source: Internet
Author: User

Start download

I chose the last DMG format installation package, click Download, will appear let us register login interface, click the bottom of the no thanks,just take I to downloads! directly download can:

Download Complete for installation

Open the downloaded installation package and click on the last file to install it, all the way next:



Installation Complete

After the installation is complete, a session box will pop up, which will tell us the root user's initial password, and don't ignore it.

Installation Inspection

After installation, open the preferences, check whether the MySQL has been installed, the landlord's MySQL seems to be installed successfully, OH Also

Start MySQL

Start or stop MySQL by clicking MySQL in Preferences

Of course, you can also directly double-click (Two-finger click to know) for quick access

MAC OS X-Reset MySQL Root password


Have you forgotten the root password of MySQL for Mac OS? You can reset your new password by following 4 steps:


1. Stop MySQL server. Usually in ' System Preferences ' > MySQL > ' Stop mysql Server '


2. Open the terminal and enter:


Sudo/usr/local/mysql/bin/mysqld_safe--skip-grant-tables


3. Open another new terminal and enter:


Sudo/usr/local/mysql/bin/mysql-u Root


UPDATE mysql.user SET authentication_string=password (' New password ') WHERE user= ' root ';


FLUSH privileges;


\q


4. Restart MySQL.


* Above method for MySQL V5.7.9, old version of MySQL please use: UPDATE mysql.user SET password=password (' New password ') WHERE user= ' root ';


Uninstall MySQL
    • How to uninstall MySQL, after all it does not come out of the application as well as Launchpad in the installation disk also does not give us uninstall files.

Enter the following code in the terminal can be completely deleted MySQL, landlord or recommend all copies to the terminal, simple violence (remember to close the MySQL service OH):

sudo rm/usr/Local/mysqlsudo RM-rf/usr/local/mysql*sudo RM Span class= "Hljs-attribute" >-rf/library/startupitems/mysqlcomsudo rm -rf/library/ Preferencepanes/my*vim/etc/hostconfig (and removed the line Mysqlcom=-yes-) rm -rf ~/Library/ Preferencepanes/my*sudo rm -rf/library/receipts/mysql*sudo rm -rf/library/receipts/mysql* sudo rm -rf/var/db/receipts/com .mysql. * 

Install MySQL on Mac

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.