mysql installation free version of the configuration steps to share details

  • 2020-06-07 05:24:36
  • OfStack

1. Preparation

Download the latest installation-free version of mysql mysql-ES5en-5.1.53-ES6en32.ES7en and unzip to the relevant directory, such as d:\\ ES9en-ES10en-ES5.1.53-ES11en32. This is the root of mysql.

2. The configuration

There are several files in the root directory as follows:

my-small. ini (this is for a small memory (< = 64MB) system, MySQL will only be used 1 time from time to time, and importantly the mysqld daemon will not use many resources.)
my-medium. ini (this is for a small memory system (32M-64ES30en), MySQL plays a more important part, or when the system reaches 128M MySQL is used for other programs (such as an Web server) 1.
my-large.ini (this is for a large system with 1 memory = 512M, the system mainly runs MySQL)
my-huge. ini (this is for a large system with 1G memory, 2G, the system runs MySQL)
my-innodb-heavy-4G.ini (this is an example of an MySQL configuration file for a 4G memory system that mainly runs MySQL with only InnoDB tables and performs complex queries with several join Numbers)
Corresponding to their own configuration, their own choice, the rest of the deletion bar. Then rename it my.ini. Edit ES61en.ini and add the following sentences under [mysqld] node:
basedir= D:/ mysql-ES68en-5.1.53-win32 # root directory
datadir= D:/ mysql-ES74en-5.1.53-ES75en32 /data # data file storage directory

3. Installation services

cmd: Enter the root directory of mysql \bin:
mysqld --install MySQL
This adds an windows service to the name with the default MySQL. To remove mysql service:
mysqld � remove MySQL
Set the service to start automatically:
sc config MySQL start= auto

4. Start and close

cmd : 
net start MySQL -- Start the 
net stop MySQL -- Shut down  

mysql after startup. The process mysqld.exe can be seen in the task manager. Indicates that mysql has been installed. And it started successfully!

5. Streamline:

If you think the mysql catalog is too big, check it out. Only my. ini and bin,data,share can be left in the root directory, and the rest can be deleted. bin can delete all.pdb files.

6. Initialize the database:

Since the default mysql root password is empty and can only be used for local login, make the following changes:
cmd: Enter the root directory of mysql \bin:
mysql -uroot
Enter the mysql command line interface and continue typing:

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

This gives the root user the initial password "root" and allows unrestricted native login.

7. Messy Code problems:

Modify the ES144en.ini file to find [mysqld] and add the following:

character-set-server = utf8 #mysql5.5 start 
default-character-set = utf8 #mysql5.5 before 

Find [client] and add below:

default-character-set = utf8

Another 1 user provided installation steps and configuration files, we can refer to 2 methods

1. Unzip the noinstall package you downloaded to the location you want to put it. It doesn't matter to reinstall the system later. This is E:/Program Files/mysql-5.1.58-win32/

2. Create a new ES166en.ini file. This is the mysql configuration file. You can also rename it from the original ini, but now you can directly copy the following configuration:

basedir="E:/Program Files/mysql-5.1.58-win32/"
datadir="E:/MySQL Datafiles/"
innodb_data_home_dir="E:/MySQL Datafiles/"

Note: the values of datadir and innodb_data_home_dir need to be changed. I set 1 to the same folder. innodb_data_home_dir is the data address of the INNODB database storage engine.

3. Use cmd to enter the bin directory under the mysql installation directory, and then execute:
mysqld --install mysql --defaults-file="E:\Program Files\mysql-5.1.58-win32\my.ini"
That is, to sign up for the system. The default configuration file that follows is the path to the file created in step 1 above.
--install is followed by the service name
Service successfully installed. Then the service registration is successful.

4. Then:
net start mysql
Start the mysql service you just registered.
ok. If you want to delete the service.
mysqld --remove
This command deletes the service named mysql by default. If not, the corresponding service name is added after remove.

Related articles: