MySQL table does not have permission to access

Source: Internet
Author: User

Workaround when the webpage has the above problem:

Today, transfer the website between the two servers, and finally set the domain name interpretation to wait ... Then cmd to view the DNS interpretation situation: Explanation Success-Enter the URL-but the above message appears, first use #ls-l to see the database file in the var folder under MySQL:

[Email protected] var]# ls-l
Total 5004
drwx------2 mysql mysql 4096 Apr 12:20 MySQL
-RW-RW----1 mysql mysql 19099 Apr 12:20 mysql-bin.000001
-RW-RW----1 mysql mysql 714954 Apr 12:20 mysql-bin.000002
-RW-RW----1 MySQL mysql 263 Apr 12:20 mysql-bin.000003
-RW-RW----1 MySQL mysql 12:20 mysql-bin.000004
-RW-RW----1 mysql mysql 4298115 Apr 07:27 mysql-bin.000005
-RW-RW----1 mysql mysql 8620 Apr 10:12 mysql-bin.000006
-RW-RW----1 MySQL mysql 689 Apr 10:26 mysql-bin.000007
-RW-RW----1 MySQL mysql 133 Apr 10:12 Mysql-bin.index
drwx------2 root root 12288 Apr 07:51 jackxiang_mysql_db
drwx------2 mysql mysql 4096 Apr 12:20 testdb
drwx------2 mysql mysql 4096 Apr 07:50 uu1db02
drwx------2 mysql mysql 4096 Apr 14:01 uu1db03

found that root is not in the bottom fourth line.

The original is used in the SCP (the following command) between the two machines are copied with the root operation. So it becomes the root user owned.

# scp-rp/backup/home/www.uucto.com [Email protected]:/home/uu/tmp

The host (owner) of the database directory where the problem is found is not MySQL

Workaround:

[Email protected] var]# chown-r mysql:mysql jackxiang_mysql_db
[Email protected] var]# ls-l
Total 5004
drwx------2 mysql mysql 4096 Apr 12:20 MySQL
-RW-RW----1 mysql mysql 19099 Apr 12:20 mysql-bin.000001
-RW-RW----1 mysql mysql 714954 Apr 12:20 mysql-bin.000002
-RW-RW----1 MySQL mysql 263 Apr 12:20 mysql-bin.000003
-RW-RW----1 MySQL mysql 12:20 mysql-bin.000004
-RW-RW----1 mysql mysql 4298115 Apr 07:27 mysql-bin.000005
-RW-RW----1 mysql mysql 8620 Apr 10:12 mysql-bin.000006
-RW-RW----1 MySQL mysql 689 Apr 10:26 mysql-bin.000007
-RW-RW----1 MySQL mysql 133 Apr 10:12 Mysql-bin.index
drwx------2 mysql mysql 12288 Apr 07:51 jackxiang_mysql_db
drwx------2 mysql mysql 4096 Apr 12:20 testdb

where jackxiang_mysql_db storage directory for MySQL database

MySQL table does not have permission to access

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.