共计 1625 个字符,预计需要花费 5 分钟才能阅读完成。
今天就跟大家聊聊有关 Percona MySQL 5.6 RPM 包方式的安装过程,可能很多人都不太了解,为了让大家更加了解,丸趣 TV 小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
– 解压安装包
[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 包方式的安装过程有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注丸趣 TV 行业资讯频道,感谢大家的支持。