在Windows下安装MySQL_PHP
mysql安装
本文只讨论如何在Windows NT 4.0或Windows 20000下安装MySQL。我用的MySQL为mysql-shareware-3.22.32-win.zip。
一、软件下载
您可以从下列站点下载Windows版本的MySQL数据库服务器软件:
http://www.mysql.com/download_win.html
http://chat.hn.cninfo.net/soft/
二、软件安装
您可以从http://www.mysql.com/Manual/manual.html#Win32获取详细的安装
方法。您可以用下面的方法进行安装:
1、将下载的软件用WinZIP等.zip解压缩工具解压缩到一个临时目录,如C:\TEMP,
在这里用$INSTALL_TEMP标识;
2、双击$INSTALL_TEMP目录下的SETUP.EXE进行安装,安装的时候,系统要您确定
安装的目的地,缺省为c:\mysql,在这里用$MYSQL标识;
3、将$MYSQL目录下的my-example.cnf文件拷贝为c:\my.cnf,用文本编辑器打开
c:\my.cnf,把该文件中的#basedir = d:/mysql/改为basedir = $MYSQL,$MYSQL
用您那里的安装目的地目录代替;
4、运行cmd或command,打开command窗口;
5、在command窗口中进入$MYSQL\bin目录,如:cd c:\mysql\bin;
6、运行mysqld-shareware --install,这样在Windows的服务中就多了一个名为
MySQL的服务,您可以用Windows的服务管理程序来启动或停止服务;
7、现在请用Windows的服务管理程序启动MySQL数据库服务;
8、MySQL安装完后,root账号的密码为空,这时候您可以用下面的方法来改变root
账号的密码:mysqladmin -u root -p password ,它会要求您输入root账
号的旧密码;
9、这时您就可以用下面的方法来测试是否已经安装成功了:mysql -u root -p,
它会要求您输入root账号的密码,如果MySQL已经安装成功,您就会看到下面这段话:
C:\mysql\bin>mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.22.32-shareware-debug
Type 'help' for help.
mysql>
这时您可以在mysql>提示符下按这样的方法进行测试:
mysql> show databases
-> go
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
2 rows in set (0.05 sec)
mysql> use test
Database changed
mysql> create table test(name char(50))
-> go
Query OK, 0 rows affected (0.12 sec)
mysql> insert into test(name) values('朋友,您好,欢迎使用MySQL')
-> go
Query OK, 1 row affected (0.07 sec)
mysql> select * from test
-> go
+---------------------------+
| name |
+---------------------------+
| 朋友,您好,欢迎使用MySQL |
+---------------------------+
1 row in set (0.02 sec)
mysql> exit
Bye
C:\mysql\bin>
附:
MySQL下载网址
http://www.mysql.com/download_win.html
http://chat.hn.cninfo.net/soft/
MySQL安装指南
http://www.mysql.com/Manual/manual.html#Win32
MySQL手册
http://www.mysql.com/Manual/manual_toc.html
http://www.mysql.com/Manual/manual.html

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



Installing MySQL on CentOS involves the following steps: Adding the appropriate MySQL yum source. Execute the yum install mysql-server command to install the MySQL server. Use the mysql_secure_installation command to make security settings, such as setting the root user password. Customize the MySQL configuration file as needed. Tune MySQL parameters and optimize databases for performance.

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

MySQL and Oracle selection should be based on cost, performance, complexity and functional requirements: 1. MySQL is suitable for projects with limited budgets, is simple to install, and is suitable for small to medium-sized applications. 2. Oracle is suitable for large enterprises and performs excellently in handling large-scale data and high concurrent requests, but is costly and complex in configuration.

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.

When installing and configuring GitLab on a CentOS system, the choice of database is crucial. GitLab is compatible with multiple databases, but PostgreSQL and MySQL (or MariaDB) are most commonly used. This article analyzes database selection factors and provides detailed installation and configuration steps. Database Selection Guide When choosing a database, you need to consider the following factors: PostgreSQL: GitLab's default database is powerful, has high scalability, supports complex queries and transaction processing, and is suitable for large application scenarios. MySQL/MariaDB: a popular relational database widely used in Web applications, with stable and reliable performance. MongoDB:NoSQL database, specializes in
