Configure MySQL under Mac

Source: Internet
Author: User

Source: http://www.himigame.com/mysql/749.html

Then from today onwards will update the database and Hibernate framework blog post, but also Himi learning history, I hope you can discuss and study together;

OK, this article simply introduces the installation bar, first to the MySQL official website:

http://www.mysql.com/downloads/

Http://dev.mysql.com/downloads/(from this address you can go directly to the download page)

such as: Click Download, enter the following interface, select the corresponding version of your system to download it;

My is Mac Pro 64-bit Lion 10.7.3, select as above 10.6 latest MySQL version;

OK, install the 3 files in DMG after downloading, as follows:

1.MYSQL-5.5.23-OSX10.6-X86_64.PKG package for MySQL main package

2.mysql.prefpane, add item in Mac Preferences to start the MySQL Server service;

MySQL Startup program 3.mysqlstartipitem.pkg

Here's another tool for MySQL's official website: MySQL Workbench (GUI tool)

MySQL Workbench (GUI tool) is a MySQL interface operating software, which is plainly the Visual Database tools, similar software such as SQL Manager,mysql front, etc.

: http://www.mysql.com/downloads/workbench/

This tool is only 32-bit, but for Mac systems, 32 or 64 will work perfectly;

Download and install;

Below we simply use Workbench to create a connection that launches Mysqlworkbench, such as:

This is mainly divided into 3 large function blocks:

SQL Development: Establish database connection, execute query, script, edit data and manage database object;

Data Modeling: The relational model can be used to transform the relational data model and the database, the relational models and the SQL scripts.

Server Administration: Create service instance, manage database user, database backup and import;

The leftmost SQL development, we click "New Connection", directly various next (with the default configuration) to complete the creation;

Then don't worry double-clicking on this new connection, to start the MySQL Server service first, open your Mac's "System Preferences"->mysql-> Click Start "Start MySQL Server", of course, can also be executed via terminal command:

sudo/library/startupitems/mysqlcom/mysqlcom start

OK, back to restart our new connection, you can open the normal;

Basically for the Visual database management software more introduction not to repeat, non-focus;

OK, let's check if MySQL is installed to run properly and open the terminal:

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

Cd/usr/local/mysql

Mysql-u root-p

Here you can also configure the path:

1. Open terminal input: Pico. bash_profile; Enter

2. Configure this path in: Export path= $PATH:/usr/local/mysql/bin/

3. Reopen the terminal, then directly mysql-u-p;

Generally will add this path, otherwise very inconvenient to use the MySQL say ~

Enter the password xxx Enter, appear welcome to the MySQL Monitor .... The word description OK.

default password root;

If you want to change your password, you can change it by following the command:

/usr/local/mysql/bin/mysqladmin-u Root Password your password

12345678910 这是一个简单的命令,要求服务器告诉它的版本号和当前日期。在mysql>提示输入如下命令并按回车键:mysql> SELECT VERSION(), CURRENT_DATE;+-----------------+--------------+ | VERSION()       | CURRENT_DATE |+-----------------+--------------+| 5.1.2-alpha-log| 2005-10-11   |+-----------------+--------------+1 row in set (0.01 sec)

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