Summary on installing mysql with rpm in CentOS

Source: Internet
Author: User

Summary on installing mysql with rpm in CentOS
Install MySQL 5.7 at RPM
----------------------- Version 1 centos7 -----------------------
1. Uninstall mariadb. lib
2. sequence: common, lib, client, server (/var/log/mysqld. log password)
3. chown-R mysql: mysql/data/mydata;
Mysqld [-- user = mysql] -- datadir =/data/mydata -- initialize
(Mysqld -- verbose -- help contains various variables and options)
4. vi/etc/my. cnf
5. systemctl start mysqld. service
6. mysql_secure_installation -- user = root -- password = 'dfsfsdf'


----------------------- Version 2 centos6 -------------------------
1. Uninstall other versions of mysql. Use rpm-e MySQL-*** -- nodeps if necessary.
2. sequence: common, lib, client, server (/root/. mysql_secret or/var/log/mysqld. log)
3. chown-R mysql: mysql/data/mysqldata
Mysqld -- user = mysql -- datadir =/data/mysqldata -- initialize
4. vi/etc/my. cnf
5. chkconfig -- add mysqld chkconfig mysqld -- level 35 on
6. mysql_secure_installation -- user = root -- password =


-------------- Password security authentication plug-in -------------
1. show plugins;
2. Add validate_password = off TO mysqld Of my. cnf.
3. Restart mysqld


------------------- Password ---------------------
Set password for 'root' @ localhost = PASSWORD ('chenxing ');


----------------- The problem that the mysql System Log time is later than the system 8 hours ---------------
Set log_timestamps to SYSTEM.

------------------- Other operations ---------------------
1. Authorization: grant select, UPDATE, INSERT, DELETE on *. * to yongfu_a @ 'localhost ';
Cancel authorization: revoke select, UPDATE, INSERT, DELETE on *. * from yongfu_a @ 'localhost ';
2. delete a user: drop user 'root' @ 'localhost ';
3. Add a user: create user 'root' @ "localhost' identified by 'cxx ';
4. set password: set PASSWORD for 'root' @ 'localhost' = password ("cxx ");

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.