1

When I try to create a database as the root user in mysql via:

create database db3;

I receive the following error:

ERROR 3680 (HY000): Failed to create schema directory 'db34' (errno: 2 - No such file or directory)

I've already uninstalled and reinstalled mysql via homebrew but that doesn't seem to help at all. Any ideas?

When I type:

SHOW VARIABLES LIKE 'datadir';
+---------------+------------------------+
| Variable_name | Value                  |
+---------------+------------------------+
| datadir       | /usr/local/mysql/data/ |

Is this the issue?

d-dripz
  • 85
  • 1
  • 7
  • copy the text from your qiestin and it works. you have problably a starnge character in your text – nbk Aug 11 '20 at 23:21
  • When I type: SHOW VARIABLES LIKE 'datadir'; I get: +---------------+------------------------+ | Variable_name | Value | +---------------+------------------------+ | datadir | /usr/local/mysql/data/ | Not sure if this is an issue – d-dripz Aug 11 '20 at 23:24
  • no, this is seems more like a typo, as i said copy then text from your questions and try it – nbk Aug 11 '20 at 23:31

1 Answers1

0

A person in this discussion (https://groups.google.com/forum/#!topic/sequel-pro/TBF1rAVwbRE) solved a similar problem by changing the location of the database file in their my.cnf document to point to a folder on their machine. You could try to locate your my.cnf file and see what datadir is set to and search to see if the directory exists. If it doesn't you could potentially create a new folder for database info with the same name and path or change the code in my.cnf to point at a new folder with a different name.

To find your my.cnf file I recommend this thread: How do I find the MySQL my.cnf location