1. 程式人生 > >無法讀表:ERROR 1018 (HY000): Can't read dir of './jiradb/' (errno: 13)

無法讀表:ERROR 1018 (HY000): Can't read dir of './jiradb/' (errno: 13)

ERROR 1018 (HY000): Can't read dir of './jiradb/' (errno: 13)


現象:資料庫無法正常讀表.
[[email protected] ~]# mysql -ujirakpi -p
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13366
Server version: 5.5.9-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases
    -> ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| bamboo             |
| confluence         |
| crowd              |
| crucible           |
| crucibledb         |
| jiradb             |
| mysql              |
| nagiosql           |
| performance_schema |
+--------------------+
10 rows in set (0.00 sec)

mysql> use jiradb
Database changed
mysql> show tables;
ERROR 1018 (HY000): Can't read dir of './jiradb/' (errno: 13)
mysql>
mysql> show variables like '%data%';
+----------------------------+----------------------------+
| Variable_name              | Value                      |
+----------------------------+----------------------------+
| character_set_database     | utf8                       |
| collation_database         | utf8_bin                   |
| datadir                    | /dataDisk/MysqlData/mysql/ |
| innodb_data_file_path      | ibdata1:10M:autoextend     |
| innodb_data_home_dir       |                            |
| innodb_stats_on_metadata   | ON                         |
| max_length_for_sort_data   | 1024                       |
| myisam_data_pointer_size   | 6                          |
| skip_show_database         | OFF                        |
| updatable_views_with_limit | YES                        |
+----------------------------+----------------------------+
10 rows in set (0.00 sec)

mysql>
mysql> use crowd;
Database changed
mysql> show tables;
ERROR 1018 (HY000): Can't read dir of './crowd/' (errno: 13)
mysql>
分析:
人為修改了data目錄許可權導致:
[
[email protected]
mysql]# ls -ld /dataDisk/MysqlData/mysql/jiradb
drwx------ 2 jira mysql 4096 08-28 08:07 /dataDisk/MysqlData/mysql/jiradb
Data目錄許可權被修改為非mysql賬號屬主,導致Mysql無許可權讀取檔案,自然獲取不到表資訊。

解決方案:
修改data目錄屬主為mysql。
[[email protected] mysql]# chown -R mysql:mysql /dataDisk/MysqlData/mysql/jiradb
[[email protected]
mysql]#
修改後可正常訪問表:
mysql> use jiradb
Database changed
mysql> show tables;
+------------------------------+
| Tables_in_jiradb             |
+------------------------------+
| OS_CURRENTSTEP               |
| OS_CURRENTSTEP_PREV          |
| OS_HISTORYSTEP               |
| OS_HISTORYSTEP_PREV          |
| OS_WFENTRY                   |
| SEQUENCE_VALUE_ITEM          |
| avatar                       |
| changegroup                  |
| changeitem                   |
| columnlayout                 |
| columnlayoutitem             |
| component                    |
| configurationcontext         |
| customfield                  |
| customfieldoption            |
| customfieldvalue             |
| cwd_application              |
| cwd_application_address      |
| cwd_directory                |
| cwd_directory_attribute      |
| cwd_directory_operation      |
| cwd_group                    |
| cwd_group_attributes         |
| cwd_membership               |
| cwd_user                     |
| cwd_user_0815                |
| cwd_user_0816                |
| cwd_user_attributes          |
| external_entities            |
| externalgadget               |
| favouriteassociations        |
| fieldconfigscheme            |
| fieldconfigschemeissuetype   |
| fieldconfiguration           |
| fieldlayout                  |
| fieldlayoutitem              |
| fieldlayoutscheme            |
| fieldlayoutschemeassociation |
| fieldlayoutschemeentity      |
| fieldscreen                  |
| fieldscreenlayoutitem        |
| fieldscreenscheme            |
| fieldscreenschemeitem        |
| fieldscreentab               |
| fileattachment               |
| filtersubscription           |
| gadgetuserpreference         |
| genericconfiguration         |
| groupbase                    |
| issuelink                    |
| issuelinktype                |
| issuesecurityscheme          |
| issuestatus                  |
| issuetype                    |
| issuetypescreenscheme        |
| issuetypescreenschemeentity  |
| jiraaction                   |
| jiradraftworkflows           |
| jiraeventtype                |
| jiraissue                    |
| jiraperms                    |
| jiraworkflows                |
| label                        |
| listenerconfig               |
| mailserver                   |
| membershipbase               |
| nodeassociation              |
| notification                 |
| notificationinstance         |
| notificationscheme           |
| oauthconsumer                |
| oauthconsumertoken           |
| oauthspconsumer              |
| oauthsptoken                 |
| optionconfiguration          |
| permissionscheme             |
| pluginversion                |
| portalpage                   |
| portletconfiguration         |
| priority                     |
| project                      |
| projectcategory              |
| projectrole                  |
| projectroleactor             |
| projectversion               |
| propertydata                 |
| propertydate                 |
| propertydecimal              |
| propertyentry                |
| propertynumber               |
| propertystring               |
| propertytext                 |
| qrtz_calendars               |
| qrtz_cron_triggers           |
| qrtz_fired_triggers          |
| qrtz_job_details             |
| qrtz_job_listeners           |
| qrtz_simple_triggers         |
| qrtz_trigger_listeners       |
| qrtz_triggers                |
| remembermetoken              |
| resolution                   |
| schemeissuesecurities        |
| schemeissuesecuritylevels    |
| schemepermissions            |
| searchrequest                |
| serviceconfig                |
| sharepermissions             |
| tb_jira_project              |
| trackback_ping               |
| trustedapp                   |
| upgradehistory               |
| upgradeversionhistory        |
| userassociation              |
| userbase                     |
| userhistoryitem              |
| versioncontrol               |
| votehistory                  |
| workflowscheme               |
| workflowschemeentity         |
| worklog                      |
+------------------------------+
121 rows in set (0.01 sec)

mysql>
mysql> use crowd
Database changed
mysql> show tables;
+----------------------------+
| Tables_in_crowd            |
+----------------------------+
| cwd_app_dir_group_mapping  |
| cwd_app_dir_mapping        |
| cwd_app_dir_operation      |
| cwd_application            |
| cwd_application_address    |
| cwd_application_alias      |
| cwd_application_attribute  |
| cwd_directory              |
| cwd_directory_attribute    |
| cwd_directory_operation    |
| cwd_group                  |
| cwd_group_attribute        |
| cwd_membership             |
| cwd_property               |
| cwd_token                  |
| cwd_user                   |
| cwd_user_attribute         |
| cwd_user_credential_record |
| hibernate_unique_key       |
+----------------------------+
19 rows in set (0.22 sec)

mysql> update set host = "%" where user = "root";Ctrl-C -- exit!
Aborted
[
[email protected]
~]#

相關推薦

無法ERROR 1018 (HY000): Can't read dir of './jiradb/' (errno: 13)

ERROR 1018 (HY000): Can't read dir of './jiradb/' (errno: 13) 現象:資料庫無法正常讀表. [[email protected] ~]# mysql -ujirakpi -p Welcome to the

linux 系統中系統關機後,mysql啟動失敗報錯ERROR 2002 (HY000): Can't connect to local MySQL server through socket '

自己在阿里雲伺服器上安裝好執行環境後,mysql都是正常使用的,昨天強制關閉伺服器後,重新啟動伺服器,發現數據庫無法啟動報錯:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/va

MySQL 報錯ERROR 2002 (HY000): Can't connect to local MySQL server through socket

一、錯誤現場還原: 下面我們通過三種方式來連線,然後觀察提示的錯誤資訊: 1、直接使用“mysql”命令,不帶主機名引數; 2、使用帶了主機名“localhost”引數的“mysql -h localhost”命令; 3、使用帶了主機名“127.0.

mysql 常見問題ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost' (10061)

有時候莫名其妙的就出現那種錯誤了T_T,我還要練習SQL呢,而且我已經因為它重新裝過一次mysql了,討厭的10061. 在電腦--管理--服務裡檢視居然沒有mysql 服務(我想應該是360“幫我”

MySQL 報錯ERROR 1137 (HY000): Can't reopen table: 'tempId'

MySQL 報錯:ERROR 1137 (HY000): Can't reopen table: 'tempId' 1. sql 如下 select replace(group_concat(distinct tsk.task_name),',' , '\n') as res2

MySQL 服務無法啟動 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

1.問題情況:下載了mysql5.7綠色免安裝版,但是一直出現下面的錯誤: mysql 服務無法啟動 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061) 如下兩圖所示: 2.

ERROR 1 (HY000): Cant create/write to file ‘/data

mariadb 數據導出 使用非DBA用戶進行load data 操作,發現報錯。MariaDB [temp_archive]> select * from t1 into outfile '/data/test.sql';ERROR 1 (HY000): Can't c

ERROR 2002 (HY000): Cant connect to local MySQL server through socket ‘/var mysql 啟動不了

nag could ice etc ket nbsp call cti connect ps -A | grep -i mysql kill 列出來的進程 service mysql start 我的問題就解決了 -----------------------------

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysqld.sock'

先檢視 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已經啟動. 另外看看是不是許可權問題. ———————————————————————————— [[email protected] beinan]#chown -R mysql:mysql /var

Mysql8.0登入失敗ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

cmd輸入 >mysql -u root -p 控制檯報10061 ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost'

【解決】本地計算機上的MySQL57服務啟動後停止。某些服務在未由其他服務或程式使用時將自動停止。ERROR 2003 (HY000): Can't connect to MySQL server o

本地計算機上的MySQL57服務啟動後停止。某些服務在未由其他服務或程式使用時將自動停止。 今早連線資料庫,發現失敗,報錯:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

1:下載 [[email protected] /]# tar -xzvf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz -C /usr/local/ 1 3修改檔案 [[email protecte

ERROR 2002 HY000 Can't connect to local MySQL server thro

                author:skatetime :2009/10/23 今天同時問我一個關於mysql的問題,記錄一下錯誤提示:[email protected] ~]# mysql --socket=/tmp/mysql.sockERROR 2002 (HY000): Can't

解決mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket錯誤的方法

ps -A | grep -i mysql kill 列出來的程序 service mysql start 我的問題就解決了 Fedora8啟動mysql 報錯: ERROR 2002 (HY000): Can’t connect to local MySQL

MySql 報錯ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

MySql 報錯ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) 這個錯是連結時報的錯,要連結必須啟動。修復的時候首先要啟動m

mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

解決方法:原因:mysql目錄沒有許可權 方法:執行 sudo chown -R mysql:mysql /usr/local/var/mysql 給了許可權之後重啟 sudo mysql.ser

codis擴容報錯[error] READONLY You can't write against a read only slave

現象:最近在做codis線上擴容時,新增多組group,每個group新增一個redis作為master,當進行auto balance或手動遷移slot時,發現要遷移的slot的狀態處於error狀態,並且一直阻塞後面要遷移的slot,最終導致proxy掛掉,無法對外提供

Linux上mysql登陸錯誤解決辦法ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' 解決方法:1:首先確認你在root許可權下 [[email p

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (

某一次我可能沒有正常關閉Mysql就直接讓機器關機了,造成了MySQL下次都打不來了。 先檢視程序 ps -A | grep -i mysql 如果Mysql程序開啟了 就把這個程序kill -9 ,然後再啟動試試。 但我的mysql程序就是沒有啟動起來

ClouderManger搭建大資料叢集時ERROR 2003 (HY000): Can't connect to MySQL server on 'ubuntucmbigdata1' (111)的問題解決(圖文詳解)

[email protected]:/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib$ pwd /opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib [email pro