CentOS6.5启动MariaDB错误

[root@localhost ~]# /etc/init.d/mysql start
Starting MySQL.170430 23:07:56 mysqld_safe Logging to '/home/mysql/db/mianbao/localhost.localdomain.err'.
170430 23:07:56 mysqld_safe Starting mysqld daemon with databases from /home/mysql/db/mianbao
/usr/bin/mysqld_safe_helper: Can't create/write to file '/home/mysql/db/mianbao/localhost.localdomain.err' (Errcode: 2 "No such file or directory")
. ERROR!
[root@localhost mianbao]# tail -f localhost.localdomain.err 
170430 23:08:57 [Note] InnoDB: Creating tablespace and datafile system tables.
170430 23:08:57 [Note] InnoDB: Tablespace and datafile system tables created.
170430 23:08:57 [Note] InnoDB: Waiting for purge to start
170430 23:08:57 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 0
170430 23:08:57 [Note] Plugin 'FEEDBACK' is disabled.
170430 23:08:57 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170430 23:08:57 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
170430 23:08:57 [Note] Server socket created on IP: '127.0.0.1'.
170430 23:08:57 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
170430 23:08:57 mysqld_safe mysqld from pid file /home/mysql/db/mianbao/localhost.localdomain.pid ended

初始化数据库,指定数据存储路径

[root@localhost mianbao]# mysql_install_db --user=mysql --datadir=/home/mysql/db/mianbao/
Installing MariaDB/MySQL system tables in '/home/mysql/db/mianbao/' ...
170430 23:14:18 [Note] /usr/sbin/mysqld (mysqld 10.0.30-MariaDB) starting as process 46784 ...
170430 23:14:18 [Note] InnoDB: Using mutexes to ref count buffer pool pages
170430 23:14:18 [Note] InnoDB: The InnoDB memory heap is disabled
170430 23:14:18 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
170430 23:14:18 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
170430 23:14:18 [Note] InnoDB: Compressed tables use zlib 1.2.3
170430 23:14:18 [Note] InnoDB: Using Linux native AIO
170430 23:14:18 [Note] InnoDB: Using CPU crc32 instructions
170430 23:14:18 [Note] InnoDB: Initializing buffer pool, size = 128.0M
170430 23:14:18 [Note] InnoDB: Completed initialization of buffer pool
170430 23:14:18 [Note] InnoDB: Highest supported file format is Barracuda.
170430 23:14:18 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49463
170430 23:14:18 [Note] InnoDB: Database was not shutdown normally!
170430 23:14:18 [Note] InnoDB: Starting crash recovery.
170430 23:14:18 [Note] InnoDB: Reading tablespace information from the .ibd files...
170430 23:14:18 [Note] InnoDB: Restoring possible half-written data pages 
170430 23:14:18 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1600607
170430 23:14:18 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
170430 23:14:18 [Note] InnoDB: 128 rollback segment(s) are active.
170430 23:14:18 [Note] InnoDB: Waiting for purge to start
170430 23:14:18 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 1600607
170430 23:14:19 [Note] InnoDB: FTS optimize thread exiting.
170430 23:14:19 [Note] InnoDB: Starting shutdown...
170430 23:14:20 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
170430 23:14:22 [Note] InnoDB: Shutdown completed; log sequence number 1616707
OK
Filling help tables...
170430 23:14:22 [Note] /usr/sbin/mysqld (mysqld 10.0.30-MariaDB) starting as process 46814 ...
170430 23:14:22 [Note] InnoDB: Using mutexes to ref count buffer pool pages
170430 23:14:22 [Note] InnoDB: The InnoDB memory heap is disabled
170430 23:14:22 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
170430 23:14:22 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
170430 23:14:22 [Note] InnoDB: Compressed tables use zlib 1.2.3
170430 23:14:22 [Note] InnoDB: Using Linux native AIO
170430 23:14:22 [Note] InnoDB: Using CPU crc32 instructions
170430 23:14:22 [Note] InnoDB: Initializing buffer pool, size = 128.0M
170430 23:14:22 [Note] InnoDB: Completed initialization of buffer pool
170430 23:14:22 [Note] InnoDB: Highest supported file format is Barracuda.
170430 23:14:22 [Note] InnoDB: 128 rollback segment(s) are active.
170430 23:14:22 [Note] InnoDB: Waiting for purge to start
170430 23:14:22 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 1616707
170430 23:14:22 [Note] InnoDB: FTS optimize thread exiting.
170430 23:14:22 [Note] InnoDB: Starting shutdown...
170430 23:14:23 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
170430 23:14:25 [Note] InnoDB: Shutdown completed; log sequence number 1616717
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 MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:
'/usr/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 MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/home/mysql/db/mianbao/'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

[root@localhost mianbao]# /etc/init.d/mysql start
Starting MySQL.170430 23:14:34 mysqld_safe Logging to '/home/mysql/db/mianbao/localhost.localdomain.err'.
170430 23:14:34 mysqld_safe Starting mysqld daemon with databases from /home/mysql/db/mianbao
 SUCCESS!

转载于:https://my.oschina.net/2726276586/blog/889948

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值