- 论坛徽章:
- 18
|
本帖最后由 SeAL80s 于 2015-12-07 12:37 编辑
系统Fedora 23 x86_64 XFCE4.12
MySQL是用的Oracle官方源(官方现在是MySQL 5.7 ),MariaDB是用的Fedora的源(10.0.21)
MySQL在执行mysql_secure_installation的时候
Securing the MySQL server deployment.
Enter password for user root:
这个时候还没有MySQL密码的,输入root密码或者直接回车确认,都会报:
Error: Access denied for user 'root'@'localhost' (using password: YES)
Error: Access denied for user 'root'@'localhost' (using password: NO)
#systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 一 2015-12-07 08:57:44 CST; 1h 33min ago
Process: 10569 ExecStart=/usr/sbin/mysqld --daemonize $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 10554 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 10575 (mysqld)
CGroup: /system.slice/mysqld.service
└─10575 /usr/sbin/mysqld --daemonize
12月 07 08:57:43 MyHost.MyDomain systemd[1]: Starting MySQL Server...
12月 07 08:57:44 MyHost.MyDomain systemd[1]: Started MySQL Server.
12月 07 10:24:19 MyHost.MyDomain systemd[1]: Started MySQL Server.
#systemctl start mysqld 后没有任何反应
另外,my.cnf也很可疑:跟以前手工编译安装的时候不太一样啊,是不是MySQL本身的错误啊?!
# For advice on how to change settings please see
# dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
卸载MySQL我都是dnf remove mysql-community-server,还有其他的文件需要手动删除吗?/etc/my.cnf在remove mysql-community-server后变成了/etc/my.cnf.rpmsave
MariaDB安装的情况类似,不过信息稍微多一些
# systemctl status mariadb
● mariadb.service - MariaDB 10.0 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 一 2015-12-07 08:39:12 CST; 2h 2min ago
Main PID: 7881 (code=exited, status=0/SUCCESS)
12月 07 08:39:11 MyHost.MyDomain systemd[1]: Starting MariaDB 10.0 database server...
12月 07 08:39:11 MyHost.MyDomain mysqld_safe[7881]: 151207 08:39:11 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
12月 07 08:39:11 MyHost.MyDomain mysqld_safe[7881]: 151207 08:39:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
12月 07 08:39:11 MyHost.MyDomain mysqld_safe[7881]: 151207 08:39:11 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
12月 07 08:39:12 MyHost.MyDomain systemd[1]: mariadb.service: Control process exited, code=exited status=1
12月 07 08:39:12 MyHost.MyDomain systemd[1]: Failed to start MariaDB 10.0 database server.
12月 07 08:39:12 MyHost.MyDomain systemd[1]: mariadb.service: Unit entered failed state.
12月 07 08:39:12 MyHost.MyDomain systemd[1]: mariadb.service: Failed with result 'exit-code'.
12月 07 08:50:48 MyHost.MyDomain systemd[1]: Stopped MariaDB 10.0 database server.
# systemctl start mariadb
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
var/log/mariadb/mariadb.log
151207 08:39:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151207 8:39:11 [Note] /usr/libexec/mysqld (mysqld 10.0.21-MariaDB) starting as process 8005 ...
151207 8:39:11 [Note] InnoDB: Using mutexes to ref count buffer pool pages
151207 8:39:11 [Note] InnoDB: The InnoDB memory heap is disabled
151207 8:39:11 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
151207 8:39:11 [Note] InnoDB: Memory barrier is not used
151207 8:39:11 [Note] InnoDB: Compressed tables use zlib 1.2.8
151207 8:39:11 [Note] InnoDB: Using Linux native AIO
151207 8:39:11 [Note] InnoDB: Not using CPU crc32 instructions
151207 8:39:11 [Note] InnoDB: Initializing buffer pool, size = 128.0M
151207 8:39:11 [Note] InnoDB: Completed initialization of buffer pool
151207 8:39:11 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html //论坛不让发链接。现在是MariaDB,怎么还是h t t p://dev.mysql.com,难道是MySQL与MariaDB有混淆?为了装个MysQL/MariaDB,我可是重装了Fedora的!
151207 8:39:11 [ERROR] Plugin 'InnoDB' init function returned error.
151207 8:39:11 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151207 8:39:11 [Note] Plugin 'FEEDBACK' is disabled.
151207 8:39:11 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
151207 8:39:11 [ERROR] Unknown/unsupported storage engine: InnoDB //MariaDB好像是不用InnoDB引擎了吧?难道真的是与MySQL有混?我是格式化/,/boot,SWAP的,只是挂载/home,以前也是直接挂载/home,也没出现这个问题啊?在/home/username下会有MySQL/MariaDB遗留东西?我在重装前,都执行一遍$rm -rf .*的啊...
151207 8:39:11 [ERROR] Aborting
151207 8:39:11 [Note] /usr/libexec/mysqld: Shutdown complete
151207 08:39:11 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
151207 10:42:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151207 10:42:18 [Note] /usr/libexec/mysqld (mysqld 10.0.21-MariaDB) starting as process 9350 ...
151207 10:42:18 [Note] InnoDB: Using mutexes to ref count buffer pool pages
151207 10:42:18 [Note] InnoDB: The InnoDB memory heap is disabled
151207 10:42:18 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
151207 10:42:18 [Note] InnoDB: Memory barrier is not used
151207 10:42:18 [Note] InnoDB: Compressed tables use zlib 1.2.8
151207 10:42:18 [Note] InnoDB: Using Linux native AIO
151207 10:42:18 [Note] InnoDB: Not using CPU crc32 instructions
151207 10:42:18 [Note] InnoDB: Initializing buffer pool, size = 128.0M
151207 10:42:18 [Note] InnoDB: Completed initialization of buffer pool
151207 10:42:18 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html //论坛不能发链接去掉了http
151207 10:42:18 [ERROR] Plugin 'InnoDB' init function returned error.
151207 10:42:18 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151207 10:42:18 [Note] Plugin 'FEEDBACK' is disabled.
151207 10:42:18 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
151207 10:42:18 [ERROR] Unknown/unsupported storage engine: InnoDB
151207 10:42:18 [ERROR] Aborting
151207 10:42:18 [Note] /usr/libexec/mysqld: Shutdown complete
151207 10:42:18 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
求解!!!多谢! |
|