CentOS installs and configures mariadb with Yum

Source: Internet
Author: User

1Create the/etc/yum.repos.d/mariadb.repo file, which is now available in the 10 release of the official version.0[Mariadb]name=Mariadbbaseurl= http://yum.mariadb.org/10.0/centos6-amd64/Gpgkey=https://yum.mariadb.org/rpm-gpg-key-mariadbgpgcheck=12after you have prepared the repo file, you can use Yum to install the # Yum installation MariaDB-server mariadb-Client3. I like to customize the data directory and the service port, so remove the default data directory # RM-RF/var/lib/MySQL4. Create a new Data Catalog # mkdir/var/data/db/mariadb5. Modify the configuration file/etc/my.cnf.d/mysql-CLIENTS.CNF, the focus is [client], others can refer to [Client]port=3307Socket= /var/data/db/mariadb/Mysql.sock[mysql]no-auto-Rehash[mysqldump]quickmax_allowed_packet=64m[myisamchk]key_buffer_size=128msort_buffer_size=128mread_buffer=2mwrite_buffer=2m[mysqlhotcopy]interactive-Timeout6. Modify the configuration file/etc/my.cnf.d/server.cnf, where the performance parameters are from my-large.ini file [Mysqld]port=3307DataDir= /var/data/db/Mariadbsocket= /var/data/db/mariadb/Mysql.sockskip-external-lockingkey_buffer_size=256mmax_allowed_packet=64mtable_open_cache= thesort_buffer_size=1mread_buffer_size=1mread_rnd_buffer_size=4mmyisam_sort_buffer_size=64mthread_cache_size=8query_cache_size=16mthread_concurrency=8Log-bin=mysql-Binbinlog_format=Mixedserver-id =17. Initializing Data # mysql_install_db--DEFAULTS-FILE=/ETC/MY.CNF--datadir=/var/data/db/mariadb/--user=MySQL8. Start the Services # service MySQL start9. Set Root password # mysqladmin-U root Password"8888888"Ten. Login mysql# MySQL-uroot-P One. Authorized root Telnet #root can be logged in from any IP, note the password change:'888888'MySQL>grant all privileges on * * to'Root'@'%'Identified by'888888'with GRANT OPTION; #root可从指定IP登陆, note the password change:'888888'Ip:'192.168.1.188'MySQL>grant all privileges on * * to'Root'@'192.168.1.188'Identified by'888888'With GRANT Option;mysql>flush rivileges

CentOS installs and configures mariadb with Yum

Related Article

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.