mysql> create database test; ERROR 1006 (HY000): Can't create database 'test' (errno: 2)

后端 未结 4 2080
迷失自我
迷失自我 2021-01-05 14:32

I can\'t create a database after logging in mysql under my root account. Do I have to make an admin account to do so? Also, for some reason, my StartUp file didn\'t install

4条回答
  •  臣服心动
    2021-01-05 15:23

    It might be problem with space. Follow this

    1. Check .err logs at /var/lib/mysql
    2. if the log says something like "[ERROR] Can't start server: can't create PID file: No space left on device"

    3. Check /var size by df -hk /var

    4. if used is 100% , then u have to find the files which is geting filled.

    5. find large file in /var by

      find /var/ -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
    6. see which file you can delete and then restart the mysql process by

    7. /etc/init.d/mysql restart

    let me know if that worked :)

提交回复
热议问题