解决centos7 中 使用mariadb 安装mysql不成功的问题
来源:互联网 发布:linux新建脚本命令 编辑:程序博客网 时间:2024/05/18 03:52
按照openstack官网的步骤安装openstack
Install and configure components¶
Install the packages:
# yum install mariadb mariadb-server python2-PyMySQL
Create and edit the
/etc/my.cnf.d/openstack.cnf
file and complete the following actions:Create a
[mysqld]
section, and set thebind-address
key to the management IP address of the controller node to enable access by other nodes via the management network. Set additional keys to enable useful options and the UTF-8 character set:[mysqld]bind-address = 10.0.0.11default-storage-engine = innodbinnodb_file_per_table = onmax_connections = 4096collation-server = utf8_general_cicharacter-set-server = utf8
Finalize installation¶
Start the database service and configure it to start when the system boots:
# systemctl enable mariadb.service# systemctl start mariadb.service
执行journalctl -xe 查看启动日志,发现
[root@lancoo1 ~]# systemctl status mariadb.service
● mariadb.service - MariaDB 10.1 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-11-07 15:41:32 CST; 10s ago
Process: 4150 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS)
Process: 4134 ExecStart=/usr/libexec/mysqld --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER (code=exited, status=1/FAILURE)
Process: 4097 ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Process: 4074 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
Main PID: 4134 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Nov 07 15:41:32 lancoo1 systemd[1]: Starting MariaDB 10.1 database server...
Nov 07 15:41:32 lancoo1 mysql-prepare-db-dir[4097]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Nov 07 15:41:32 lancoo1 mysql-prepare-db-dir[4097]: If this is not the case, make sure the /var/lib/mysql is empty before running mysql-prepare-db-dir.
Nov 07 15:41:32 lancoo1 mysqld[4134]: 2017-11-07 15:41:32 140737353783488 [Note] /usr/libexec/mysqld (mysqld 10.1.20-MariaDB) starting as process 4134 ...
Nov 07 15:41:32 lancoo1 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Nov 07 15:41:32 lancoo1 systemd[1]: Failed to start MariaDB 10.1 database server.
Nov 07 15:41:32 lancoo1 systemd[1]: Unit mariadb.service entered failed state.
Nov 07 15:41:32 lancoo1 systemd[1]: mariadb.service failed.
上述错误日志表明 mysql 数据库都还没有建立好 所以服务起不来,这根单独 的mysql服务有区别
问题: chown: changing ownership of '/var/lib/mysql': Operation not permitted
failed to start mariadb 10.1 database server
1: 发现是权限不够,首先检查防火墙是否开启,发现防火墙没有开
2:删除原先mysql相关的服务 进程 配置文件
rm -rf /etc/my.cnf
rm -rf /var/lib/mysql/*
rpm -qa |grep mysql
准备工作
chown -R mysql:mysql /var/lib/mysql
//先初始化数据库
sudo mysql_install_db --datadir=/home/mysql --user=root --defaults-file=/etc/my.cnf.d/openstack.cnf
//启动服务
systemctl start mariadb
//查看状态
systemctl status mariadb.service
给keystone文件777 权限
chmod 777 /etc/keystone/keystone.conf
- 解决centos7 中 使用mariadb 安装mysql不成功的问题
- centos7 安装mysql(mariadb)
- Centos7安装mysql(mariadb)
- 解决mysql卸载后重复安装不成功的问题
- CentOS7 mariaDB的安装
- centos7 安装mariadb(mysql)
- centos7安装mariadb替代mysql
- centos7卸载mariadb 安装mysql
- centos7安装php7 php-fpm nginx mariadb及解决php7与php-fpm冲突的问题
- centos7中mysql(mariadb)安装和启动
- centos7使用yum安装mariaDB(开源MySQL)无法启动的解决办法
- centos7使用yum安装mariaDB(开源MySQL)无法启动的解决办法
- centos7使用yum安装mariaDB(开源MySQL)无法启动的解决办法
- centos7使用yum安装mariaDB(开源MySQL)无法启动的解决办法
- centos7使用yum安装mariaDB(开源MySQL)无法启动的解决办法
- centos7 安装 mariadb(mysql的一个分支) 的正确命令
- 在CentOS7系统中使用yum安装MariaDB
- mysql(mariadb)在centos7下的快速安装以及启动
- TensorFlow实现经典深度学习网络(6):TensorFlow实现基于LSTM的语言模型
- RecyclerView万能分割线
- KindEditor示例
- 基于Spring-Boot和Redis缓存Mysql数据库数据
- page与pageContext的区别
- 解决centos7 中 使用mariadb 安装mysql不成功的问题
- 前端开发之前的准备工作
- 关于hibernate中报错:Encountered a duplicated sql alias [created_by_login] during auto-discovery of a nati
- 倒计时 js
- iOS拨打电话
- 数据结构基础——指针及动态内存分配(malloc)
- JVM源码分析之FinalReference完全解读
- 函数闭包
- [iOS]UIView+SimpleGet