I have MySQL installed on an Ubuntu machine. When I run use TWEETDATA
command it shows me following error
ERROR 1049 (42000): Unknown database 'tweetdata'
But the database TWEETDATA
does exist in the db. Below is the output of show databases
command.
+--------------------+
| Database |
+--------------------+
| information_schema |
| TWEETDATA |
| cs340 |
| magento |
| mysql |
| ofbiz |
| ofbizolap |
| ofbiztenant |
| performance_schema |
| sys |
+--------------------+
10 rows in set (0.00 sec)
Any ideas what might be wrong here? Could the large size of database cause this. This db was working a couple of days ago and it has over 49 million rows in one table. Could this be an issue?
Furthermore, this is the change we made to /etc/mysql/conf.d/mysql.cnf
file in this period
[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4
[mysqld]
collation-server = utf8mb4_unicode_ci
init-connect='SET NAMES utf8mb4'
character-set-server = utf8mb4
lower_case_table_names=1
Could this change have caused any trouble?
2
Answers
Check the data directory of MySQL and confirm is the directory TWEETDATA has required permission and ownership or not ?
If this directory don’t have any of the above then set it properly with
chmod and chown
command.Thanks
Comment out lower_case_table_names=1 and restart your mysqld service,
otherwise mysql will automatically translate uppercase TWEETDATA that you keyed in into lowercase tweetdata, so it’ll never find TWEETDATA