<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>漂自己的移，让别人都撞墙去吧 &#187; mysql</title>
	<atom:link href="http://www.gagahappy.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gagahappy.com</link>
	<description>Life is what? Get busy living or get busy dying</description>
	<lastBuildDate>Tue, 07 Feb 2012 10:19:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理</title>
		<link>http://www.gagahappy.com/ubuntu-intall-mysql-fatal-error-could-not-find-mysqld/</link>
		<comments>http://www.gagahappy.com/ubuntu-intall-mysql-fatal-error-could-not-find-mysqld/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 07:20:47 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[程序开发]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3922</guid>
		<description><![CDATA[错误信息: #./bin/mysql_install_db –user=mysql FATAL ERROR: Could not find mysqld The following directories were searched: /usr/libexec /usr/sbin /usr/bin If you compiled from source, you need to run ‘make install’to copy the software into the correct location ready for operation. If you are using a binary release, you must either be at the top of the level [...]]]></description>
			<content:encoded><![CDATA[<p>错误信息:<br />
#./bin/mysql_install_db –user=mysql</p>
<p>FATAL ERROR: Could not find mysqld</p>
<p>The following directories were searched:<br />
<span id="more-3922"></span><br />
/usr/libexec<br />
/usr/sbin<br />
/usr/bin</p>
<p>If you compiled from source, you need to run ‘make install’to copy the software into the correct location ready for operation.</p>
<p>If you are using a binary release, you must either be at the top of the level of the extracted archivem or pass the –basedir option pointing to that location.</p>
<p>解决办法：<br />
scripts/mysql_install_db &#8211;user=mysql &#8211;basedir=/usr/local/mysql<br />
（这里mysql是所使用的用户名，basedir是mysql的安装目录）</p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/' rel='bookmark' title='mysql不能启动 Manager of pid-file quit without updating file.'>mysql不能启动 Manager of pid-file quit without updating file.</a></li>
<li><a href='http://www.gagahappy.com/mysql-select-strange-syntax/' rel='bookmark' title='mysql select 蹩脚的语法'>mysql select 蹩脚的语法</a></li>
<li><a href='http://www.gagahappy.com/phpmyadmin-need-a-phrase-password/' rel='bookmark' title='phpMyAdmin 配置文件现在需要一个短语密码'>phpMyAdmin 配置文件现在需要一个短语密码</a></li>
<li><a href='http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/' rel='bookmark' title='rails3.0 安装mysql2 失败，发生lmysqlclient 错误'>rails3.0 安装mysql2 失败，发生lmysqlclient 错误</a></li>
<li><a href='http://www.gagahappy.com/mysql-scale-out/' rel='bookmark' title='mysql 横向扩展性'>mysql 横向扩展性</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-server-has-gone-away/' rel='bookmark' title='MySQL server has gone away'>MySQL server has gone away</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/mysql-my-cnf-01/' rel='bookmark' title='mysql my.cnf'>mysql my.cnf</a></li>
<li><a href='http://www.gagahappy.com/mysql-config/' rel='bookmark' title='mysql 配置文件'>mysql 配置文件</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/ubuntu-intall-mysql-fatal-error-could-not-find-mysqld/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql 编译安装选择配置文件my.cnf</title>
		<link>http://www.gagahappy.com/mysql-select-my-cnf-how-to/</link>
		<comments>http://www.gagahappy.com/mysql-select-my-cnf-how-to/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 07:21:03 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3924</guid>
		<description><![CDATA[mysql 在编译安装初始化数据库时需要读取my.cnf文件，默认读取的位置是/etc/mysql，所以如果你把my.cnf文件copy到/etc/下的话，mysql读取的是/etc/mysql下的my.cnf，而不是/etc/my.cnf。如果想要读取my.cnf，请删除/etc/mysql文件夹。 您可能感兴趣的文章 mysql不能启动 Manager of pid-file quit without updating file. rails3.0 安装mysql2 失败，发生lmysqlclient 错误 mysql 横向扩展性 MySql用户创建、授权以及删除 MySQL server has gone away MySQL 导入慢的解决方法 MySQL中的mysqldump命令使用详解 ruby与rails版本差异不能连接mysql mysql my.cnf mysql 配置文件]]></description>
			<content:encoded><![CDATA[<p>mysql 在编译安装初始化数据库时需要读取my.cnf文件，默认读取的位置是/etc/mysql，所以如果你把my.cnf文件copy到/etc/下的话，mysql读取的是/etc/mysql下的my.cnf，而不是/etc/my.cnf。如果想要读取my.cnf，请删除/etc/mysql文件夹。</p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/' rel='bookmark' title='mysql不能启动 Manager of pid-file quit without updating file.'>mysql不能启动 Manager of pid-file quit without updating file.</a></li>
<li><a href='http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/' rel='bookmark' title='rails3.0 安装mysql2 失败，发生lmysqlclient 错误'>rails3.0 安装mysql2 失败，发生lmysqlclient 错误</a></li>
<li><a href='http://www.gagahappy.com/mysql-scale-out/' rel='bookmark' title='mysql 横向扩展性'>mysql 横向扩展性</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-server-has-gone-away/' rel='bookmark' title='MySQL server has gone away'>MySQL server has gone away</a></li>
<li><a href='http://www.gagahappy.com/mysqldump-import-slow/' rel='bookmark' title='MySQL 导入慢的解决方法'>MySQL 导入慢的解决方法</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/ruby-rails-not-conn-mysql/' rel='bookmark' title='ruby与rails版本差异不能连接mysql'>ruby与rails版本差异不能连接mysql</a></li>
<li><a href='http://www.gagahappy.com/mysql-my-cnf-01/' rel='bookmark' title='mysql my.cnf'>mysql my.cnf</a></li>
<li><a href='http://www.gagahappy.com/mysql-config/' rel='bookmark' title='mysql 配置文件'>mysql 配置文件</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/mysql-select-my-cnf-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql 删除字段</title>
		<link>http://www.gagahappy.com/mysql-drop-column/</link>
		<comments>http://www.gagahappy.com/mysql-drop-column/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 10:40:17 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[玩转软件]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3837</guid>
		<description><![CDATA[alter table `user` drop column dep; 您可能感兴趣的文章 mysql不能启动 Manager of pid-file quit without updating file. 解决rails2.2.2不能连接mysql 数据库驱动问题 mysql select 蹩脚的语法 mysql 横向扩展性 升级wordpress，mysql备份乱码成功解决 MySql用户创建、授权以及删除 MySQL server has gone away MySQL中的mysqldump命令使用详解 mysql my.cnf ubuntu mysql 自动启动]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">alter</span> <span style="color: #990099; font-weight: bold;">table</span> <span style="color: #008000;">`user`</span> <span style="color: #990099; font-weight: bold;">drop</span> <span style="color: #990099; font-weight: bold;">column</span> dep<span style="color: #000033;">;</span></pre></div></div>

<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/' rel='bookmark' title='mysql不能启动 Manager of pid-file quit without updating file.'>mysql不能启动 Manager of pid-file quit without updating file.</a></li>
<li><a href='http://www.gagahappy.com/rails2-2-2-can-not-connect-mysql-drive-bug/' rel='bookmark' title='解决rails2.2.2不能连接mysql 数据库驱动问题'>解决rails2.2.2不能连接mysql 数据库驱动问题</a></li>
<li><a href='http://www.gagahappy.com/mysql-select-strange-syntax/' rel='bookmark' title='mysql select 蹩脚的语法'>mysql select 蹩脚的语法</a></li>
<li><a href='http://www.gagahappy.com/mysql-scale-out/' rel='bookmark' title='mysql 横向扩展性'>mysql 横向扩展性</a></li>
<li><a href='http://www.gagahappy.com/wordpress-mysql-backup-encoding/' rel='bookmark' title='升级wordpress，mysql备份乱码成功解决'>升级wordpress，mysql备份乱码成功解决</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-server-has-gone-away/' rel='bookmark' title='MySQL server has gone away'>MySQL server has gone away</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/mysql-my-cnf-01/' rel='bookmark' title='mysql my.cnf'>mysql my.cnf</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-mysql-add-to-service/' rel='bookmark' title='ubuntu mysql 自动启动'>ubuntu mysql 自动启动</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/mysql-drop-column/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql不能启动 Manager of pid-file quit without updating file.</title>
		<link>http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/</link>
		<comments>http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 04:34:10 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3775</guid>
		<description><![CDATA[启动mysql失败，提示Manager of pid-file quit without updating file.错误。从网上直接搜索错误信息，感觉出错原因及解决方案都不适用于本机的情况。 本着出错要查出其原因的原则，查看了mysql的出错日志（出错日志所在路径，请根据您自己机子的实际情况查找），发现错误信息：File &#8216;./mysql-bin.index&#8217; not found (Errcode: 13)，查看数据库文件，mysql-bin.index确实存在。 查看数据库文件的权限，发现全都变成了 drwx&#8212;&#8212; 2 1001 1001。突然想起之前重建过mysql用户，造成数据库文件的权限用户信息丢失。重新授权即可。 sudo chown -R mysql var/ sudo chgrp -R mysql var/ 再次启动mysql，成功！ 您可能感兴趣的文章 rails3.0 安装mysql2 失败，发生lmysqlclient 错误 mysql 横向扩展性 MySql用户创建、授权以及删除 MySQL server has gone away MySQL 导入慢的解决方法 MySQL中的mysqldump命令使用详解 ruby与rails版本差异不能连接mysql mysql my.cnf ubuntu 更改mysql默认引擎为Innodb mysql 配置文件]]></description>
			<content:encoded><![CDATA[<p>启动mysql失败，提示Manager of pid-file quit without updating file.错误。从网上直接搜索错误信息，感觉出错原因及解决方案都不适用于本机的情况。</p>
<p>本着出错要查出其原因的原则，查看了mysql的出错日志（出错日志所在路径，请根据您自己机子的实际情况查找），发现错误信息：File &#8216;./mysql-bin.index&#8217; not found (Errcode: 13)，查看数据库文件，mysql-bin.index确实存在。</p>
<p>查看数据库文件的权限，发现全都变成了 drwx&#8212;&#8212; 2  1001 1001。突然想起之前重建过mysql用户，造成数据库文件的权限用户信息丢失。重新授权即可。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span>  mysql var<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chgrp</span> <span style="color: #660033;">-R</span>  mysql var<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>再次启动mysql，成功！</p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/' rel='bookmark' title='rails3.0 安装mysql2 失败，发生lmysqlclient 错误'>rails3.0 安装mysql2 失败，发生lmysqlclient 错误</a></li>
<li><a href='http://www.gagahappy.com/mysql-scale-out/' rel='bookmark' title='mysql 横向扩展性'>mysql 横向扩展性</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-server-has-gone-away/' rel='bookmark' title='MySQL server has gone away'>MySQL server has gone away</a></li>
<li><a href='http://www.gagahappy.com/mysqldump-import-slow/' rel='bookmark' title='MySQL 导入慢的解决方法'>MySQL 导入慢的解决方法</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/ruby-rails-not-conn-mysql/' rel='bookmark' title='ruby与rails版本差异不能连接mysql'>ruby与rails版本差异不能连接mysql</a></li>
<li><a href='http://www.gagahappy.com/mysql-my-cnf-01/' rel='bookmark' title='mysql my.cnf'>mysql my.cnf</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-mysql-engineinnodb/' rel='bookmark' title='ubuntu 更改mysql默认引擎为Innodb'>ubuntu 更改mysql默认引擎为Innodb</a></li>
<li><a href='http://www.gagahappy.com/mysql-config/' rel='bookmark' title='mysql 配置文件'>mysql 配置文件</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决rails2.2.2不能连接mysql 数据库驱动问题</title>
		<link>http://www.gagahappy.com/rails2-2-2-can-not-connect-mysql-drive-bug/</link>
		<comments>http://www.gagahappy.com/rails2-2-2-can-not-connect-mysql-drive-bug/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 09:56:36 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[我爱Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3737</guid>
		<description><![CDATA[gem install mysql &#8212; &#8211;with-mysql-config=/usr/local/mysql/bin/mysql_config 1. gem install mysql &#8211;no-rdoc &#8211;no-ri \ 2. &#8212; &#8211;with-mysql-include=/usr/local/mysql/include \ 3. &#8211;with-mysql-lib=/usr/local/mysql/lib \ 4. &#8211;with-mysql-config=/usr/local/mysql/bin/mysql_config &#8220;/usr/local/mysql/lib&#8221; to /etc/ld.so.conf and ran ldconfig 修改 /etc/ld.so.conf 加入 include /opt/mysql/lib gem install mysql &#8212; &#8211;with-mysql-lib=/opt/mysql/lib/mysql &#8211;with-mysql-include=/opt/mysql/include/mysql/ 您可能感兴趣的文章 安装Rmagick 编译安装mysql 编译安装rails rails3.0 安装mysql2 失败，发生lmysqlclient 错误 fedora13 编译安装 mysql no curses/termcap library found mysql 字符串转换成数字 [...]]]></description>
			<content:encoded><![CDATA[<p>gem install mysql &#8212; &#8211;with-mysql-config=/usr/local/mysql/bin/mysql_config</p>
<p>1. gem install mysql &#8211;no-rdoc &#8211;no-ri \<br />
2. &#8212; &#8211;with-mysql-include=/usr/local/mysql/include \<br />
3. &#8211;with-mysql-lib=/usr/local/mysql/lib \<br />
4. &#8211;with-mysql-config=/usr/local/mysql/bin/mysql_config</p>
<p>&#8220;/usr/local/mysql/lib&#8221; to /etc/ld.so.conf and ran ldconfig</p>
<p>修改 /etc/ld.so.conf<br />
加入<br />
include /opt/mysql/lib</p>
<p>gem install mysql &#8212; &#8211;with-mysql-lib=/opt/mysql/lib/mysql &#8211;with-mysql-include=/opt/mysql/include/mysql/</p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/rmagick-install/' rel='bookmark' title='安装Rmagick'>安装Rmagick</a></li>
<li><a href='http://www.gagahappy.com/mysql-install-with-make-install/' rel='bookmark' title='编译安装mysql'>编译安装mysql</a></li>
<li><a href='http://www.gagahappy.com/rails-install-with-make-install/' rel='bookmark' title='编译安装rails'>编译安装rails</a></li>
<li><a href='http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/' rel='bookmark' title='rails3.0 安装mysql2 失败，发生lmysqlclient 错误'>rails3.0 安装mysql2 失败，发生lmysqlclient 错误</a></li>
<li><a href='http://www.gagahappy.com/fedora13-mysql-no-cursestermcap-library-found/' rel='bookmark' title='fedora13 编译安装 mysql no curses/termcap library found'>fedora13 编译安装 mysql no curses/termcap library found</a></li>
<li><a href='http://www.gagahappy.com/mysql-string-cast-to-number/' rel='bookmark' title='mysql 字符串转换成数字'>mysql 字符串转换成数字</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-remove-mysql-service/' rel='bookmark' title='Ubuntu 取消 mysql开机启动服务'>Ubuntu 取消 mysql开机启动服务</a></li>
<li><a href='http://www.gagahappy.com/install-sphinx/' rel='bookmark' title='安装 Sphinx'>安装 Sphinx</a></li>
<li><a href='http://www.gagahappy.com/rails-2-quick-show/' rel='bookmark' title='rails2.0快速体验'>rails2.0快速体验</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-mysql-add-to-service/' rel='bookmark' title='ubuntu mysql 自动启动'>ubuntu mysql 自动启动</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/rails2-2-2-can-not-connect-mysql-drive-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>编译安装mysql</title>
		<link>http://www.gagahappy.com/mysql-install-with-make-install/</link>
		<comments>http://www.gagahappy.com/mysql-install-with-make-install/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 09:52:23 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[我爱Linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3734</guid>
		<description><![CDATA[安装过程： 一、必要软件包 1、安装系统编译环境 apt-get  install build-essential build-essential 依赖: libc6-dev 依赖: &#60;libc-dev&#62; libc6-dev 依赖: g++ 依赖: make 2、安装 libncurses5-dev 3、需要安装chkconfig 二、下载mysql-VERSION.tar.gz包 shell&#62; groupadd mysql shell&#62; useradd -g mysql mysql shell&#62;shell&#62; tar zxvf /path/to/mysql-VERSION-OS.tar.gz  (gunzip &#60; mysql-VERSION.tar.gz &#124; tar -xvf -也可以，不过主推第一种方式) shell&#62; cd mysql-VERSION shell&#62; ./configure &#8211;prefix=/usr/local/mysql （./configure &#8211;prefix=/usr/local/mysql &#8211;with-charset=utf8 &#8211;with-collation=utf8_general_ci &#8211;with-extra-charsets=all） ./configure &#8211;prefix=/opt/mysql &#8211;with-charset=utf8 &#8211;with-collation=utf8_general_ci &#8211;with-extra-charsets=all &#8211;with-plugins=innobase 使用innodb [...]]]></description>
			<content:encoded><![CDATA[<p>安装过程：</p>
<p>一、必要软件包<br />
1、安装系统编译环境<br />
apt-get  <span style="color: #000000;">install build-essential<br />
build-essential<br />
依赖: libc6-dev<br />
依赖: &lt;libc-dev&gt;<br />
libc6-dev<br />
依赖: g++<br />
依赖: make</span></p>
<p>2、<span style="color: red;">安装 libncurses5-dev</span><br />
3、需要安装chkconfig<br />
<span id="more-3734"></span><br />
<span style="color: #000000;"><br />
</span>二、下载mysql-VERSION.tar.gz包</p>
<p>shell&gt; groupadd mysql</p>
<p>shell&gt; useradd -g mysql mysql</p>
<p>shell&gt;shell&gt; <strong>tar zxvf <em>/path/to/mysql-VERSION-OS</em>.tar.gz</strong><span style="font-family: Helvetica,Arial,sans-serif;">  (</span>gunzip &lt; mysql-VERSION.tar.gz | tar -xvf -也可以，不过主推第一种方式)</p>
<p>shell&gt; cd mysql-VERSION</p>
<p>shell&gt; ./configure &#8211;prefix=/usr/local/mysql （./configure &#8211;prefix=/usr/local/mysql &#8211;with-charset=utf8 &#8211;with-collation=utf8_general_ci &#8211;with-extra-charsets=all）<br />
./configure &#8211;prefix=/opt/mysql &#8211;with-charset=utf8 &#8211;with-collation=utf8_general_ci &#8211;with-extra-charsets=all &#8211;with-plugins=innobase</p>
<p>使用innodb 引擎<br />
modify my.cnf<br />
add<br />
default-storage-engine=INNODB</p>
<p>shell&gt; make</p>
<p>shell&gt; make install</p>
<p>shell&gt; cp support-files/my-medium.cnf /etc/my.cnf</p>
<p>shell&gt; cd /usr/local/mysql</p>
<p>shell&gt; bin/mysql_install_db &#8211;user=mysql</p>
<p>shell&gt; chown -R root  .</p>
<p>shell&gt; chown -R mysql var</p>
<p>shell&gt; chgrp -R mysql .</p>
<p>shell&gt; bin/mysqld_safe &#8211;user=mysql &amp; (启动服务)</p>
<p>开机自动启动</p>
<p>在MySQL安装目录下或MySQL源码树的support-files目录中找到脚本。 要想手动安装<strong><span style="font-family: 宋体;">mysql.server</span></strong>，用名称<strong><span style="font-family: 宋体;">mysql</span></strong>将它复制到/etc/init.d目录，然后将它变为可执行文件。只需要将位置更改为<strong>mysql.server</strong><br />
所在并执行这些命令的相应目录<br />
shell&gt; <strong>cp mysql.server /etc/init.d/mysql<br />
</strong>shell&gt; <strong>chmod +x /etc/init.d/mysql</strong></p>
<p>安装脚本后，用来激活它以便在系统启动时运行所需要的命令取决于你的操作系统。在Linux中，你可以使用chkconfig：<br />
shell&gt; <strong>chkconfig &#8211;add MySQL   [</strong><span style="font-family: 华文仿宋;"><span>chmod 755 /etc/init.d/mysql5.1<br />
update-rc.d mysql5.1 defaults 99</span></span><strong>] 也可以。<br />
</strong>在一些Linux系统中，还需要下面的命令来完全激活MySQL脚本：<br />
shell&gt; <strong>chkconfig &#8211;level 345MySQL on</strong><br />
shell&gt; /etc/init.d/mysql start</p>
<p>配置环境变量<br />
vi /etc/environment<br />
MYSQL_HOME=/usr/local/mysql<br />
export PATH=$MYSQL_HOME/bin:$PATH<span style="color: red;"><br />
</span></p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/' rel='bookmark' title='mysql不能启动 Manager of pid-file quit without updating file.'>mysql不能启动 Manager of pid-file quit without updating file.</a></li>
<li><a href='http://www.gagahappy.com/rails2-2-2-can-not-connect-mysql-drive-bug/' rel='bookmark' title='解决rails2.2.2不能连接mysql 数据库驱动问题'>解决rails2.2.2不能连接mysql 数据库驱动问题</a></li>
<li><a href='http://www.gagahappy.com/fedora13-mysql-no-cursestermcap-library-found/' rel='bookmark' title='fedora13 编译安装 mysql no curses/termcap library found'>fedora13 编译安装 mysql no curses/termcap library found</a></li>
<li><a href='http://www.gagahappy.com/mysql-scale-out/' rel='bookmark' title='mysql 横向扩展性'>mysql 横向扩展性</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-server-has-gone-away/' rel='bookmark' title='MySQL server has gone away'>MySQL server has gone away</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-remove-mysql-service/' rel='bookmark' title='Ubuntu 取消 mysql开机启动服务'>Ubuntu 取消 mysql开机启动服务</a></li>
<li><a href='http://www.gagahappy.com/mysql-my-cnf-01/' rel='bookmark' title='mysql my.cnf'>mysql my.cnf</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-mysql-add-to-service/' rel='bookmark' title='ubuntu mysql 自动启动'>ubuntu mysql 自动启动</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/mysql-install-with-make-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql select 蹩脚的语法</title>
		<link>http://www.gagahappy.com/mysql-select-strange-syntax/</link>
		<comments>http://www.gagahappy.com/mysql-select-strange-syntax/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 12:58:31 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3464</guid>
		<description><![CDATA[发现mysql对于处理这样相同的查询，居然有两种截然不同的结果 SELECT *,slug FROM wp_terms; 执行正确 SELECT slug,* FROM wp_terms; 执行错误：You have an error in your SQL syntax 费解啊~~~，在MSSQL中不会出现此现象 您可能感兴趣的文章 ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理 mysql不能启动 Manager of pid-file quit without updating file. phpMyAdmin 配置文件现在需要一个短语密码 rails3.0 安装mysql2 失败，发生lmysqlclient 错误 mysql 横向扩展性 MySql用户创建、授权以及删除 MySQL server has gone away MySQL中的mysqldump命令使用详解 mysql my.cnf ubuntu mysql 自动启动]]></description>
			<content:encoded><![CDATA[<p>发现mysql对于处理这样相同的查询，居然有两种截然不同的结果</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #CC0099;">*</span><span style="color: #000033;">,</span>slug <span style="color: #990099; font-weight: bold;">FROM</span> wp_terms<span style="color: #000033;">;</span></pre></div></div>

<p>执行正确</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span> slug<span style="color: #000033;">,</span><span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">FROM</span> wp_terms<span style="color: #000033;">;</span></pre></div></div>

<p>执行错误：You have an error in your SQL syntax</p>
<p>费解啊~~~，在MSSQL中不会出现此现象</p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/ubuntu-intall-mysql-fatal-error-could-not-find-mysqld/' rel='bookmark' title='ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理'>ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理</a></li>
<li><a href='http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/' rel='bookmark' title='mysql不能启动 Manager of pid-file quit without updating file.'>mysql不能启动 Manager of pid-file quit without updating file.</a></li>
<li><a href='http://www.gagahappy.com/phpmyadmin-need-a-phrase-password/' rel='bookmark' title='phpMyAdmin 配置文件现在需要一个短语密码'>phpMyAdmin 配置文件现在需要一个短语密码</a></li>
<li><a href='http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/' rel='bookmark' title='rails3.0 安装mysql2 失败，发生lmysqlclient 错误'>rails3.0 安装mysql2 失败，发生lmysqlclient 错误</a></li>
<li><a href='http://www.gagahappy.com/mysql-scale-out/' rel='bookmark' title='mysql 横向扩展性'>mysql 横向扩展性</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-server-has-gone-away/' rel='bookmark' title='MySQL server has gone away'>MySQL server has gone away</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/mysql-my-cnf-01/' rel='bookmark' title='mysql my.cnf'>mysql my.cnf</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-mysql-add-to-service/' rel='bookmark' title='ubuntu mysql 自动启动'>ubuntu mysql 自动启动</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/mysql-select-strange-syntax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>phpMyAdmin 配置文件现在需要一个短语密码</title>
		<link>http://www.gagahappy.com/phpmyadmin-need-a-phrase-password/</link>
		<comments>http://www.gagahappy.com/phpmyadmin-need-a-phrase-password/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 02:27:14 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[程序开发]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=3091</guid>
		<description><![CDATA[上传安装phpMyAdmin后，出现”配置文件现在需要一个短语密码“的错误提示，上网查找，解决方法如下 修改phpmyadmin/libraries/config.default.php中的$cfg['blowfish_secret']的值为任意字符串 /** * The 'cookie' auth_type uses blowfish algorithm to encrypt the password. If * at least one server configuration uses 'cookie' auth_type, enter here a * pass phrase that will be used by blowfish. The maximum length seems to be 46 * characters. * * @global string $cfg['blowfish_secret'] */ $cfg&#91;'blowfish_secret'&#93; = 'yourpassword'; 您可能感兴趣的文章 [...]]]></description>
			<content:encoded><![CDATA[<p>上传安装phpMyAdmin后，出现”配置文件现在需要一个短语密码“的错误提示，上网查找，解决方法如下</p>
<p>修改phpmyadmin/libraries/config.default.php中的$cfg['blowfish_secret']的值为任意字符串</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * The 'cookie' auth_type uses blowfish algorithm to encrypt the password. If
 * at least one server configuration uses 'cookie' auth_type, enter here a
 * pass phrase that will be used by blowfish. The maximum length seems to be 46
 * characters.
 *
 * @global string $cfg['blowfish_secret']
 */</span>
<span style="color: #000088;">$cfg</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'blowfish_secret'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'yourpassword'</span><span style="color: #339933;">;</span></pre></div></div>

<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/ubuntu-intall-mysql-fatal-error-could-not-find-mysqld/' rel='bookmark' title='ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理'>ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理</a></li>
<li><a href='http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/' rel='bookmark' title='mysql不能启动 Manager of pid-file quit without updating file.'>mysql不能启动 Manager of pid-file quit without updating file.</a></li>
<li><a href='http://www.gagahappy.com/mysql-select-strange-syntax/' rel='bookmark' title='mysql select 蹩脚的语法'>mysql select 蹩脚的语法</a></li>
<li><a href='http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/' rel='bookmark' title='rails3.0 安装mysql2 失败，发生lmysqlclient 错误'>rails3.0 安装mysql2 失败，发生lmysqlclient 错误</a></li>
<li><a href='http://www.gagahappy.com/mysql-scale-out/' rel='bookmark' title='mysql 横向扩展性'>mysql 横向扩展性</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-server-has-gone-away/' rel='bookmark' title='MySQL server has gone away'>MySQL server has gone away</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/mysql-my-cnf-01/' rel='bookmark' title='mysql my.cnf'>mysql my.cnf</a></li>
<li><a href='http://www.gagahappy.com/mysql-config/' rel='bookmark' title='mysql 配置文件'>mysql 配置文件</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/phpmyadmin-need-a-phrase-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rails3.0 安装mysql2 失败，发生lmysqlclient 错误</title>
		<link>http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/</link>
		<comments>http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 14:54:52 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[数据库]]></category>
		<category><![CDATA[程序开发]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=2585</guid>
		<description><![CDATA[rails3.0使用的mysql驱动是mysql2，默认安装使用 bundle install，在安装过程中出现如下错误 /opt/ruby/bin/ruby extconf.rb checking for rb_thread_blocking_region()&#8230; no checking for mysql_query() in -lmysqlclient&#8230; no checking for main() in -lm&#8230; yes checking for mysql_query() in -lmysqlclient&#8230; no checking for main() in -lz&#8230; yes checking for mysql_query() in -lmysqlclient&#8230; no checking for main() in -lsocket&#8230; no checking for mysql_query() in -lmysqlclient&#8230; no checking for main() in [...]]]></description>
			<content:encoded><![CDATA[<p>rails3.0使用的mysql驱动是mysql2，默认安装使用 bundle install，在安装过程中出现如下错误</p>
<blockquote><p>
/opt/ruby/bin/ruby extconf.rb<br />
checking for rb_thread_blocking_region()&#8230; no<br />
checking for mysql_query() in -lmysqlclient&#8230; no<br />
checking for main() in -lm&#8230; yes<br />
checking for mysql_query() in -lmysqlclient&#8230; no<br />
checking for main() in -lz&#8230; yes<br />
checking for mysql_query() in -lmysqlclient&#8230; no<br />
checking for main() in -lsocket&#8230; no<br />
checking for mysql_query() in -lmysqlclient&#8230; no<br />
checking for main() in -lnsl&#8230; yes<br />
checking for mysql_query() in -lmysqlclient&#8230; no<br />
checking for main() in -lmygcc&#8230; no<br />
checking for mysql_query() in -lmysqlclient&#8230; no<br />
*** extconf.rb failed ***<br />
Could not create Makefile due to some reason, probably lack of<br />
necessary libraries and/or headers.  Check the mkmf.log file for more<br />
details.  You may need configuration options.
</p></blockquote>
<p>解决方法<br />
<span id="more-2585"></span><br />
既然要安装 mysql2 驱动，我们完全可以抛开bundle，而使用传统的gem的安装方式，并指明mysql的以下几个选项即可<br />
sudo gem install mysql2 &#8212; &#8211;with-mysql-dir=/opt/mysql &#8211;with-mysql-include=/opt/mysql/include/mysql &#8211;with-mysql-lib=/opt/mysql/lib/mysql/</p>
<p>然后再运行 bundle intall顺利完成其它gem组件的安装。看到网上有的解决方法是安装mysql-deve这个库，其实知道原因后对症下药即可，本博没有安装mysql-deve，仅是指明了mysql的相关选项，即可解决问题。</p>
<p>PS：bundle这个gem真的被集成到rails3.0里了。</p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/ubuntu-intall-mysql-fatal-error-could-not-find-mysqld/' rel='bookmark' title='ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理'>ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理</a></li>
<li><a href='http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/' rel='bookmark' title='mysql不能启动 Manager of pid-file quit without updating file.'>mysql不能启动 Manager of pid-file quit without updating file.</a></li>
<li><a href='http://www.gagahappy.com/the-different-between-include-and-extend-in-ruby/' rel='bookmark' title='ruby 中 include 与 extend 区别'>ruby 中 include 与 extend 区别</a></li>
<li><a href='http://www.gagahappy.com/mysql-select-strange-syntax/' rel='bookmark' title='mysql select 蹩脚的语法'>mysql select 蹩脚的语法</a></li>
<li><a href='http://www.gagahappy.com/phpmyadmin-need-a-phrase-password/' rel='bookmark' title='phpMyAdmin 配置文件现在需要一个短语密码'>phpMyAdmin 配置文件现在需要一个短语密码</a></li>
<li><a href='http://www.gagahappy.com/ruby-install-rmagick/' rel='bookmark' title='ruby 安装 rmagick'>ruby 安装 rmagick</a></li>
<li><a href='http://www.gagahappy.com/mysql-string-cast-to-number/' rel='bookmark' title='mysql 字符串转换成数字'>mysql 字符串转换成数字</a></li>
<li><a href='http://www.gagahappy.com/mysql-create-user/' rel='bookmark' title='MySql用户创建、授权以及删除'>MySql用户创建、授权以及删除</a></li>
<li><a href='http://www.gagahappy.com/mysql-mysqldump-01/' rel='bookmark' title='MySQL中的mysqldump命令使用详解'>MySQL中的mysqldump命令使用详解</a></li>
<li><a href='http://www.gagahappy.com/rails-2-quick-show/' rel='bookmark' title='rails2.0快速体验'>rails2.0快速体验</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/rails3-0-gem-mysql2-lmysqlclient/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fedora13 编译安装 mysql no curses/termcap library found</title>
		<link>http://www.gagahappy.com/fedora13-mysql-no-cursestermcap-library-found/</link>
		<comments>http://www.gagahappy.com/fedora13-mysql-no-cursestermcap-library-found/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 13:11:19 +0000</pubDate>
		<dc:creator>moonfox</dc:creator>
				<category><![CDATA[我爱Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.gagahappy.com/?p=1694</guid>
		<description><![CDATA[在fedora13下编译安装mysql时出现no curses/termcap library found错误，即缺少ncurses-devel包。 解决方法 ：yum install ncurses-devel 您可能感兴趣的文章 fedora 14 apache不能访问 subversion 仓库 fedora 删除旧内核 Fedora 14 安装 NVIDIA 显卡驱 fedora ubuntu 建立多重启动菜单 fedora ssh 访问 如何关闭SELinux fedora 安装显卡驱动 fedora 安装 zlib库 fedora 添加httpd服务 ubuntu mysql 自动启动]]></description>
			<content:encoded><![CDATA[<p>在fedora13下编译安装mysql时出现no curses/termcap library found错误，即缺少ncurses-devel包。</p>
<p>解决方法 ：yum install  ncurses-devel</p>
<p>您可能感兴趣的文章<ol>
<li><a href='http://www.gagahappy.com/fedora-apache-can-not-access-subversion-repository/' rel='bookmark' title='fedora 14 apache不能访问 subversion 仓库'>fedora 14 apache不能访问 subversion 仓库</a></li>
<li><a href='http://www.gagahappy.com/delete-fedora-kernel/' rel='bookmark' title='fedora 删除旧内核'>fedora 删除旧内核</a></li>
<li><a href='http://www.gagahappy.com/fedora-14-install-nvidia-drives/' rel='bookmark' title='Fedora 14  安装 NVIDIA 显卡驱'>Fedora 14  安装 NVIDIA 显卡驱</a></li>
<li><a href='http://www.gagahappy.com/fedora-ubuntu-grub-and-grub2/' rel='bookmark' title='fedora ubuntu 建立多重启动菜单'>fedora ubuntu 建立多重启动菜单</a></li>
<li><a href='http://www.gagahappy.com/fedora-instal-ssh/' rel='bookmark' title='fedora ssh 访问'>fedora ssh 访问</a></li>
<li><a href='http://www.gagahappy.com/close-selinux/' rel='bookmark' title='如何关闭SELinux'>如何关闭SELinux</a></li>
<li><a href='http://www.gagahappy.com/fedora-install-nvidia-driver/' rel='bookmark' title='fedora 安装显卡驱动'>fedora 安装显卡驱动</a></li>
<li><a href='http://www.gagahappy.com/fedora-instal-zlib/' rel='bookmark' title='fedora 安装 zlib库'>fedora 安装 zlib库</a></li>
<li><a href='http://www.gagahappy.com/fedora-add-http/' rel='bookmark' title='fedora 添加httpd服务'>fedora 添加httpd服务</a></li>
<li><a href='http://www.gagahappy.com/ubuntu-mysql-add-to-service/' rel='bookmark' title='ubuntu mysql 自动启动'>ubuntu mysql 自动启动</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gagahappy.com/fedora13-mysql-no-cursestermcap-library-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

