用win7怎么安装homebreww安装的phpmyadmin怎么使用

使用Homebrew安装特定版本的软件 - 推酷
使用Homebrew安装特定版本的软件
/questions/3987683/homebrew-install-specific-version-of-formula
Let’s start with the simplest case:
1) Check, whether the version is already installed (but not activated)
When homebrew installs a new formula, it puts it in a versioned directory like
/usr/local/Cellar/postgresql/9.3.1
. Only symbolic links to this folder are then installed globally. In principle, this makes it pretty easy to switch between two installed versions. (*)
If you have been using homebrew for longer and never removed older versions (using, for example
brew cleanup
), chances are that some older version of your program may still be around. If you want to simply activate that previous version,
brew switch
is the easiest way to do this.
Check with
brew info postgresql
brew switch postgresql &TAB&
) whether the older version is installed:
$ brew info postgresql
postgresql: stable 9.3.2 (bottled)
http://www.postgresql.org/
Conflicts with: postgres-xc
/usr/local/Cellar/postgresql/9.1.5 (2755 files, 37M)
Built from source
/usr/local/Cellar/postgresql/9.3.2 (2924 files, 39M) *
Poured from bottle
From: /Homebrew/homebrew/commits/master/Library/Formula/postgresql.rb
# … and some more
We see that some older version is already installed. We may activate it using
brew switch
$ brew switch postgresql 9.1.5
Cleaning /usr/local/Cellar/postgresql/9.1.5
Cleaning /usr/local/Cellar/postgresql/9.3.2
384 links created for /usr/local/Cellar/postgresql/9.1.5
Let’s double-check what is activated:
$ brew which postgresql
postgresql: 9.1.5
Please note that
brew switch
only works as long as all dependencies of the older version are still around. In some cases, a rebuild of the older version may become necessary. Therefore, using
brew switch
is mostly useful when one wants to switch between two versions not too far apart.
2) Check, whether the version is available as a tap
Especially for larger software projects, it is very probably that there is a high enough demand for several (potentially API incompatible) major versions of a certain piece of software. As of March 2012, Homebrew 0.9 provides a mechanism for this:
& the homebrew versions repository.
That versions repository may include backports of older versions for several formulae. (Mostly only the large and famous ones, but of course they’ll also have several formulae for postgresql.)
brew search postgresql
will show you where to look:
$ brew search postgresql
postgresql
homebrew/versions/postgresql8
homebrew/versions/postgresql91
homebrew/versions/postgresql9
homebrew/versions/postgresql92
We can simply install it by typing
$ brew install homebrew/versions/postgresql8
Cloning into '/usr/local/Library/Taps/homebrew-versions'...
remote: Counting objects: 1563, done.
remote: Compressing objects: 100% (943/943), done.
remote: Total 1563 (delta 864), reused 1272 (delta 620)
Receiving objects: 100% (), 422.83 KiB | 339.00 KiB/s, done.
Resolving deltas: 100% (864/864), done.
Checking connectivity... done.
Tapped 125 formula
==& Downloading http://ftp.postgresql.org/pub/source/v8.4.19/postgresql-8.4.19.tar.bz2
Note that this has automatically tapped the homebrew/versions tap. (Check with brew tap, remove with brew untap homebrew/versions.) The following would have been equivalent:
$ brew tap homebrew/versions
$ brew install postgresql8
As long as the backported version formulae stay up-to-date, this approach is probably the best way to deal with older software.
3) Try some formula from the past
The following approaches are listed mostly for completeness. Both try to resurrect some undead formula from the brew repository. Due to changed dependencies, API changes in the formula spec or simply a change in the download URL, things may or may not work.
Since the whole formula directory is a git repository, one can install specific versions using plain git commands. However, we need to find a way to get to a commit where the old version was available.
a) historic times
Between August 2011 and October 2014, homebrew had a
brew versions
command, which spat out all available versions with their respective SHA hashes. As of October 2014, you have to do a
brew tap homebrew/boneyard
before you can use it. As the name of the tap suggests, you should probably only do this as a last resort.
$ brew versions postgresql
Warning: brew-versions is unsupported and may be removed soon.
Please use the homebrew-versions tap instead:
/Homebrew/homebrew-versions
git checkout 3c86d2b Library/Formula/postgresql.rb
git checkout a267a3e Library/Formula/postgresql.rb
git checkout ae59e09 Library/Formula/postgresql.rb
git checkout e3ac215 Library/Formula/postgresql.rb
git checkout c80b37c Library/Formula/postgresql.rb
git checkout 9076baa Library/Formula/postgresql.rb
git checkout 5825f62 Library/Formula/postgresql.rb
git checkout 2f6cbc6 Library/Formula/postgresql.rb
git checkout 6b8d25f Library/Formula/postgresql.rb
git checkout c40c7bf Library/Formula/postgresql.rb
git checkout 05c7954 Library/Formula/postgresql.rb
git checkout dfcc838 Library/Formula/postgresql.rb
git checkout 4ef8fb0 Library/Formula/postgresql.rb
git checkout 2accac4 Library/Formula/postgresql.rb
git checkout b782d9d Library/Formula/postgresql.rb
As you can see, it advises against using it. Homebrew spits out all versions it can find with its internal heuristic and shows you a way to retrieve the old formulae. Let’s try it.
# First, go to the homebrew base directory
$ cd $( brew --prefix )
# Checkout some old formula
$ git checkout 6b8d25f Library/Formula/postgresql.rb
$ brew install postgresql
# … installing
Now that the older postgresql version is installed, we can re-install the latest formula in order to keep our repository clean:
$ git checkout -- Library/Formula/postgresql.rb
brew switch
is your friend to change between the old and the new.
b) prehistoric times
For special needs, we may also try our own digging through the homebrew repo.
$ git log -S'8.4.4' -- Library/Formula/postgresql.rb
git log -S
looks for all commits in which the string '8.4.4' was either added or removed in the file
Library/Formula/postgresql.rb
. We get two commits as a result.
commit 7dc7ccef9e1ab7d2fc351de0b031552
Author: Aku Kotkavuo
Sun Sep 19 18:03:41
Update PostgreSQL to 9.0.0.
Signed-off-by: Adam Vandenberg
commit fa992c6a82eebdc4cc36a0c0df3f422
Author: David H&ppner
Sun May 16 12:35:18
postgresql: update version to 8.4.4
Obviously,
fa992c6a82eebdc4cc36a0c0df3f422
is the commit we’re interested in. As this commit is pretty old, we’ll try to downgrade the complete homebrew installation (that way, the formula API is more or less guaranteed to be valid):
$ git checkout -b postgresql-8.4.4 fa992c6a82eebdc4cc36a0c0df3f422
$ brew install postgresql
$ git checkout master
$ git branch -d postgresql-8.4.4
You may skip the last command to keep the reference in your git repository.
One note: When checking out the older commit, you temporarily downgrade your homebrew installation. So, you should be careful as some commands in homebrew might be different to the most recent version.
4) Manually write a formula
It’s not too hard and you may then upload it to Homebrew-Versions.
A.) Bonus: Pinning
If you want to keep a certain version of, say postgresql, around and stop it from being updated when you do the brew upgrade procedure, you can pin a formula:
$ brew pin postgresql
Pinned formulae are listed in /usr/local/Library/PinnedKegs/ and once you want to bring in the latest changes and updates, you have to call
$ brew unpin postgresql
已发表评论数()
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见
正文不准确
标题不准确
排版有问题
主题不准确
没有分页内容
图片无法显示
视频无法显示
与原文不一致本文主要记录phpMyAdmin在Mac OS X上的配置和使用,避免朋友们走弯路,浪费不必要的时间。
1. 下载:&
2. 在"设置"中打开" web share", 即可开启Mac自带的Apache, 也可以通过sudo apachectl restart, 重启Apache。
3. 源码放入 Apache的配置文件&f中DocumentRoot项指定的目录中,并打开php5的module
& &#LoadModule php5_module libexec/apache2/libphp5.so
& 改为:&LoadModule php5_module libexec/apache2/libphp5.so
4. 修改DocumentRoot下地phpmyadmin源码的访问权限。 chmod -R 755 phpMyAdmin-4.4.1/
5. 配置Apache的httpd.conf& 如下:
&Directory "/Library/WebServer/Documents/phpMyAdmin-4.4.1"&
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
&/Directory&
6.在phpMyAdmin-4.4.1目录下,复制config.example.inc.php 保存为:config.inc.php ,并修改其部分内容:
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
* Servers configuration
* First server
/* Authentication type */
$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'xxxx'; //mysql password here
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
如果你忘记了mysql 密码,可以通过如下方法修改:
& & 1. sudo&/usr/local/mysql/bin/mysqld_safe --skip-grant-tables -u root &
& & 2.&"sudo /Library/StartupItems/MySQLCOM/MySQLCOM start& &可跳过,原因未知
& & 3. &Then you should be able to log into MySQL as root: &&"/usr/local/mysql/bin/mysql -u root"
& & 4. 修改密码:&"UPDATE mysql.user SET Password = PASSWORD( 'new-password' ) WHERE User = 'root';"
& && &&&&&"FLUSH PRIVILEGES;"
& && &&&&&""
& & &5. &尝试用新密码登陆:&"/usr/local/mysql/bin/mysql -u root -p"
7. 即将大功告成!此时,如果你通过sudo apachectl restart, 重启Apache,并通过网络地址访问,可能还是会提示你出错: mysql said: cannot connect: invalid settings.&
这可能是应为phpmyadmin 默认使用/var/mysql/mysql.sock来连接mysqld.
8. 为phpmyadmin 的默认sock目录创建一个连接到真实sock的链接。
& & &8.1 &sudo mkdir /var/mysql/
& & &8.2 &sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
9.最后fuck , 一个为程序员准备的产品,竟然不提示详细的stack, 如不进行上一步,连错误提示都他妈草草了事,浪费劳资多少时间。
Mac下使用brew install phpmyadmin 安装方案
localhost:~ xxx$ brew install phpmyadmin==&&Installing phpmyadmin from josegonzalez/homebrew-php==&&Downloading&
######################################################################## 100.0%==&&Caveats
Note that this formula will NOT install mysql. It is not
required since you might want to get connected to a remote
database server.
Webserver configuration example (add this at the end of
your /etc/apache2/httpd.conf for instance) :
& Alias /phpmyadmin /usr/local/share/phpmyadmin
& &Directory /usr/local/share/phpmyadmin/&
&&& Options Indexes FollowSymLinks MultiViews
&&& AllowOverride All
&&& &IfModule mod_authz_core.c&
&&&&& Require all granted
&&& &/IfModule&
&&& &IfModule !mod_authz_core.c&
&&&&& Order allow,deny
&&&&& Allow from all
&&& &/IfModule&
& &/Directory&
Then, open&
More documentation : file:///usr/local/Cellar/phpmyadmin/4.4.4/share/phpmyadmin/doc/
Configuration has been copied to /usr/local/etc/phpmyadmin.config.inc.php
Don't forget to:
& - change your secret blowfish
& - uncomment the configuration lines (pma, pmapass ...)
1. 修改/etc/apache2/httpd.conf , 并记得启用php5.mod
2. 修改上述的phpmyadmin.config.inc.php中的配置
3. 为phpmyadmin 的默认sock目录创建一个连接到真实sock的链接。
& & &3.1 &sudo mkdir /var/mysql/
& & &3.2 &sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
4. sudo apachectl restart
------------------------- Install phpmyadmin on Ubuntu------------------------------
1. install phpmod & for apache2
2. install&phpmysql for phpmyadmin to connect and manage mysql
3. download &source code of phpmyadmin from&http://www.phpmyadmin.net/home_page/downloads.php.
4. untar the downloaded phpadmin ,
& & &4.1. move it to /var/www/html/
& & &4.2 chmod -R 755 ./phpmyadmin/
5. setting connection options for phpmyadmin .
在phpMyAdmin-4.4.1目录下,复制config.example.inc.php 保存为:config.inc.php ,并修改其部分内容:
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
* Servers configuration
* First server
/* Authentication type */
$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'xxxx'; //mysql password here
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] =
6. check apache2.conf which located in /etc/apache2/&
& & whether /var/www is granted to access
7. &apache2ctl restart
1.&/questions//error-1045-cannot-log-in-to-mysql-server-phpmyadmin
2.&/installing-phpmyadmin-on-mac-osx-10-7-lion/
阅读(...) 评论()查看: 18449|回复: 37
phpmyadmin的安装与使用
本教程献给还不会自行安装与使用phpmyadmin的小鸟们
欢迎大家指出错误
PhpMyAdmin简介
  PhpMyAdmin是一个用PHP编写的,可以通过互联网控制和操作MySQL。通过phpMyAdmin可以完全对数据库进行操作,例如建立、复制/删除数据等等。
第一步:下载phpmyadmin
  到天空软件站下载phpmyadmin,地址:,搜索phpmyadmin即可出现最新更新的phpmyadmin版本,建议使用多国语言版,这样才出现简体中文字符。
第二步:本地配置phpmyadmin
  把下载回来的phpmyadmin解压出来,并将解压出来的此文件夹改名为phpmyadmin,然后定位到此文件夹的/phpmyadmin/libraries下的config.default.php,把它复制到/phpmyadmin并重命名为config.inc.php
  用记事本打开config.inc.php,编辑--查找...
  查找$cfg['PmaAbsoluteUri'] = '';
  将其改成
  $cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin';
  [也就是您的网站服务的IP或域名加上你的phpmyadmin的文件夹名]
  查找$cfg['Servers'][$i]['auth_type'] = 'config';
  把config改成 http,即
  $cfg['Servers'][$i]['auth_type'] = 'http';
  [改成http后,就可以像登录路由器那样,出现一个登录对话框]
  保存退出。
第三步:上传phpmyadmin
  本地配置完毕后,就二进制上传到你的服务器或虚拟服务器上的web文件夹httproot,有些服务器的根文件夹叫htdocs。
  用浏览器输入地址,例如:,就会跳出一个输入用户名和密码的对话框,如下图所示:
  然后我们就把服务器提供商提供给我们具有读写权限的帐号和密码填入进去,即可进入你的phpmyadmin页面了。如果出现的界面不是中文,安装了多国语言版的版本,可以在右边如图的这个位置选择简体中文
  到此为止,整个phpmyadmin的安装结束。
  聪明的你是否发觉上面有什麽不对了呢?如果每个人都照我这样做那麽..是不是每个人的phpMyAdmin的位置都在http://网址/phpMyAdmin这里?这种情况是可以改变的..只要将phpMyAmin资料夹更名即可。若我想要更名为pma(各取一个字,方便记忆),路径:/usr/local/apache/htdocs/pma,如此别人就无法去解的phpMyAdmin的位置...只剩下你自己知道了...
怎么使用phpmyadmin创建新的用户名?
1、进入你的phpmyadmin页面后,点权限,如图:
2、添加新用户,如图:
3、建立新用户的权限与相关信息
用户登录信息设置
数据库信息设置
数据库用户
无(一般普通用户选择此项即可)
创建同名数据库,并给予所有特权
给予特权通配符名称(用户名\ _ % )
如果不知道这些选项是何意义的时候,把鼠标放在上面,即可出现中文意思
如何执行SQL语句与导入SQL文件
(原帖地址:)
1、在红圈的下拉菜单里面选择你的数据库,如果没有这个说明您只有观看自己数据库的权限,就不用选择了。
2、选择好您论坛数据库所在之后,点击上方的SQL连接(红圈内),点击后会进入另一个页面
3、导入数据库,你可以直接在那个页面上方的文本框里面数据,SQL语句进行导入,如果是SQL文件,可用类似文件上传的方法,点击下面的浏览按钮,找到您要导入的SQL文件,选择好后执行,就可以了
<p id="rate_385" onmouseover="showTip(this)" tip="精品文章&金币 + 4 枚
" class="mtn mbn">
<p id="rate_449" onmouseover="showTip(this)" tip="我很赞同&金币 + 3 枚
" class="mtn mbn">
今天又看了一次,真不错
图文并茂,该给更多人看到。
我按照以上方式做了,但出现以下提示,请教,
我按照以上方式做了,但出现以下提示,请教,
错误提示如何:
欢迎使用 phpMyAdmin 2.11.4
Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.
MySQL 返回:
#1045 - Access denied for user: 'root@localhost' (Using password: NO)
打开WEB没反应
好了,就是帐号密码不对
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
出现这个是什么意思?谢谢
有用的东西……
我的web里没有httproot这个文件夹哦,是不是要新建一个?还是就把它传到web里?
哈哈..我都是解压后就直接把phpmyadmin上传到网站根目录..
没有不能用的情况.
Powered by}

我要回帖

更多关于 win7怎么安装homebrew 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信