Mac installation MySQL encounters the pit

Source: Internet
Author: User
Tags aliases ssl connection

Install MySQL before using XMPP, little white encounter a lot of pits, do not take offense

Download the MySQL website and select the file with the community extension DMG

After the installation to remember the password, the important thing to say only once, yes, the installation is also no preference and self-start, privately think is a PKG included

Modify the. bash_profile file at the terminal and set some aliases to use

command line input sudo vi ~/. bash_profile original file content, do not know what role, also dare not delete, first comment off #[[-S"$HOME/.profile"]] && Source"$HOME/.profile"# Load thedefault. profile#[[-S"$HOME/.RVM/SCRIPTS/RVM"]] && sou rce"$HOME/.RVM/SCRIPTS/RVM"# Load RVM into a shell session * asA function*add content, mostly set aliases, simplify operations # Mysqlalias MySQL='/usr/local/mysql/bin/mysql'alias Mysqladmin='/usr/local/mysql/bin/mysqladmin'#lsalias ls='ls-g'

Log in to Database

Mysql-u root-p
Enter the password, here to enter the password you remember before, if you forget not to blame me before the reminder to display the current table
show databases;

Well, it's not the same as what you say on the Internet.

The following error is displayed must reset your password using ALTER USER statement before executing this statement. Can not use that first change password, database statement is not very familiar with, guess half a day than Google, a degree hurt me times, or turn a bar Uid-20785090-id-5162305.html Read the explanation of this article, use the following command
Mysqladmin-u root-p Password
Enter the current password with the new password warning:since password'll be sent into server in plain text, use SSL connection to ensure password safety. Encryption Security All this time again show databases; +--------------------+
| Database |
| Information_schema |
| MySQL |
| Performance_schema |
| SYS |
+--------------------+4 rows in Set (0.01 sec) exits the database exit; Bye

Did you put it on?

Mac installation MySQL encounters the pit

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: 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.