
Cpanel建立新的MySQL数据库只需要三步操作:
1,建立数据库,
2,创建用户名和密码;
3,向数据库中添加用户及权限。(必須步驟!!)
具体Cpanel建立新的MySQL数据库步骤如下:
首先登录cpanel,找到MySQL databases 数据库区域,然后点击mysql数据库图标进入“数据库操作页面”,如下图所示:Cpanel有很多主題所以有可能你的界面與下圖有差別

1,新建数据库;
在输入框中输入打算使用的数据库的名字,比如database 然后点击后台的“添加数据库”Add Db按钮,如下图:
Type in a name for your new database and click the “Add DB” button.
数据库创建成功后,点击“返回”Back按钮,
2,建立数据库用户名和密码;
如下图所示,依次输入

用户名;
密码;
然后点击“创建”Add User 按钮.
3,为数据库添加用户并分配权限,让数据库用户有权限使用刚才建立的数据库。
如下图所示,选择 用户名和数据库名,然后 点击添加按钮,进入权限分配页面, 如下图所示,勾选“所有权限” 点击“更改”Add user to Db按钮ok

The last thing you will need is the MySQL server hostname. If this hasn’t been supplied to you by your web host, you can get it from this screen in this location:

注意如果主機上沒告訴你數據庫服務器,看上面所示區域可以自己找到. Note that the Username and Database will be prepended with your Cpanel login name. For example, if you created a database called DB and your cpanel login was mysite then your new database will be mysite_db.
这时我们就成功创建了一个新的数据库,并为这个数据库添加了有使用权限的用户。
几点附加说明:
1,在cPanel中,建立的数据库都带有cPanel帐号的前缀,比如:假设你Cpanel用户名为cpanel12,你输入的数据库名是cpdb,那么数据库的名cpanel12_cpdb
2,数据库用户名和上面一样有前綴。
3,建好后的数据库信息示例:
数据库名cpanel12_cpdb(自己填写的数据库名前,记得有前缀,)
数据库用户名cpanel12_cpanel1 (自己填写的用户名前,记得有前缀)
数据库密码 **** (自己填写的密码)
服务器 localhost
4,为数据库用户添加“权限”时,一般都是勾选“所有权限”。当然你也可以为某些用户单独分配权限。
If you would like to make a comment, please fill out the form below.