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 is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

VS Code supports Chinese settings, which can be completed by following the steps: Open the settings panel and search for "locale". Set "locale.language" to "zh-CN" (Simplified Chinese) or "zh-TW" (Traditional Chinese). Save settings and restart VS Code. The settings menu, toolbar, code prompts, and documents will be displayed in Chinese. Other language settings can also be customized, such as file tag format, entry description, and diagnostic process language.
