phpMyadmin创建Mysql数据库及独立数据库帐号
首先我们要登陆php教程(做为现在的主流开发语言)MyAdmin,不做演示。
2、创建一个数据库教程,如下图,在php(做为现在的主流开发语言)MyAdmin右边窗口中,填写数据库名称,点创建即可。
例如我们这里创建一个名字为:cncmstest 的数据库
创建成功会有如下提示:
3、点击左上角的主页按钮,返回php(做为现在的主流开发语言)MyAdmin主界面:
4、在主界面的右边点击“权限”来创建数据库帐号。
5、在权限页面中,我们点击“添加新用户”
6、在该页面中,我们填写要创建的数据库用户名,该用户的访问范围,及密码。
如上图,我们填写了用户名为:cncmsuser,该数据库用户只允许本机访问,主机一项选择本地;密码我们使用自动生成的,点下面的“Generate”会生成一个随机密码,然后点“Copy”会自动填写到密码框中。
下面的框都不选,直接拉到页面最下面点执行即可创建一个新用户。
数据库用户创建成功,会返回如下页面:
7、最重要的一步,设置该用户的数据库访问权限
在数据库用户添加成功返回的页面中可以直接设置权限。这里我们选择按数据库指定权限:
如上图,在数据库列表中选择我们刚刚创建的cncmstest,即会自动进入该数据库的权限设置页面。
在上图的权限设置中,我们把“数据”、“结构”两列的权限全部选中,管理权限都不要选。点执行即可。
到这里,我们已经全部设置完毕了,创建了一个数据库:cncmstest,并创建了数据库用户cncmsuser,特别指定了该用户只对cncmstest的访问权限。如此,便达到了我们一开始所讲的目的:为每一个数据库指定独立的用户访问权限。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment