在OSX狮子(Lion)上安装MYSQL(Install MySQL on Mac OSX)
OSX狮子,可以下载64位版本的mysql-5.5.22-osx10.6-x86_64.dmg。MySQL的详细安装说明在MySQL参考手册(MySQL Reference Manual)的安装和升级(Installing and Upgrading)章。MySQL参考手册可以在MySQL文档页面上在线阅读或下载。
这个模块还在系统配置文件'/etc/hostconfig'中添加了一项'MySQLCOM=YES-' 。如果不想自动启动MySQL,可以将这一项设为NO,即'MySQLCOM=NO-'.
shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
(可能需要输入密码)
shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
shell> mysqladmin -u root password NEWPASSWORD
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 364
Server version: 5.1.62 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
MySQL is the most popular open source database management system. To install MySQL, first download the version that suits your enviroment
from MySQL's downloading page. For example, for my Mac OSX Lion laptop, I downloaded mysql-5.5.22-osx10.6-x86_64.dmg.
MySQL's installation instructions can be found in the Installing and Upgrading chapter of MySQL's Reference Manual, which can be viewed online or downloaded on MySQL's
documentation page.
special case handlings.
the installation succeeds, you should see an entry in "System Preferences", as shown below.
error handlings. The Startup Item is installed into /Library/StartupItems/MySQLCOM. It also adds an entry 'MySQLCOM=YES-' in the system configuration file '/etc/hostconfig'. To disable automatic startup, you can set 'MySQLCOM=NO-'.
shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
(ENTER PASSWORD, IF NECESSARY)
shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
shell> mysqladmin -u root password NEWPASSWORD
After setting the password, log in to the MySQL server in the shell command or using phpAdmin
shell> mysql -u root --password=NEWPASSWORD test
If log in succeeds, you should see some outputs like below. You can run some sql commands (e.g., 'show databases') to verify MySQL is
working properly.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 364
Server version: 5.1.62 MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
在OSX狮子(Lion)上安装MYSQL(Install MySQL on Mac OSX)的更多相关文章
- 如何在一台服务器上安装两个mysql或者更多
如何在一台服务器上安装两个mysql 1 前言 上篇写了在一台机器上源码编译安装一个mysql,那么如何在一台机器上源码编译安装两个mysql或者更多呢? 2 环境 mysql ...
- (转)如何在Windows上安装多个MySQL
原文:http://www.blogjava.net/hongjunli/archive/2009/03/01/257216.html 如何在Windows上安装多个MySQL 本文以免安装版的mys ...
- 如何在一台机器上安装两个MYSQL数据库
1.正常安装第一个mysql(安装步骤省略) 2.在控制面板里停止第一个mysql服务 3.将C:\Program Files\MySQL目录下的所有目录和文件copy到另外一个路径,我这里是copy ...
- 如何在Windows上安装多个MySQL
将MySQL注册为系统服务:%MySQL_HOME%\bin>mysqld --install mysql5.1,此时,在运行中输入"services.msc"或者打开&qu ...
- (windows)一台电脑上安装两个Mysql服务
原文:https://my.oschina.net/u/1472917/blog/410732 最近需要在一台电脑上安装两个Mysql服务,需求稍微有些奇怪,但确实很必要.本人原本为了本机测试Word ...
- Windows上安装多个MySQL实例(转)
在学习和开发过程中有时候会用到多个MySQL数据库,比如Master-Slave集群.分库分表,开发阶段在一台机器上安装多个MySQL实例就显得方便不少. 在 MySQL教程-基础篇-1.1-Wind ...
- 在一台Linux服务器上安装多个MySQL实例(一)--使用mysqld_multi方式
(一)MySQL多实例概述 实例是进程与内存的一个概述,所谓MySQL多实例,就是在服务器上启动多个相同的MySQL进程,运行在不同的端口(如3306,3307,3308),通过不同的端口对外提供服务 ...
- Install Ansible on Mac OSX
from: https://devopsu.com/guides/ansible-mac-osx.html and : https://devopsu.com/guides/ansible-post- ...
- 使用Homebrew在Mountain Lion上安装MySQL
一.安装mysql brew install mysql 二.开机启动mysql brew info mysql 根据提示,设置开机启动 三.设置mysql开启和停止命令 alias mysql-st ...
随机推荐
- JavaScript引用类型之Array数组的concat()和push()方法的区别
在javascript中,我们一般都只用push向数组的尾部插入新元素的,但是其实在javascript中还有另外一个方法和push一样,也是向数组尾部插入新元素的,但是他们之间却存在着一定的区别,当 ...
- SQL学习之高级数据过滤
一.高级数据过滤之IN操作符 IN 操作符用来指定条件范围,范围中的每个条件都可以进行匹配.IN取一组由逗号分隔.括在圆括号中的合法值.代码如下: select ItemId,ItemName,Che ...
- Java中使用Observer接口和Observable类实践Observer观察者模式
在Java中通过Observable类和Observer接口实现了观察者模式.实现Observer接口的对象是观察者,继承Observable的对象是被观察者. 1. 实现观察者模式 实现观察者模式非 ...
- C#委托的简单剖析
为什么在Button1的Click事件发生之后,button1_Click方法就会被调用呢? 实际上,在我们双击Button1的时候,IDE自动的添加了一段代码,该段代码位于“Form1.Design ...
- C++/C#结构体转化-传string给C++
此例是把C#结构传给C++ C++: typedef struct VidyoClientInEventGroupChat_ { /*! Message (contents) to be sent t ...
- Oracle经典书籍推荐
转自:http://www.cnblogs.com/fjfzhkb/archive/2007/12/05/983381.html 很多网友询问如何选择入门书籍,学Oracle有什么好书,这里给出一些常 ...
- classpath的总结
转自:http://blog.csdn.net/javaloveiphone/article/details/51994268 版权声明:本文为博主原创文章,未经博主允许不得转载. 1.src不是 ...
- KNN算法[分类算法]
kNN(k-近邻)分类算法的实现 (1) 简介: (2)算法描述: (3) <?php /* *KNN K-近邻方法(分类算法的实现) */ /* *把.txt中的内容读到数组中保存,$file ...
- cmd dos 下 无法显示中文
在做程序开发的时候经常需要在使用命令行进行操作, dos环境本身是不支持中文的,有时候中文编码的问题就像苍蝇一样讨厌,下面提供几种常用的手段解决win7环境下中文显示乱码的问题: 方法一: 修改注册表 ...
- CCNP路由实验(4) -- BGP
基本配置:enableconf tno ip do loenable pass ciscoline con 0logg syncexec-t 0 0line vty 0 4pass ciscologg ...