mac下mysql的默认是哪里?另外mysql的端口是如何工作的?
mysql的工作原理我概念很模糊,有以下几个问题
为什么我之前在用php,xampp的时候装了一遍mysql,现在用node,npm又装了一遍mysql,最后连接数据库时,连接到的是同一个数据库。我猜这是因为mysql端口的原因,我只知道它默认的是3306。我想请问一下我电脑里到底是有几个mysql的安装目录?路径在哪里呢?
我用navicat,phpmyadmin同样都访问到了同一个mysql路径,我想知道者的工作原理是怎样的?
mac的在文件管理上和linux有什么不同,比如我在提问的时候能不能直接参考linux的系统的解决方案
如上是我的一些问题,希望有能人可以给出解答,我希望最好能告诉我,这些问题的根本是在哪里,最好能告诉我应该看哪些文档才能弄清楚这些问题。
回复内容:
mysql的工作原理我概念很模糊,有以下几个问题
为什么我之前在用php,xampp的时候装了一遍mysql,现在用node,npm又装了一遍mysql,最后连接数据库时,连接到的是同一个数据库。我猜这是因为mysql端口的原因,我只知道它默认的是3306。我想请问一下我电脑里到底是有几个mysql的安装目录?路径在哪里呢?
我用navicat,phpmyadmin同样都访问到了同一个mysql路径,我想知道者的工作原理是怎样的?
mac的在文件管理上和linux有什么不同,比如我在提问的时候能不能直接参考linux的系统的解决方案
如上是我的一些问题,希望有能人可以给出解答,我希望最好能告诉我,这些问题的根本是在哪里,最好能告诉我应该看哪些文档才能弄清楚这些问题。
你的这个问题的根本是没弄清楚MySQL是C/S结构的应用,你访问的任意如navicat, phpmyadmin之类的管理客户端,以及包括你的php和node代码,都只是在使用某个mysql的客户端而已(一般而言,是基于libmysql实现的,当然php的最近版本都是通过其自己的mysqlnd实现的)
真正的MySQL是默认监听3306端口的服务器端程序,既然你是xampp装上去的,那么它应该会位于/Application/XAMPP下面
Mac OS X的内核修改自BSD,和Linux大同小异,但是OS X对于目录做了较多定制导致和BSD也有所差异,所以Linux的方案对于你来说可以参考但不能完全照搬,你理清楚OS X的目录规划就大致上没问题了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

Detailed explanation and installation guide for PiNetwork nodes This article will introduce the PiNetwork ecosystem in detail - Pi nodes, a key role in the PiNetwork ecosystem, and provide complete steps for installation and configuration. After the launch of the PiNetwork blockchain test network, Pi nodes have become an important part of many pioneers actively participating in the testing, preparing for the upcoming main network release. If you don’t know PiNetwork yet, please refer to what is Picoin? What is the price for listing? Pi usage, mining and security analysis. What is PiNetwork? The PiNetwork project started in 2019 and owns its exclusive cryptocurrency Pi Coin. The project aims to create a one that everyone can participate

One of the major changes introduced in MySQL 8.4 (the latest LTS release as of 2024) is that the "MySQL Native Password" plugin is no longer enabled by default. Further, MySQL 9.0 removes this plugin completely. This change affects PHP and other app

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total
