MySQL 启动错误: [ERROR] Can't find messagefile '/usr/share/errmsg.sys'(转载)

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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容