MySQL启动故障处理一例(errno 13)

php中文网
发布: 2016-06-07 16:44:55
原创
1591人浏览过

之前在系统上装了个MySQL用于测试,今天发现启动mysqld_safe进程的时候报错,如下所示: [root@bak local]# mysqld_safe [1] 2

[root@bak mysql]# ./scripts/mysql_install_db 

Installing MySQL system tables...

141017  9:28:24 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set

OK

Filling help tables...

141017  9:28:25 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set

OK

 

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

 

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

 

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'

/usr/local/mysql/bin/mysqladmin -u root -h bak password 'new-password'

 

Alternatively you can run:

/usr/local/mysql/bin/mysql_secure_installation

 

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

 

See the manual for more instructions.

 

You can start the MySQL daemon with:

cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

 

You can test the MySQL daemon with mysql-test-run.pl

cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl

 

Please report any problems at

 

[root@bak mysql]# mysqld_safe &

[1] 2858

[root@bak mysql]# Starting mysqld daemon with databases from /data/mysql/mysql_3306/data

 

[root@bak mysql]# mysqSTOPPING server from pid file /data/mysql/mysql_3306/data/bak.pid

l141017 09:28:36  mysqld ended

 

 

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

[1]+  Done                    mysqld_safe

VALL-E
VALL-E

VALL-E是一种用于文本到语音生成 (TTS) 的语言建模方法

VALL-E 142
查看详情 VALL-E

 

初始化时成功的,可以看到有2个OK,不过启动依然报错,再次查看error.log

 

[root@bak mysql]# cat /data/mysql/mysql_3306/data/error.log 

141017  9:24:53 [Warning] Using unique option prefix myisam_recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.

141017  9:24:53 [Note] Plugin 'FEDERATED' is disabled.

/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist

141017  9:24:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

141017  9:24:53 InnoDB: The InnoDB memory heap is disabled

141017  9:24:53 InnoDB: Mutexes and rw_locks use InnoDB's own implementation

141017  9:24:53 InnoDB: Compressed tables use zlib 1.2.3

141017  9:24:53 InnoDB: Using Linux native AIO

141017  9:24:53 InnoDB: Initializing buffer pool, size = 128.0M

141017  9:24:53 InnoDB: Completed initialization of buffer pool

InnoDB: The first specified data file ./ibdata1 did not exist:

InnoDB: a new database to be created!

141017  9:24:53  InnoDB: Setting file ./ibdata1 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

141017  9:24:58  InnoDB: Log file ./ib_logfile0 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile0 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

141017  9:25:03  InnoDB: Log file ./ib_logfile1 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile1 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

141017  9:25:08  InnoDB: Log file ./ib_logfile2 did not exist: new to be created

InnoDB: Setting log file ./ib_logfile2 size to 100 MB

InnoDB: Database physically writes the file full: wait...

InnoDB: Progress in MB: 100

InnoDB: Doublewrite buffer not found: creating new

InnoDB: Doublewrite buffer created

InnoDB: 127 rollback segment(s) active.

InnoDB: Creating foreign key constraint system tables

InnoDB: Foreign key constraint system tables created

141017  9:25:13  InnoDB: Waiting for the background threads to start

141017  9:25:14 InnoDB: 5.5.39 started; log sequence number 0

141017  9:25:14 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306

141017  9:25:14 [Note]   - '0.0.0.0' resolves to '0.0.0.0';

141017  9:25:14 [Note] Server socket created on IP: '0.0.0.0'.

141017  9:25:14 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号