July 23, 2017 5:20 minutes, last week I based on their actual situation, summed up the MySQL database under the Windows System and Linux system installed version of the implementation of the database, and in the project development encountered the error, today collated out for later learning, at the same time, I have made a plan for myself, every Sunday will have their own this week to record some of the issues, in Sunday to publish in the blog above, July 23, 2017 is my first week, I will adhere to 10 years, Lu Xiaobong said, come on!
First, Linux installation
instructions
Description
- Mysql-5.7.14-linux.zip deployment Package supports the CentOS 6.x/7.x
- Server hard disk Size requirements
A)/data/mysql_data if the separate partition exists, the partition is required >10g
b) If only/data partitions exist, the partition is required >10g
c) Otherwise, the root partition/> 10G is required
- SHA256 of mysql_install_2016-08-17_08-25-29 file is ecc8dbe15c120017b4f56fcffd09239e9da84128e0378979997799b3d62e8f3a
authentication method: input Sha256sum Mysql_ Install_2016-08-17_08-25-29 computed values are consistent
- default account root initial password Gepoint Recommended project group Change Password after installation
- MySQL program directory is/opt/mysql_data
- mysql configuration file/etc/my.cnf
- ####### #innodb settings#### in the configuration file is recommended # # # #章节中的innodb_buffer_pool_size = 512M Modify the size of the server memory 50%-80%
- mysql Server Start command: Service mysqld start
- Stop command: Service mysqld stop
- Restart command: Service mysqld restart
Operation Steps
1. Upload the Mysql_install_2016-08-14_15-37-36.bin file from the Mysql-5.7.14-linux.zip deployment package to the/OPT directory
2. Execute Sh/opt/mysql_install_2016-08-14_15-37-36.bin with root account
3, please wait for automatic installation, do not do other actions, until the prompt installation is complete after the server automatically restarts, restart the MySQL service automatically start
At this point, MySQL is free to install under Linux
II, W
ind
o
ws under MySQL free installation
Instructions
1, the free installation of MySQL files extracted to the specified disk below the Open directory is the following look
2 Open the My.in.i file, modify the corresponding configuration inside the red box area to change the path to your own MySQL decompression path, where innodb_buffer_pool_size = 6G is recommended to modify the server memory size 50%-80%
3. Next you need to run cmd as Administrator, switch directories to the MySQL installation directory, go to the Bin directory, enter the following command to install
Mysqld.exe--defaults-file=d:\mysql\my.ini--user=mysql--initialize--console
After the initialization of MySQL will be given after the installation of MySQL root random password
4. Registration service, continue to enter the following command in the Change command line window
Mysqld--install
Start the MySQL service in the last service, the start page is as follows:
5. Use the following command to reset the password after logging in with the default password, where newpassword represents the new password to reset
Alter user ' root ' @ ' localhost ' identified by ' newpassword ';
At this point, the MySQL free installation is complete under Windows
Third, database error record (based on workflow platform development)
1, in the new process will report the database error, execute the following script: ALTER TABLE workflow_activity engine = InnoDB
2. Module authorization failure problem, execute the following script: ALTER TABLE Frame_moduleauth_ou engine = InnoDB
3, database MySQL error: Can ' t call commits when autocommit=true
Because hibernate is used, commit () or rollback (), both require a prerequisite, that is, MySQL auto-commit function to close.
Commit () is committed by committing the last commit or rollback of the modified content, and releasing the relevant content in the connection.
The role of rollback () is to rollback to the content of the last commit or rollback.
The above two methods can only be used in modes that have auto-commit disabled. Therefore, turning off MySQL auto-commit is possible.
In the MySQL client, execute the script:
SELECT @ @autocommit;
Check to see if auto-commit is turned on, and if 1, it turns on. If it is 0, it indicates off.
The corresponding can be closed in the form of script execution:
Set autocommit=0;
At this point, July 23, 2017 Sunday, my first week of blog completion, I hope I can continue to insist ...
MySQL database in Linux and Windows without installation implementation and framework development encountered problems