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 http://m.blog.chinaunix.net/ 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