How to Set cross-permission for databases in mysql

Source: Internet
Author: User

In this case, you need to modify the user permissions in MySQL and grant the required permissions.

This article demonstrates this situation and provides detailed solutions.

The configuration in this example is as follows:

Discuz!
Database Name: discuz_7_ SC _utf8
Database username: discuz_mysql
Permission: All permissions for discuz_7_ SC _utf8 operations

SupeSite/X-space
Database Name: ss_601_xs_401_ SC _utf8
Database username: ss_mysql
Permission: All permissions for ss_mysql operations

Cause: Discuz cannot be detected when SupeSite/X-space is installed! .

Solution: grant all permissions for ss_mysql to operate discuz_7_ SC _utf8.

For convenience, you can create a database user and authorize the user to operate Discuz! And all permissions of the SupeSite database, which are used during installation, will not happen in this article. You can install other products, such as UCenter Home, and then grant the user the permission to operate the UCenter Home database.

1. Install Discuz_7.0.0_ SC _UTF8

1. Create the database discuz_7_ SC _utf8 in MySQL.

Open phpMyAdmin => Create a new database

2. Create the database user discuz_mysql in MySQL and grant the permission to operate the database discuz_7_ SC _utf8.

Open phpMyAdmin => permission => Add new user

For security purposes, discuz_mysql is not authorized to access other databases. Therefore, global permissions are not selected. After the design is complete, click "execute ".

Go to the "Edit permission" Page and select "discuz_7_ SC _utf8" for "specify permissions by Database"

Grant the database user discuz_mysql all permissions to operate on the database discuz_7_ SC _utf8 ,.

3. Install and set Discuz_7.0.0_ SC _UTF8

In Discuz! During installation, enter the name, user name, and password of the database you just created.

Ii. Install SupeSite6.0.1 _ X-Space4.0.1_UC_ SC _UTF8

1. Create the database ss_601_xs_401_ SC _utf8 in MySQL

2. Create a database user ss_mysql in MySQL and grant the operation database ss_601_xs_401_ SC _utf8 permission

3. installation settings for SupeSite6.0.1 _ X-Space4.0.1_UC_ SC _UTF8

When installing SuperSite, enter the database name ss_601_xs_401_ SC _utf8, the database username ss_mysql, and the database name discuz_7_ SC _utf8 of the installed Forum Discuz ,.

Because only the database user ss_mysql was granted the permission to operate on the database ss_601_xs_401_ SC _utf8, the database user ss_mysql does not have the permission to operate on the database discuz_7_ SC _utf8. An error occurs during installation and the prompt "error occurs, the Discuz you specified! The database (discuz_7_ SC _utf8) does not exist. Please correct it ".

4. Grant the user the permission to operate the database discuz_7_ SC _utf8 using ss_mysql. The installation is successful.

In this case, you must grant the ss_mysql permission to operate on the database discuz_7_ SC _utf8. Open phpMyAdmin => permission => edit permission ,.

SupeSite needs to read, insert, and delete data in the discuz_7_ SC _utf8 database. Therefore, the user is granted all permissions for ss_mysql to operate on the discuz_7_ SC _utf8 database.

After the permission is granted, you can continue the installation by checking the installer.

Note that if you want SupeSite and Discuz! Synchronous login. The Cookie setting of SupeSite should be consistent with Discuz! The values in the config. inc. php file under the directory are the same ,.

After the installation is complete, SupeSite and X-space can normally display the content in the Forum.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.