Mysql setting cross permissions for a database _mysql

Source: Internet
Author: User
Tags create database phpmyadmin
This requires the user's permissions to be modified in MySQL to grant the required permissions.

This article will demonstrate this situation and give detailed troubleshooting steps.

The examples in this article are configured as follows:

discuz!
Database name: Discuz_7_sc_utf8
Database user name: Discuz_mysql
Permissions: All permissions for Operation Discuz_7_sc_utf8

Supesite/x-space
Database name: Ss_601_xs_401_sc_utf8
Database user name: Ss_mysql
Permissions: All permissions for Operation Ss_mysql

Occurrence: Cannot detect discuz! when installing Supesite/x-space The database.

Workaround: Grant the full permissions of the Ss_mysql operation Discuz_7_sc_utf8.

For convenience, you can create a database user to give the user action discuz! And Supesite all the permissions of the database, this is not the case with this database user when you install it. Install another product later, such as Ucenter home, and then give the user permission to operate the Ucenter home database.

I. Installation of DISCUZ_7.0.0_SC_UTF8

1. Create Database in MySQL Discuz_7_sc_utf8

Open phpMyAdmin => Create a new database

2. Create database user Discuz_mysql in MySQL, grant operation database Discuz_7_sc_utf8 permissions

Open phpMyAdmin => Permissions => Add new users

For security, do not grant discuz_mysql this user access to other databases, so global permissions are not selected. Design finished, click "Execute".

Jump to edit Permissions page, specify permissions by database Select Discuz_7_sc_utf8

In this case, give the database user Discuz_mysql the full permissions to manipulate the database Discuz_7_sc_utf8, as shown in the figure.

3, Discuz_7.0.0_sc_utf8 installation settings

In discuz! When you install, enter the database name, user name, and password that you just created.

Second, install Supesite6.0.1_x-space4.0.1_uc_sc_utf8

1. Create Database in MySQL Ss_601_xs_401_sc_utf8

2. Create database user Ss_mysql in MySQL, grant operation database Ss_601_xs_401_sc_utf8 permissions

3, Supesite6.0.1_x-space4.0.1_uc_sc_utf8 installation settings

When you install Supersite, enter the name of the database you just created: Ss_601_xs_401_sc_utf8, database username: Ss_mysql, and the installed forum Discuz database name Discuz_7_sc_utf8, as shown in the figure.

Because just now granted the database user Ss_mysql to manipulate the database Ss_601_xs_401_sc_utf8 permissions, the database user Ss_mysql does not have permission to manipulate the database Discuz_7_sc_utf8, and an error occurred during the installation, prompting an "error , the discuz! database (DISCUZ_7_SC_UTF8) you specified does not exist, please fix.

4, give the user Ss_mysql operation database Discuz_7_sc_utf8 permissions, installation success

When this happens, you need to grant the Ss_mysql operation database Discuz_7_sc_utf8 permissions. Open phpmyadmin => Permissions => edit permissions, as shown in the figure.

Supesite needs to read, insert, and delete data from the database Discuz_7_sc_utf8, so give the user Ss_mysql all permissions to manipulate the database Discuz_7_sc_utf8.

After granting permissions, you can continue to install through the Setup program's detection.

It should be noted that if you want supesite and discuz! to log in synchronously, Supesite cookies are set to and discuz! The values in the config.inc.php file in the directory are the same, as shown in the figure.

Now that the installation is complete, supesite and x-space can display the contents of the forum properly.


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.