Home Database Mysql Tutorial 教你给数据库设置交叉权限

教你给数据库设置交叉权限

Jun 07, 2016 pm 04:16 PM
database Permissions set up

由于 SupeSite 需要调用 Discuz! 和 UCHome 的数据,所以如果它们不安装在同一个数据库,SupeSite 的数据库用户必须要对 Discuz! 和 UCHome 的数据库有读

由于 SupeSite 需要调用 Discuz! 和 UCHome 的数据,所以如果它们不安装在同一个数据库,SupeSite 的数据库用户必须要对 Discuz! 和 UCHome 的数据库有读取、修改、删除等权限。这就需要在 MySQL 中对用户权限进行修改,授予需要的权限。

本文将演示这种情况,并给出详细的解决步骤。

本文示例的配置如下:

Discuz!
数据库名:discuz_7_sc_utf8
数据库用户名:discuz_mysql
权限:操作 discuz_7_sc_utf8 的全部权限

SupeSite/X-space
数据库名:ss_601_xs_401_sc_utf8
数据库用户名:ss_mysql
权限:操作 ss_mysql 的全部权限

出现情况:安装 SupeSite/X-space 时无法检测到 Discuz! 的数据库。

解决方法:授予 ss_mysql 操作 discuz_7_sc_utf8 的全部权限。

如果为了方便,可以创建一个数据库用户,授予该用户操作 Discuz! 和 SupeSite 数据库的全部权限,在安装时,都使用这个数据库用户,就不会出现本文的这种情况。以后安装别的产品,比如 UCenter Home,再授予该用户操作 UCenter Home 数据库的权限即可。

一、安装 Discuz_7.0.0_SC_UTF8

1、在 MySQL 中创建数据库 discuz_7_sc_utf8

打开 phpMyAdmin => 创建一个新的数据库

教你给数据库设置交叉权限 三联

2、在 MySQL 中创建数据库用户 discuz_mysql,授予操作数据库 discuz_7_sc_utf8 的权限

打开 phpMyAdmin => 权限 => 添加新用户

教你给数据库设置交叉权限

为了安全,不授予 discuz_mysql 这个用户访问其他数据库的权利,所以全局权限不选。设计完毕,点击“执行”。

教你给数据库设置交叉权限

跳转到“编辑权限”的页面,“按数据库指定权限”选择“discuz_7_sc_utf8”

教你给数据库设置交叉权限

在这里,授予数据库用户 discuz_mysql 操作数据库 discuz_7_sc_utf8 的全部权限,如图所示。

教你给数据库设置交叉权限

3、Discuz_7.0.0_SC_UTF8 的安装设置

在 Discuz! 安装时,输入刚才创建的数据库名、用户名和密码。

教你给数据库设置交叉权限

二、安装 SupeSite6.0.1_X-Space4.0.1_UC_SC_UTF8

1、在 MySQL 中创建数据库 ss_601_xs_401_sc_utf8

教你给数据库设置交叉权限

2、在 MySQL 中创建数据库用户 ss_mysql,授予操作数据库 ss_601_xs_401_sc_utf8 的权限

教你给数据库设置交叉权限

教你给数据库设置交叉权限

3、SupeSite6.0.1_X-Space4.0.1_UC_SC_UTF8 的安装设置

安装 SuperSite 时,输入刚才创建的数据库名:ss_601_xs_401_sc_utf8,数据库用户名:ss_mysql,以及已安装的论坛 Discuz 的数据库名 discuz_7_sc_utf8,如图所示。

教你给数据库设置交叉权限

因为刚才只是授予数据库用户 ss_mysql 操作数据库 ss_601_xs_401_sc_utf8 的权限,所以数据库用户 ss_mysql 并没有操作数据库 discuz_7_sc_utf8 的权限,这安装时出现错误,,提示“发生错误,您指定的 Discuz!数据库(discuz_7_sc_utf8)不存在,请修正”。

教你给数据库设置交叉权限

4、授予用户 ss_mysql 操作数据库 discuz_7_sc_utf8 的权限,安装成功

出现这种情况,就需要授予 ss_mysql 操作数据库 discuz_7_sc_utf8 的权限。打开 phpMyAdmin => 权限 => 编辑权限,如图所示。

教你给数据库设置交叉权限

教你给数据库设置交叉权限

SupeSite 需要 读取、插入、删除数据库 discuz_7_sc_utf8 中的数据,所以授予用户 ss_mysql 操作数据库 discuz_7_sc_utf8 的全部权限。

教你给数据库设置交叉权限

授予权限之后,通过安装程序的检测,可以继续安装了。

教你给数据库设置交叉权限

需要注意的是,如果希望 SupeSite 和 Discuz!同步登录,SupeSite 的 Cookie 设置要和 Discuz! 目录下 config.inc.php 文件中的值相同,如图所示。

教你给数据库设置交叉权限

教你给数据库设置交叉权限

现在安装完毕,SupeSite 和 X-space 能够正常显示论坛中的内容。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Enable root permissions with one click (quickly obtain root permissions) Enable root permissions with one click (quickly obtain root permissions) Jun 02, 2024 pm 05:32 PM

It allows users to perform more in-depth operations and customization of the system. Root permission is an administrator permission in the Android system. Obtaining root privileges usually requires a series of tedious steps, which may not be very friendly to ordinary users, however. By enabling root permissions with one click, this article will introduce a simple and effective method to help users easily obtain system permissions. Understand the importance and risks of root permissions and have greater freedom. Root permissions allow users to fully control the mobile phone system. Strengthen security controls, customize themes, and users can delete pre-installed applications. For example, accidentally deleting system files causing system crashes, excessive use of root privileges, and inadvertent installation of malware are also risky, however. Before using root privileges

Do Not Disturb Mode Not Working in iPhone: Fix Do Not Disturb Mode Not Working in iPhone: Fix Apr 24, 2024 pm 04:50 PM

Even answering calls in Do Not Disturb mode can be a very annoying experience. As the name suggests, Do Not Disturb mode turns off all incoming call notifications and alerts from emails, messages, etc. You can follow these solution sets to fix it. Fix 1 – Enable Focus Mode Enable focus mode on your phone. Step 1 – Swipe down from the top to access Control Center. Step 2 – Next, enable “Focus Mode” on your phone. Focus Mode enables Do Not Disturb mode on your phone. It won't cause any incoming call alerts to appear on your phone. Fix 2 – Change Focus Mode Settings If there are some issues in the focus mode settings, you should fix them. Step 1 – Open your iPhone settings window. Step 2 – Next, turn on the Focus mode settings

How to set the countdown to grab tickets in Damai How to set the countdown to grab tickets in Damai Apr 01, 2024 pm 07:01 PM

When buying tickets on Damai.com, in order to ensure that the ticket purchase time can be accurately grasped, users can set a floating clock to grab tickets. The detailed setting method is below, let us learn together. How to bind the floating clock to Damai 1. Click to open the floating clock app on your phone to enter the interface, and click on the location where the flash sale check is set, as shown in the figure below: 2. After coming to the page of adding new records, click on Damai.com Copy the ticket purchase link page copied in. 3. Next, set the flash sale time and notification time below, turn on the switch button behind [Save to Calendar], and click [Save] below. 4. Click to turn on [Countdown], as shown in the figure below: 5. When the reminder time comes, click the [Start Picture-in-Picture] button below. 6. When the ticket purchase time comes

How to set Douyin playback to automatically close? Why does the playback process automatically exit? How to set Douyin playback to automatically close? Why does the playback process automatically exit? Apr 01, 2024 pm 12:06 PM

Douyin is one of the most popular short video platforms today. While enjoying the fun of short videos, users also hope to have better control over their time. Recently, some users reported that Douyin would automatically close during playback, which troubled them very much. 1. How to set the Douyin playback to automatically turn off? 1. Check the Douyin version. Please make sure that the Douyin version you are using is the latest. Douyin will be updated regularly to fix known issues. If your version of TikTok is too old, it may automatically close. You can check and update TikTok in the App Store. 2. Check the mobile phone system version. The automatic shutdown of Douyin playback may also be related to the mobile phone system version. Please make sure your mobile phone system version is the latest. If the mobile phone system version is too old, it may cause Douyin to run unstable. you can

How does Hibernate implement polymorphic mapping? How does Hibernate implement polymorphic mapping? Apr 17, 2024 pm 12:09 PM

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

An in-depth analysis of how HTML reads the database An in-depth analysis of how HTML reads the database Apr 09, 2024 pm 12:36 PM

HTML cannot read the database directly, but it can be achieved through JavaScript and AJAX. The steps include establishing a database connection, sending a query, processing the response, and updating the page. This article provides a practical example of using JavaScript, AJAX and PHP to read data from a MySQL database, showing how to dynamically display query results in an HTML page. This example uses XMLHttpRequest to establish a database connection, send a query and process the response, thereby filling data into page elements and realizing the function of HTML reading the database.

How to set up group chat bubbles on Weibo_How to set up group chat bubbles on Weibo How to set up group chat bubbles on Weibo_How to set up group chat bubbles on Weibo Mar 30, 2024 pm 01:31 PM

1. Open the Weibo group chat and select Settings (as shown in the picture). 2. Select [Chat Bubble] (as shown in the picture). 3. After reaching the corresponding level, you can receive the bubbles and set them up (as shown in the picture).

See all articles