SQL---->mysql Install for Mac

Source: Internet
Author: User

I installed the following two blog posts, but there are some differences, here to write a good reference source:

http://blog.csdn.net/li_huifeng/article/details/9449685

Http://www.jianshu.com/p/fd3aae701db9

First, installation

Official website Download: http://dev.mysql.com/downloads/mysql/

Second, click, install the Package

Third, the installation will give you the root user an initial password

Iv. Enter System Preferences

Five, start

VI. Open terminal, define MySQL alias

Enter the alias command

Alias Mysql=/usr/local/mysql/bin/mysql

Return, enter again

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

Configuring Environment variables

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

Vii. also need to add MySQL to the system environment variable

(1)/usr/local/mysql/bin,查看此目录下是否有mysql

Input: cd/usr/local/mysql/bin/

 < Span style= "font-size:16px" > ( 2). Execute vim ~/.bash_profile  , add the Mysql/bin directory to the file ( Path= $PATH: /usr/local /mysql/bin ) as

 添加完成后,按esc,然后输入wq保存。最后在命令行输入 source ~/.bash_profile

Eight, Login

Now you can login MySQL through mysql-uroot-p, will let you enter the password, is the above to remember the initial password (q+p:)-u5vtnt)

After the login is successful, you can change the password by following the command

SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘newpass‘);

SQL---->mysql Install for 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.