Run MySQL with the command line on your Mac

Source: Internet
Author: User

1, install MySQL

Download MySQL 5.5.23 http://www.mysql.com/downloads/mysql/on the official MySQL website and choose the 64bit version based on the configuration of my machine.

2, start MySQL on the command line

Installed location in/usr/local/mysql

Then an alias was made:

$alias mysql= '/usr/local/mysql/bin/mysql '

You can now enter

$mysql-U root-p

The default password is empty

After logging in, you need to add a password for the root user

>use MySQL;

>update user Set Password=password (' root ') where user= ' root ' and host= ' localhost ';

>flush privileges;


Now you can use MySQL like Linux on Mac OS.

Run MySQL with the command line on your Mac

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.