1

So I have just installed linux and started messing around with apache,php,mysql and I have this error when creating database. I was unable to find an answer so i hope you guys can help me.

    max@MaxLNX:~$ mysql -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 67
    Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

    Copyright (c) 2000, 2015, 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> create database firstdb;
    ERROR 1006 (HY000): Can't create database 'firstdb' (errno: 13)
The Noob
  • 65
  • 1
  • 1
  • 5
  • Could be you don't have the privilege for create db file see this eventually http://stackoverflow.com/questions/18719748/error-1006-hy000-cant-create-database-errno-13-mysql-5-6-12 – ScaisEdge Mar 18 '16 at 20:16

3 Answers3

0

Error means that your mysql server doesn't have enough space. Check the file system size, and remove unwanted software(s),or files.

max10
  • 41
  • 1
  • 4
0

There may be a permissions issue with the MySQL data directory. You could try setting the permissions as follows (adjust the path to your data directory)

chown -R mysql:mysql /usr/local/mysql/data

reply if it worked

padippist
  • 1,178
  • 1
  • 16
  • 30
0

Try using "sudo". On a Linux system, "sudo" means "superuser" and should help you gain access to make a database. Try this in your terminal:

sudo mysql -u root -p
D. Dog
  • 15
  • 3