brew在mac os上安装mysql(brew install mysql on macOS)
我试图在mac os 10.6上使用Homebrew
brew install mysql 5.1.52
通过brew install mysql 5.1.52
。一切顺利,我也成功与
mysql_install_db
。
但是当我尝试使用以下方式连接到服务器时:/usr/local/Cellar/mysql/5.1.52/bin/mysqladmin -u root password 'mypass'
我得到:
/usr/local/Cellar/mysql/5.1.52/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)'我也尝试
mysqladmin or mysql using -u root -proot
访问mysqladmin or mysql using -u root -proot
,
但是它没有使用或不使用密码。这是一个全新的安装在一个全新的机器,据我所知,新的安装必须可访问没有root密码。 我也试过:
/usr/local/Cellar/mysql/5.1.52/bin/mysql_secure_installation
但我也得到了
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)I'm trying to setup up MySQL on mac os 10.6 using Homebrew by
brew install mysql 5.1.52
.Everything goes well and I am also successful with the
mysql_install_db
.
However when I try to connect to the server using:/usr/local/Cellar/mysql/5.1.52/bin/mysqladmin -u root password 'mypass'
I get:
/usr/local/Cellar/mysql/5.1.52/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)'I've tried to access
mysqladmin or mysql using -u root -proot
as well,
but it doesn't work with or without password.This is a brand new installation on a brand new machine and as far as I know the new installation must be accessible without a root password. I also tried:
/usr/local/Cellar/mysql/5.1.52/bin/mysql_secure_installation
but I also get
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
原文:https://stackoverflow.com/questions/4359131
最满意答案
在看了你的Bitbucket回购之后,我认为混淆是
TA-38
是由dev
创建的,但是TA-38
的合并目的地是master
。 所以,是的,你看到TA-38
和master
/dev
分支点之间的所有提交( 5a8d807 )。 这包括您的旧TA-17
分支。如果您将
TA-38
的合并目的地更改为dev
,则TA-38
提交的额外内容不应再出现在TA-38
网页上。 (它们仍在那里,但作为开发的一部分。)编辑:根据此票证 ,永久更改Web界面中的合并目标是未实现的功能。 您可以暂时更改它,但是在您离开页面后,它将始终默认返回到Bitbucket中定义的分支作为“主分支”。
解决您的问题的方法是将“主分支”设置为
dev
。 这可以在存储库设置中更改。 如果您使用“git-flow”样式工作流,将特征分支合并到dev
,然后将dev
合并到master
,那么这可能会更好。After looking at your Bitbucket repo, I think the confusion is that
TA-38
was created off ofdev
, butTA-38
's merge destination ismaster
. So yes, you are seeing all the commits betweenTA-38
and themaster
/dev
branch point (5a8d807). This includes your oldTA-17
branch.If you change
TA-38
's merge destination todev
, the extraTA-17
commits should not appear on theTA-38
web page anymore. (They are still there, but as part ofdev
.)Edit: According to this ticket, permanently changing the merge destination in the web interface is an unimplemented feature. You can change it temporarily, but right now after you leave the page it will always default back to the branch defined in Bitbucket as the "main branch".
A workaround for your problem is to set the "main branch" to
dev
instead. This can be changed in your repository settings. That may be better anyway if you use a "git-flow" style workflow where you merge your feature branches intodev
, and then mergedev
intomaster
.
相关问答
更多-
将提交移动到不同的分支(Move commit to different branch)[2022-12-02]
在这种特殊情况下很容易。 要了解原因,请绘制(部分)提交图。 你从这样的事情开始: ...--o--* <-- develop (HEAD), origin/develop 然后,您创建了一个新的分支名称, feature ,指向相同的develop提交* 。 您将HEAD附加到新分支,给出: ...--o--* <-- develop, feature (HEAD), origin/develop 现在你做了两个新的提交。 让我们称它们为A和B而不是使用它们真正的哈希ID,这些哈希值很大,很丑 ... -
清理git master分支并将一些提交移动到新分支?(Cleanup git master branch and move some commit to new branch?)[2023-09-03]
建立一个新的分支来保存东西 $ git branch old_master 发送到远程进行备份(只需启动) $ git checkout old_master $ git push origin old_master 在开始修改东西之前,将本地主人重置为提交 $ git checkout master $ git reset --hard 037hadh527bn 合并来自上游主机的更改 $ git pull upstream master 现在删除远程回购的主人 在github上,如果没有首先进入 ... -
要从你的第一个图(master = HEAD = F)到选项1: git branch new # Make a 'new' branch pointing at HEAD, which is F git reset --hard C # Move master back to point at C git checkout new # Make HEAD follow new, and get F in the working tree 而从选项1到选项2(拾起上面所述的位 ...
-
在看了你的Bitbucket回购之后,我认为混淆是TA-38是由dev创建的,但是TA-38的合并目的地是master 。 所以,是的,你看到TA-38和master / dev分支点之间的所有提交( 5a8d807 )。 这包括您的旧TA-17分支。 如果您将TA-38的合并目的地更改为dev ,则TA-38提交的额外内容不应再出现在TA-38网页上。 (它们仍在那里,但作为开发的一部分。) 编辑:根据此票证 ,永久更改Web界面中的合并目标是未实现的功能。 您可以暂时更改它,但是在您离开页面后,它将始终 ...
-
搬到一个新的分支 除非有其他情况,否则可以通过分支和回滚轻松完成。 # Note: Any changes not committed will be lost. git branch newbranch # Create a new branch, saving the desired commits git reset --hard HEAD~3 # Move master back by 3 commits (GONE from master) git checkout newbranc ...
-
你有两个选择,一个合并或一个rebase 。 合并 将branch1合并到master中是理解最简单的操作,并且我会推荐这个选项。 但是,它将显示为主服务器上的一个新提交, 具有不同的提交ID 。 我们将从branch1中提交新的提交,并尝试将它们合并到主机中作为一个新的变更集,然后我们可以提交。 这将保存branch1和master的历史记录。 从命令行执行以下步骤: 1)首先结账你想合并的分行 git checkout master 2)现在使用--no-ff选项在你的分支中合并 git merge ...
-
没有reset --hard不会删除你的提交,因为它们仍然会被' new_branch '分支引用。 (意思是,通过' new_branch '的结帐,你会恢复并再次看到这些提交) 但它会删除工作树中未更改的任何未更改的内容,因此请确保在键入该命令之前没有任何正在进行的工作。 您可以在“ 什么将git checkout master + git reset -hard do? ”中看到更详细的命令序列说明。 要完成Stuart Golodetz的评论,如果git重置已删除或删除任何提交,您仍然可以通过git ...
-
local:git branch newbranch local:git reset --hard HEAD〜1#只做了一次提交 现在,强制(-f)推送到remote/master因为git历史记录已更改。 $ git push -f origin master 结账到newbranch并推动newbranch 。 $ git checkout newbranch $ git push origin newbranch 常见的情况是master分支应该继续工作或者没有中断。 因此,当需要处理新功能时,请 ...
-
如果我理解你的描述正确,你的回购目前看起来像这样, ... -- o [develop] \ 1 -- 2 -- 3 -- 4 [feature1] 而你希望它看起来像那样 3'-- 4'[feature2] / ... -- o [develop] \ 1 -- 2 [feature1] 正确? 如果是这样,请执行以下操作。 首先,确保您处于干净的工作状态。 然后,创建并签出一个名为feature2 ...
-
从Z大师,复制到分支: git branch BRANCH 当你还在掌握时,重置回A: git reset [--hard] A BRANCH现在是主人,主人现在在A. From master at Z, copy to BRANCH: git branch BRANCH As you’re still on master, reset back to A: git reset [--hard] A BRANCH is now where master was, and master is now ...