您的位置:首页 > 数据库 > MariaDB

CentOS6.5启动MariaDB错误

2017-05-01 00:00 225 查看
摘要: 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!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: