Use MySQL under Mac

Source: Internet
Author: User

1. Install MySQL

2. Start the MySQL service in preferences

3. Open the terminal input MySQL and you will find

chenhong:~ chenhong$ Mysql-bash:mysql:command not found

4. Set mysql command, enter

1) alias mysql=/usr/local/mysql/bin/mysql

2) Alias Mysqladmin=/usr/local/mysql/bin/mysqladmin

Entering the MySQL command again will find

chenhong:~ chenhong$ Mysql-bash:mysql:command not foundchenhong:~ chenhong$ alias mysql=/usr/local/mysql/bin/ mysqlchenhong:~ chenhong$ alias mysqladmin=/usr/local/mysql/bin/mysqladminchenhong:~ chenhong$ MysqlWelcome to the MySQL Monitor.  

5. Using the database, the MySQL Access denied for user [email protected] error occurred


MySQL Access denied for user [email protected] Error


is due to login account permissions problem, therefore, with the highest permission to log on (install MySQL when the user name and password set)

$ mysql-u Root-p

The console will then prompt you for the password



Once you have entered your password, you can use the database

mysql> Use micro_messagedatabase changed






Use MySQL under 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.