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