今天就跟大家聊聊有关Percona MySQL 5.6 RPM包方式的安装过程,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
--解压安装包
[root@localhost percona-xtrabackup-2.4.4-Linux-x86_64]# tar xvf Percona-Server-5.6.31-77.0-r5c1061c-el6-x86_64-bundle.tar
--安装数据库
[root@localhost percona-xtrabackup-2.4.4-Linux-x86_64]# yum localinstall Percona-Server-server-56-5.6.31-rel77.0.el6.x86_64.rpm Percona-Server-client-56-5.6.31-rel77.0.el6.x86_64.rpm Percona-Server-shared-56-5.6.31-rel77.0.el6.x86_64.rpm
--编辑配置文件
[root@localhost mysql]# vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
innodb_buffer_pool_size = 128M
--启动数据库
[root@localhost mysql]# mysqld_safe --defaults-file=/etc/my.cnf &
[1] 3246
--修改ROOT密码
[root@localhost mysql]# mysqladmin -u root password 'root'
Warning: Using a password on the command line interface can be insecure.
--删除数据库中多余的root用户和匿名用户,只在本地保留一个root用户
[root@localhost mysql]# mysql -u root -p'root'
mysql> select host,user from mysql.user;
+-----------------------+------+
| host | user |
+-----------------------+------+
| 127.0.0.1 | root |
| ::1 | root |
| localhost | |
| localhost | root |
| localhost.localdomain | |
| localhost.localdomain | root |
+-----------------------+------+
6 rows in set (0.00 sec)
mysql> delete from mysql.user where (user,host) not in (select 'root','localhost');
Query OK, 5 rows affected (0.06 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select host,user from mysql.user;
+-----------+------+
| host | user |
+-----------+------+
| localhost | root |
+-----------+------+
1 row in set (0.00 sec)
--查看数据库的运行状态
[root@localhost mysql]# /etc/init.d/mysql status
SUCCESS! MySQL (Percona Server) running (6584)
看完上述内容,你们对Percona MySQL 5.6 RPM包方式的安装过程有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。