查看“Centos7 安装Mariadb”的源代码
←
Centos7 安装Mariadb
跳转至:
导航
,
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
在CentOS7上直接安装mysql时,会出现错误提示: 原因是:CentOS7带有MariaDB而不是MySQL,MariaDB和MySQL一样也是开元的数据库。 ===安装mysql(myariadb)=== yum install mysql mariadb-server # centos7 安装 systemctl start mariadb #启动MariaDB systemctl enable mariadb #设置开机启动 ===配置mysql的root密码=== <nowiki>mysql_secure_installation Enter current password for root (enter for none): ( 回车) OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n] (Y) //注意,这里输入密码是不回显的 New password: (000000) Re-enter new password: (000000) Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. (是否移出数据库的默认帐户,如果移出,那么在终端中直接输入mysql是会提示连接错误的) Remove anonymous users? [Y/n](n) Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] (是否禁止root的远程登录)n By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] n Reload privilege tables now? [Y/n] Y </nowiki> ===登录mysql数据库=== #mysql -uroot -p <nowiki>mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | +--------------------+ 3 rows in set (0.00 sec) mysql> exit; Bye</nowiki> 参考文档: [1] https://blog.csdn.net/u010675669/article/details/80674466
返回至
Centos7 安装Mariadb
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息