mysql启动错误: [ERROR] Can't find messagefile '/usr/share/errmsg.sys'

我的mysql是安装在/usr/local/mysql目录下,bin/mysqld_safe --user=mysql &启动后,从日志文件中发现如下错误:

 

  • 110623 21:49:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
  • 110623 21:49:41 [ERROR] Can't find messagefile '/usr/share/errmsg.sys'
  • 110623 21:49:41 [Warning] Can't create test file /var/lib/mysql/ubuntu.lower-test
  • 110623 21:49:41 [Warning] Can't create test file /var/lib/mysql/ubuntu.lower-test
  • /usr/local/mysql/bin/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2)
  • 110623 21:49:41 [ERROR] Aborting

 

从日志上发现,mysql的启动目录不对。

 

修改启动命令:

 

sudo mysqld_safe --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql &

 

即可启动成功:

 

110623 21:49:41 [Note]
110623 21:49:41 mysqld_safe mysqld from pid file /var/lib/mysql/ubuntu.pid ended
110623 21:57:21 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data/
110623 21:57:21 InnoDB: The InnoDB memory heap is disabled
110623 21:57:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
110623 21:57:21 InnoDB: Compressed tables use zlib 1.2.3.3
110623 21:57:21 InnoDB: Initializing buffer pool, size = 128.0M
110623 21:57:21 InnoDB: Completed initialization of buffer pool
110623 21:57:21 InnoDB: highest supported file format is Barracuda.
110623 21:57:21 InnoDB: Waiting for the background threads to start
110623 21:57:22 InnoDB: 1.1.7 started; log sequence number 1607993
110623 21:57:22 [Note] Event Scheduler: Loaded 0 events
110623 21:57:22 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.13' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Source distribution

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值