mysql启动报错解决-2

场景还原:

初始化

#/usr/local/webserver/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/webserver/mysql/ --datadir=/home/mysqldata

Installing MySQL system tables...
150205 11:48:00 [Note] Flashcache bypass: disabled
150205 11:48:00 [Note] Flashcache setup error is : ioctl failed

OK
Filling help tables...
150205 11:48:00 [Note] Flashcache bypass: disabled
150205 11:48:00 [Note] Flashcache setup error is : ioctl failed

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/webserver/mysql//bin/mysqladmin -u root password ‘new-password‘
/usr/local/webserver/mysql//bin/mysqladmin -u root -h kooxoo17.ktep3.kuxun.cn password ‘new-password‘

Alternatively you can run:
/usr/local/webserver/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/webserver/mysql/ ; /usr/local/webserver/mysql//bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/webserver/mysql//mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/webserver/mysql//scripts/mysqlbug script!

Percona recommends that all production deployments be protected with a support
contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime,
be eligible for hot fixes, and boost your team‘s productivity.

启动

#/usr/local/webserver/mysql/bin/mysqld_safe --user=mysql --defaults-file=/etc/my.cnf  --basedir=/usr/local/webserver/mysql/ --datadir=/home/mysqldata &

[1] 29154
[[email protected] wuxy]# 150205 11:49:18 mysqld_safe Logging to ‘/var/log/mysqld.log‘.
150205 11:49:18 mysqld_safe Starting mysqld daemon with databases from /home/mysqldata
150205 11:49:18 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

查看日志/var/log/mysqld.log

150205 11:53:19 mysqld_safe Starting mysqld daemon with databases from /home/mysqldata
150205 11:53:19 [Note] Flashcache bypass: disabled
150205 11:53:19 [Note] Flashcache setup error is : ioctl failed

150205 11:53:19 [Note] Plugin ‘FEDERATED‘ is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
150205 11:53:19  InnoDB: Initializing buffer pool, size = 128.0M
150205 11:53:19  InnoDB: Completed initialization of buffer pool
150205 11:53:19  InnoDB: highest supported file format is Barracuda.
150205 11:53:19 Percona XtraDB (http://www.percona.com) 1.0.15-12.5 started; log sequence number 45356
150205 11:53:19 [ERROR] /usr/local/webserver/mysql/libexec/mysqld: unknown variable ‘defaults-file=/etc/my.cnf‘
150205 11:53:19 [ERROR] Aborting

150205 11:53:19  InnoDB: Starting shutdown...
150205 11:53:20  InnoDB: Shutdown completed; log sequence number 45356
150205 11:53:20 [Note] /usr/local/webserver/mysql/libexec/mysqld: Shutdown complete

150205 11:53:20 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

原因是:

要使用指定的my.cnf,而不用默认的/etc/my.cnf文件,可以在启动时,在mysqld_safe后加上参数--default-file=/usr/local/server/mysql2/etc/my.cnf,但是要注意的是,主参数必须紧接着mysqld_safe后面,如果做第二个或者第二个以后的参数加入时,则会出现如下类似错误错误

/usr/local/server/mysql/libexec/mysqld: unknown variable ‘defaults-file=/usr/local/server/mysql2/etc/my.cnf‘ 且服务无法启动!

这是mysql的一个bug!

时间: 2024-10-25 07:44:36

mysql启动报错解决-2的相关文章

mysql启动报错解决-3

场景还原: 初始化 #/usr/local/webserver/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/webserver/mysql/ --datadir=/home/mysqldata Installing MySQL system tables...150205 11:48:00 [Note] Flashcache bypass: disabled150205 11:48:00 [Note] Flashcac

mysql启动报错:Table 'mysql.host' doesn't exist

今天在安装mysql后,启动时候没有启动成功,查看了下日志报错如下: --------------------------------------------- [[email protected] local]# less /var/log/mysqld.log 1.查看报错信息如下: [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 2.经过查阅资料得知.要敲

MySql启动报错,无法更新PID文件

MySql启动报错 Starting MySQL.. ERROR! The server quit without updating PID file (/var/lib/mysql..) 1,查看错误日志 2017-08-10 19:38:14 31865 [Note] InnoDB: Initializing buffer pool, size = 50.0M InnoDB: mmap(53657600 bytes) failed; errno 12 2017-08-10 19:38:14

PHP多次调用Mysql存储过程报错解决办法

PHP多次调用Mysql数据库的存储过程会出现问题,主要问题为存储过程中执行多次SQL语句不能一一释放导致的,网上找了一些解决办法,比如使用 multi_query 然后一个一个释放,但是发现根本不适合我们的项目,我们使用CI框架写的,更多的是使用CI的数据库处理方法.所以只能另辟蹊径. 一次偶然,把Mysql链接方式改成了mysqli,两种不同的PHP连接mysql的扩展,官方在高版本中推荐使用mysqli,结果却奇迹般好了,使用Mysql长连接也行,天意么? PHP多次调用Mysql存储过程

linux mysql启动报错Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

vi /etc/my.cnf  查看日志文件路径: log-error=/var/log/mysqld.log 查看报错日志: 之前的服务器被别人拿了,所以自己买了台美国vps,根据笔记安装完启动mysql,又启动不了. 查看了错误日志 引用 090321 18:55:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: Ta

Tomcat启动报错java.net.AbstractPlainSocketImpl(java/net/AbstractPlainSocketImpl.java:178:-1)Struts在网络复杂情况下启动报错解决办法

SSH项目 在网络复杂的情况(具体规律未知)下,Tomcat启动时,报如下错误: [ERROR] 2014-08-12 14:52:58,484 [org.apache.struts2.dispatcher.Dispatcher :27] - Dispatcher initialization failedUnable to load configuration. - Class: java.net.AbstractPlainSocketImplFile: AbstractPlainSocket

mysql 启动报错 “mysql-bin.index not found (Errcode: 13)“

安装好mysql数据库后,直接在安装的目录下 /usr/local/mysql  下新建了一个目录data 用于存放数据,建好后,直接去启动数据库,发现启动不了,出现如下报错: mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13) [E

mysql启动报错

mysql启动报错的原因常见的有一下几种: 1.数据所在分区满了 2.pid所在目录mysql用户没有写权限 3.存储引擎为innodb引擎,这个时候启动的时候需要恢复所有的操作(select,create,drop,insert.update,delete),当不能有效的执行恢复操作的时候,mysql启动报错 早上来上班的时候,被通知整栋大楼要停电,想了一下,公司机房还放了几台测试机,如果突然断电的话,会导致测试机中的虚拟机不可用,赶紧一台一台关机吧,其中有一台虚拟机上装着mysql,先进去把

新安装的MySQL启动报错The server quit without updating PID file

安装的MySQL启动报错The server quit without updating PID file [[email protected] mysql]# service mysqld restart MySQL server PID file could not be found!                  [失败] Starting MySQL.The server quit without updating PID file (/[失败]ysql/l ocalhost.loc