mysql创建数据库1006无标题,mysql>创建数据库测试;错误1006(HY000):无法创建数据库“测试”(错误号:2)...

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 (there was an error). I'm not sure if that will affect anything else since mySQL DOES start up when I type "mysql" into my terminal.

Also when I type in

mysql> SELECT Host, User FROM mysql.user;

+---------------------+------+

| Host | User |

+---------------------+------+

| 127.0.0.1 | root |

| ::1 | root |

| myname-mac.att.net | |

| myname-mac.att.net | root |

| localhost | |

| localhost | root |

+---------------------+------+

Which I don't get. I seem to have multiple root users and I don't know what ::1 means.

EDIT: My databases currently look like this.

mysql> SHOW DATABASES;

+--------------------+

| Database |

+--------------------+

| information_schema |

+--------------------+

1 row in set (0.02 sec)

And it doesn't matter what I type in as my database name. I even tried calling it 'apple'.

解决方案

It might be problem with space.

Follow this

Check .err logs at /var/lib/mysql

if the log says something like

"[ERROR] Can't start server: can't create PID file: No space left on device"

Check /var size by df -hk /var

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

find large file in /var by

find /var/ -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

see which file you can delete and then restart the mysql process by

/etc/init.d/mysql restart

let me know if that worked :)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值