Home Operation and Maintenance phpstudy phpstudy switches mysql version

phpstudy switches mysql version

Aug 29, 2019 am 10:23 AM
phpstudy

phpstudy switches mysql version

phpstudy switch mysql version

1. Download the new version of mysql

For example, mysql5.7: https://dev.mysql.com/downloads/file/?id=467269

2. Back up phpStudy\PHPTutorial\MySQL

3. Unzip the downloaded new version mysql, place it in phpStudy\PHPTutorial\, and rename it to MySQL

4. Copy a copy of my-default.ini and rename it to my.ini

5. Modify the my.ini configuration

basedir = D:/phpStudy/PHPTutorial/MySQL
datadir = D:/phpStudy/PHPTutorial/MySQL/data
skip-grant-tables
Copy after login

Note: Change it according to your actual path situation. If you have configuration changes, you can add them yourself if you don’t have them. Just add them under [mysqld]

6. In Enter the MySQL bin directory under cmd (mine is D:/phpStudy/PHPTutorial/MySQL/bin) and execute the initialization command

mysqld --initialize
Copy after login

Note 1: If TIMESTAMP with implicit DEFAULT value is reported. Please use -- explicit_defaults_for_timestamp server option (see documentation for more details). If there is an error, modify the my.ini configuration and add

explicit_defaults_for_timestamp = true
Copy after login

under [mysqld]. Note 2: If 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql is reported modes should be used with strict mode. They will be merged with strict mode in a future release. error, modify my.ini and add it under [mysqld] (direct modification of existing configuration)

sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER
Copy after login

七, Install and start the service

mysqld -install
net start MySQL
Copy after login

8. Modify the mysql login password

mysql -uroot -p
Copy after login

PS: No need to enter the password, just press Enter

update mysql.user set authentication_string=password('root') where user='root' and Host ='localhost';
Copy after login

Note: 'root' is just an example , change it to the password you want

Refresh permissions

FLUSH PRIVILEGES;
Copy after login

9. Modify my.ini and comment out skip-grant-tables

# skip-grant-tables
Copy after login

Restartmysql

net stop MySQL
net start MySQL
Copy after login

For more phpstudy related technical articles, please visit the phpstudy usage tutorial column to learn!

The above is the detailed content of phpstudy switches mysql version. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1653
14
PHP Tutorial
1251
29
C# Tutorial
1224
24
What to do if phpstudy is garbled What to do if phpstudy is garbled Nov 14, 2022 am 09:53 AM

The reason why phpstudy is garbled is because the encoding and decoding methods are inconsistent. The solution: 1. Open the "Control Panel"; 2. Open "Clock, Language and Region"; 3. Click "Region"; 4. Click " Manage" icon; 5. Click "Change System Regional Settings", select "Specific Language", and then click "OK"; 6. Restart the computer.

How to install phpstudy pro How to install phpstudy pro Apr 02, 2024 pm 03:15 PM

PHPstudy Pro is a web development environment software package that enables rapid deployment and testing of web applications. The installation steps are as follows: Download the installation package from the official website. Run the installer and select the installation path and language. After the installation is complete, launch PHPstudy and configure PHP, MySQL, Apache settings. To verify the installation, enter "localhost" in your browser or run the command "php -v" to check the PHP version.

Why can't phpstudy be installed? Why can't phpstudy be installed? Apr 02, 2024 pm 03:42 PM

PHP Study installation failure may be due to the following reasons: 1. System compatibility issues; 2. Insufficient permissions; 3. File conflicts; 4. Abnormal network connection; 5. Anti-virus software interference; 6. Path problems; 7. System errors. If you encounter a problem that cannot be solved, you can seek support through the PHP Study forum, GitHub or the official website.

How to change the port in phpstudy How to change the port in phpstudy Apr 02, 2024 pm 04:24 PM

In order to change the PHPSTUDY port, follow these steps: Open the Control Panel and navigate to the built-in Web server settings; modify the number in the port number field; save the changes and restart the server; enter the website URL and new port number to verify the changes.

How to read the database in phpstudy How to read the database in phpstudy Apr 02, 2024 pm 04:06 PM

Methods to view the database through PHPstudy include: Direct connection to MySQL Command line Use MySQL Workbench to configure the connection Select the database to view Select the database to view in the left menu through PHPMyAdmin

Teach you to create a virtual host and run php projects (phpstudy + wamp) Teach you to create a virtual host and run php projects (phpstudy + wamp) Aug 07, 2022 pm 03:17 PM

This article involves two PHP integrated environments, both of which contain mysql + apache + php. The function of phpstudy is more powerful than wamp, and it is very simple and easy to use.

Where is the phpstudy configuration file? Where is the phpstudy configuration file? Apr 02, 2024 pm 04:00 PM

The phpStudy configuration file is located in the conf folder of the installation directory. Mainly includes web server, database, PHP and other settings. To access the configuration files, open the following files: ps.conf (main configuration file), config.ini (Web server settings), nginx.conf (Nginx settings), php.ini (PHP settings), and mysql.conf (MySQL settings) ). Modify configuration files with caution and make backup copies before editing.

What should I do if phpstudy cannot be installed? What should I do if phpstudy cannot be installed? Apr 02, 2024 pm 04:03 PM

Solution for unable to install phpStudy: Check whether the system requirements are met. Disable anti-virus software. Turn off the firewall. Run the installer as administrator. Repair corrupted files: sfc /scannow. Try using an alternative installer. Contact phpStudy technical support.

See all articles