运行brew services start mongodb-community会产生:
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/<myUserName>/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist` exited with 5.
Run Code Online (Sandbox Code Playgroud)
当我跑步时launchctl load -w /Users/<myUserName>/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
产量
Load failed: 5: Input/output error
我最近将 macOS 升级到 BigSur 11.5.2。
我已经卸载并重新安装了自制程序和 xcode。
我喜欢单击我的 chrome 扩展程序,它会获取当前选项卡 url 并将其插入到 MySQL 数据库中。似乎我必须使用 xhr,但是我对它的工作原理一无所知。我也有点明白Chrome 扩展?网络应用程序 API ? MySQL。
到目前为止,我有一个可用的 chrome 扩展程序,它获取当前选项卡的 url 并显示它和一个连接到我的数据库的 php 文件。但是,我可以使用一些帮助将 url 变量连接到 Web API,然后再连接到我的 php 文件。
最后,我是一个新手,所以如果这被质疑得很差,我深表歉意。
编辑
这是我的代码和更多详细信息...
当前网址.js
//grab the current url
chrome.tabs.getSelected(null, function(tab) {
var tabId = tab.id;
tabUrl = tab.url;
document.write(tabUrl);
});
Run Code Online (Sandbox Code Playgroud)
弹出窗口.html
<!doctype html>
<html>
<head>
<script src="currentUrl.js"></script>
<script language="javascript" type="text/javascript">
</head>
</html>
Run Code Online (Sandbox Code Playgroud)
插入数据库
<?php
$con=mysqli_connect("localhost","root","my_pw","my_db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_query($con,"INSERT INTO …Run Code Online (Sandbox Code Playgroud)