Download MySQL RPM installation package (including server, client) from MySQL website
1. Installing the server
RPM-IVH mysql-server-5.6.19-1.el6.x86_64.rpm
Force installation
RPM-IVH--force mysql-server-5.5.17-1.linux2.6.x86_64.rpm
Report the following error
[Email protected] ~]# RPM-IVH mysql-server-5.6.19-1.el6.x86_64.rpm--nodepspreparing ... ####### ########################## [100%]
File/usr/share/mysql/charsets/readme from install of mysql-server-5.6.19-1.el6.x86_64 conflicts with file from package m Ariadb-libs-1:5.5.40-1.el7_0.x86_64
The reason is that with the previous Lib library conflict, the workaround is to remove the old version Lib library (note that the corresponding version is changed according to your prompt)
Yum-y Remove mariadb-libs-1:5.5.40-1.el7_0.x86_64* yum-y Remove mysql-libs-*
Perform RPM-IVH mysql-server-5.6.19-1.el6.x86_64.rpm again to install successfully
Report the following error
[Email protected] tools]# RPM-IVH mysql-server-5.6.19-1.el6.x86_64.rpm error:failed Dependencies:/usr/bin/perl is Needed by Mysql-server-5.6.19-1.el6.x86_64libaio.so.1 () (64bit) was needed by mysql-server-5.6.19-1.el6.x86_ 64libaio.so.1 (libaio_0.1) (64bit) is needed by Mysql-server-5.6.19-1.el6.x86_64libaio.so.1 (libaio_0.4) (64bit) is Needed by mysql-server-5.6.19-1.el6.x86_64
Need to install Libaio
Report the following error, Perl installed Perl with fewer errors
error:failed dependencies: /usr/bin/perl is needed by mysql-server-5.6.19-1.el6.x86_64
Installing Perl
Yum Install Perl
2. Start MySQL
Start
Stop it
Restart
View current MySQL Status
Service MySQL Status
3. Install Client
RPM-IVH mysql-client-5.6.19-1.el6.x86_64.rpm
4. Client Login
Mysql-uroot-p
5. mysql Initialization
[[email protected] mysql]#/usr/bin/mysql_install_db[[email protected] mysql]# service MySQL start[[email protected] mysql]# cat/root/.mysql_secret# The random password set for the root user at Sat Feb 7 10:54:24 (local time): VOKVW3 Vpo_3lia3c[[email protected] mysql]# mysql-uroot-pvokvw3vpo_3lia3cmysql> SET PASSWORD = PASSWORD (' 2345678 '); mysql& Gt Exit[[email protected] mysql]# mysql-uroot-p2345678
6. Remote Login Configuration
mysql> use mysqlmysql> Select Host, user, password from user;+-----------+------+------------------------------- ------------+| Host | user | Password |+-----------+------+-------------------------------------------+| localhost | Root | *bc1c4715c23459ab982ad2d6617b4f8790161763 | | xcldtc5m | Root | *44cf61da6cdeeee2085f4598f728cf221da8f167 | | 127.0.0.1 | Root | *44cf61da6cd83e32085f4598f728cf221da8f167 | | :: 1 | Root | *44cf61da6cd86832345f4598f728cf221da8f167 |+-----------+------+-------------------------------------------+ mysql> Update user Set Password=password (' 234567 ') where user= ' root ';mysql> update user set host= '% ' where host= ' loc Alhost ';
Restart MySQL or refresh
7. Set Boot from boot
[[email protected] mysql]# chkconfig mysql on[[email protected] mysql]# chkconfig--list | grep mysqlmysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
8. View MySQL configuration file bit
[Email protected] mysql]# mysqld--verbose--help | Grep-a 1 ' Default options '
9. mysql Default installation location
/var/lib/mysql/#数据库目录/usr/share/mysql #配置文件目录/usr/bin #相关命令目录/etc/init.d/mysql #启动脚本
10. Change the MySQL default engine to InnoDB
Under [mysqld] in configuration file My.ini, add Default-storage-engine=innodb
Then reboot
centos6.5 installing MySQL using rpm