大佬教程收集整理的这篇文章主要介绍了centos 7 mariadb,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
服务无法启动.删除 mariadb,mariadb-server. 删除 /var/lib/MysqL 和 /etc/my.cnf 重新安装
开机启动
systemctl enable mariadb
服务启动
systemctl start mariadb
(status restart stop)
初始化:
MysqL_secure_installation
之后按照提示操作
开放端口:
firewall-cmd --zone=public --add-port=3306/tcp --peRMANent
firewall-cmd --reload
链接:
MysqL -h host -u user -P port -p
创建用户:
insert into MysqL.user(Host,User,password) values("localhost","test",password("1234"));
授权:
grant SELEct,delete,update,create,drop on *.* to test@"%" identified by "1234";
grant SELEct,update on testDB.* to test@localhost identified by '1234';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' IDENTIFIED BY 'somepass' WITH GRANT OPTION;
刷新系统权限表:
flush privileges;
utf8:
vi /etc/my.cnf
[MysqLd]
character-set-server = utf8 collation-server = utf8_general_ci skip-character-set-client-handshake
其他: show databases; use xxx; show tables;
以上是大佬教程为你收集整理的centos 7 mariadb全部内容,希望文章能够帮你解决centos 7 mariadb所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。