首页 \ 问答 \ brew在mac os上安装mysql(brew install mysql on macOS)

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
更新时间:2023-03-29 15:03

最满意答案

在看了你的Bitbucket回购之后,我认为混淆是TA-38是由dev创建的,但是TA-38的合并目的地是master 。 所以,是的,你看到TA-38master / 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 of dev, but TA-38's merge destination is master. So yes, you are seeing all the commits between TA-38 and the master/dev branch point (5a8d807). This includes your old TA-17 branch.

If you change TA-38's merge destination to dev, the extra TA-17 commits should not appear on the TA-38 web page anymore. (They are still there, but as part of dev.)

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 into dev, and then merge dev into master.

相关问答

更多
  • 在这种特殊情况下很容易。 要了解原因,请绘制(部分)提交图。 你从这样的事情开始: ...--o--* <-- develop (HEAD), origin/develop 然后,您创建了一个新的分支名称, feature ,指向相同的develop提交* 。 您将HEAD附加到新分支,给出: ...--o--* <-- develop, feature (HEAD), origin/develop 现在你做了两个新的提交。 让我们称它们为A和B而不是使用它们真正的哈希ID,这些哈希值很大,很丑 ...
  • 建立一个新的分支来保存东西 $ 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 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)