Linux MySQL Installation

Source: Internet
Author: User

Linux MySQL on-load except 1, original MySQL component find/-name MySQL Delete related files  2, check if there is MySQL RPM installation package   RPM-QA | Grep-i MySQL   if available delete   yum-y remove mysql-libs*  install  1, upload rpm file mysql-server-5.6.31-1.linux_glibc 2.5.x86_64.rpm mysql-devel-5.6.31-1.linux_glibc2.5.x86_64.rpm mysql-client-5.6.31-1.linux_glibc2.5.x86_64.rpm  2, installing RPM RPM-IVH mysql-server-5.6.31-1.linux_glibc2.5.x86_64.rpm RPM-IVH mysql-devel-5.6.31-1.linux_  glibc2.5.x86_64.rpm RPM-IVH mysql-client-5.6.31-1.linux_glibc2.5.x86_64.rpm 3, copy the MySQL configuration file to the/etc directory.  Cp/usr/share/mysql/my-default.cnf/etc/my.cnf 4, initialize MySQL and set the password. /usr/bin/mysql_install_db #初始化 mysql service mysql start #启动 mysql cat/root/.mysql_secret #查看root账号的初始密码, the following information is displayed Mys Ql-u Root-ppassword #连接数据库 Set Password=password (' root '); #设置密码  5, set boot chkconfig mysql on #添加开机启动 [[Email protected]_32_234_centos storage]# chkconfig--list | grep mysql mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off 6, modify/etc/my.cnf   [mysqld] DataDir =/data/sinodata/pushserver/mysql/data Port = 6622 7, copy file/var/lib/mysql/  to  /data/sin Odata/pushserver/mysql/data cp-r/var/lib/mysql/*/data/sinodata/pushserver/mysql/data 8, giving/data/sinodata/ Pushserver/mysql/data folder permissions  9,# service mysql restart shutting down MySQL.  success! Starting MySQL. SUCCESS! 10, the database file is in/data/sinodata/pushserver/mysql/data, the port number is 6622 chmod-r 777/data/sinodata/pushserver/ mysql/data  remote connection problem after local connection, the user is authorized mysql>grant all privileges on * * to ' userName ' @ '% ' identified by ' Userpasswor    d ' with GRANT option; Mysql>flush privileges;  

Linux MySQL installation

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.