Mysql installation-free version configuration tutorial, mysql installation-free version

Source: Internet
Author: User

Mysql installation-free version configuration tutorial, mysql installation-free version

This article provides an example to share with you the installation-free mysql configuration tutorial for your reference. The specific content is as follows:

1. Download the MySQL installation-free compressed package and decompress it to a custom directory, for example, D: \ program0 \ mysql (this directory is used as an example below)

2. Modify the my. ini file (possibly a my-default.ini, manually changed to my. ini );
Items to be configured:

basedir =D:\program0\mysqldatadir =D:\program0\mysql\data

# If you want to customize this directory, you must move all the files under this directory to the new custom directory.

Port = 3306
Server_id = 10

3. Configure the default encoding of the new data path:
In the my. ini file,
Under [mysqld]
Add character_set_server = gbk

4. Add Environment Variables

Create variable MYSQL_HOME
Input variable name: MYSQL_HOME
Input variable value: D: \ program0 \ mysql
2) Add Path

Click Edit
Add the variable value to the variable value:
'% MYSQL_HOME % \ bin'
Note that this variable is added after the original variable value and separated by;. The original variable value cannot be deleted,

5. register the mysql service:
1) log on to the bin directory under the MySQL extract directory from the console (D: \ program0 \ mysql \ bin ):
2) enter the service installation command:

Mysqld install mysql

# If 'Install/Remove of the Service Denied 'appears, select "open as administrator" when you open the cmd.exe program. This is also true when you start the Service.
# After the installation is successful, a message is displayed, indicating that the service is successfully installed.
# The command for removing a service is 'mysqld delete'

6. Start the mysql service: Run cmd to enter the console.

Net start mysql

7. Close the mysql service: Run cmd to go to the console.

Net stop mysql

8. Configure the root user password:

cmd: mysql -uroot  mysql< use mysql;  mysql< delete from user;  mysql< grant all on *.* to root@'%' identified by "root" with grant option;  mysql< flush privileges;  mysql< quit;

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.