Windows下MySQL多实例运作
Windows下MySQL多实例运行 关键字:Windows下MySQL多实例运行 阅读前注意事项: 1、有的版本的data目录不直接放在mysql安装目录下,有可能在:C:\ProgramData\MySQL\MySQL Server 5.1\data(不管路径在哪里 指定正确的路径即可) 2、操作步骤:复制MySQL安装
Windows下MySQL多实例运行关键字:Windows下MySQL多实例运行
阅读前注意事项:
1、有的版本的data目录不直接放在mysql安装目录下,有可能在:C:\ProgramData\MySQL\MySQL Server 5.1\data(不管路径在哪里 指定正确的路径即可)
2、操作步骤:复制MySQL安装目录-->修改my.ini中的端口2处、安装目录和数据目录---->命令安装MySQL windows服务--->修改注册表---->启动新实例的window服务---->正常使用
正文篇:
1.正常安装Windows版的MySQL,例如安装在d:\MySQL文件夹里;
2.按照常规配置好MySQL;
3.复制备份安装好的文件夹,命名为“MySQL_3307"; 删除 data目录下的文件其他文件夹,只剩 test和mysql文件夹;
4.修改“d:\MySQL_3307" 下的my.ini 端口为3307
Java代码
[client]
port=3307
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3307
程序路径改为 d:/MySQL_3307
Java代码
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3307
#Path to installation directory. All paths are usually resolved relative to this.
basedir="d:/MySQL_3307"
#Path to the database root
datadir="d:/MySQL_3307/Data/"
5.在cmd命令行模式下,进入第2个MySQL_3307的\bin文件夹。
执行mysqld install MySQL_3307命令。作用是为Mysql安装一个服务,服务名是MySQL_3307,
6.完毕后,在运行里运行REGEDIT,打开WINDOWS注册表编辑器,
在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL_3307打开,
修改下面的ImagePath数值: "D:\MySQL_3307\bin\mysqld" --defaults-file="D:\MySQL_3307\my.ini" MySQL_3307
确定,退出注册表编辑器。
7.然后就可以在服务管理里正常启动MySQL_3307服务。
注:若想重命名mysql服务名称,
1.进入services.msc关闭MySQL服务
2.C:\>sc delete MySQL “MySQL”为服务名称
3.重复上面的第6、7步即可
删除服务后,进入到注册表里,看旧的mysql节点是否删除。

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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











MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.

SQL is a standard language for managing relational databases, while MySQL is a database management system that uses SQL. SQL defines ways to interact with a database, including CRUD operations, while MySQL implements the SQL standard and provides additional features such as stored procedures and triggers.

MySQL is suitable for rapid development and small and medium-sized applications, while Oracle is suitable for large enterprises and high availability needs. 1) MySQL is open source and easy to use, suitable for web applications and small and medium-sized enterprises. 2) Oracle is powerful and suitable for large enterprises and government agencies. 3) MySQL supports a variety of storage engines, and Oracle provides rich enterprise-level functions.

Handling high DPI display in C can be achieved through the following steps: 1) Understand DPI and scaling, use the operating system API to obtain DPI information and adjust the graphics output; 2) Handle cross-platform compatibility, use cross-platform graphics libraries such as SDL or Qt; 3) Perform performance optimization, improve performance through cache, hardware acceleration, and dynamic adjustment of the details level; 4) Solve common problems, such as blurred text and interface elements are too small, and solve by correctly applying DPI scaling.

MySQL and phpMyAdmin can be effectively managed through the following steps: 1. Create and delete database: Just click in phpMyAdmin to complete. 2. Manage tables: You can create tables, modify structures, and add indexes. 3. Data operation: Supports inserting, updating, deleting data and executing SQL queries. 4. Import and export data: Supports SQL, CSV, XML and other formats. 5. Optimization and monitoring: Use the OPTIMIZETABLE command to optimize tables and use query analyzers and monitoring tools to solve performance problems.

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.
