Error with mysqld_safe
出处:http://bugs.mysql.com/bug.php?id=18403
Description:
- I downloaded the binary file “Standard 5.0.19” of “Linux (non RPM package)”
- Later, I executed the following commands (such as suggested in the documentation - http://dev.mysql.com/doc/refman/5.0/en/installing-binary.html): shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
[root@... mysql]# scripts/mysql_install_db –user=mysql
[root@... mysql]# scripts/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables 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:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h panthro.THUNDERA password 'new-password'
See the manual for more instructions. NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command! You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe & You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests Please report any problems with the ./bin/mysqlbug script! The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com [root@... mysql]# chown -R root .
[root@... mysql]# chown -R mysql data
[root@... mysql]# chgrp -R mysql .
[root@... mysql]# bin/mysqld_safe --user=mysql &
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
060321 12:10:28 mysqld ended [the pc was processing during some minutes, but I didn't got reply... So, I press <ENTER>]
[1]+ Done bin/mysqld_safe –user=mysql
[root@panthro mysql]# The message created in log file is:
060321 12:12:21 mysqld started
060321 12:12:22 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060321 12:12:22 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 36808.
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
060321 12:12:22 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 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
060321 12:12:22 InnoDB: Started; log sequence number 0 43655
060321 12:12:22 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13)
060321 12:12:22 [ERROR] Can't start server: can't create PID file: Permission denied
060321 12:12:22 mysqld ended How to repeat:
The bug can be repeated executing the same commands I executed. This is detailed in description of the problem above.
Suggested fix:
I don't know.... but I think it's related with any configuration PATH or permission.
Thank you for a problem report. Please, send the results of the following commads: ls -l /var/run
ls -l /var/run/mysqld I think, it is not a bug, but just a result of call with "-user=mysql"...
Thank you for a problem report. Please, send the results of the following commads: ls -l /var/run
ls -l /var/run/mysqld I think, it is not a bug, but just a result of call with "-user=mysql"...
The results of the commands are:
ls -l /var/run
ls -l /var/run/mysqld [aquila@panthro ~]$ ls -l /var/run
total 264
srw-rw-rw- 1 root root 0 Mar 23 14:39 acpid.socket
-rw-r--r-- 1 root root 5 Mar 23 14:39 atd.pid
-rw-r--r-- 1 root root 5 Mar 23 14:38 auditd.pid
drwxr-xr-x 2 root root 4096 Mar 23 14:39 console
-rw-r--r-- 1 root root 5 Mar 23 14:39 crond.pid
-rw-r--r-- 1 root root 5 Mar 23 14:39 cups-config-daemon.pid
-rw-r--r-- 1 root root 5 Mar 23 14:39 cupsd.pid
drwxr-xr-x 2 root root 4096 Mar 23 14:39 dbus
-rw-r--r-- 1 root root 5 Mar 23 14:39 gdm.pid
-rw-r--r-- 1 root root 5 Mar 23 14:39 gpm.pid
-rw-r--r-- 1 root root 5 Mar 23 14:39 haldaemon.pid
-rw------- 1 root root 5 Mar 23 14:38 klogd.pid
drwx------ 2 root root 4096 May 16 2005 mdadm
drwx------ 2 root root 4096 May 16 2005 mdmpd
-rw-r--r-- 1 nobody root 5 Mar 23 14:39 mDNSResponder.pid
-rw-r--r-- 1 root root 5 Mar 23 14:39 messagebus.pid
drwxr-xr-x 2 root root 4096 Mar 21 10:51 mysqld
drwxrwx--- 2 named named 4096 May 17 2005 named
drwxrwxr-x 2 root root 4096 May 25 2005 netreport
-rw-r--r-- 1 root root 5 Mar 23 14:39 nifd.pid
drwxr-xr-x 2 root root 4096 May 30 2005 nscd
drwxr-xr-x 2 root root 4096 Nov 2 2004 ppp
drwxr-xr-x 2 pvm pvm 4096 Mar 8 2005 pvm3
-rw-r--r-- 1 rpcuser rpcuser 5 Mar 23 14:38 rpc.statd.pid
drwxr-xr-x 2 root root 4096 Apr 13 2005 saslauthd
drwxrwxr-x 2 root screen 4096 Feb 23 13:48 screen
-rw-r--r-- 1 root root 5 Mar 23 14:39 sshd.pid
drwx------ 4 root root 4096 Jan 18 13:24 sudo
-rw------- 1 root root 5 Mar 23 14:38 syslogd.pid
drwx------ 2 root root 4096 May 23 2005 usb
-rw-rw-r-- 1 root utmp 4992 Mar 23 14:40 utmp
drwxr-xr-x 2 root root 4096 May 2 2005 winbindd
-rw-r--r-- 1 root root 6 Mar 23 14:39 xfs.pid and.... [aquila@panthro ~]$ ls -l /var/run/mysqld
total 0 Any answer??
Thank
Sorry for a long delay with this bug report. Please, try to repeat with a newer version, 5.0.20a, and inform about the results.
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
I downloads 5.0.22 for Linux (x86, glibc-2.2, "standard" is static, gcc), and I see the same problem. I followed the summary steps listed in the beginning of the INSTALL-BINARY file.
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
[root@... mysql]# scripts/mysql_install_db –user=mysql
[root@... mysql]# scripts/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables 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:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h panthro.THUNDERA password 'new-password'
See the manual for more instructions. NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command! You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe & You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests Please report any problems with the ./bin/mysqlbug script! The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com [root@... mysql]# chown -R root .
[root@... mysql]# chown -R mysql data
[root@... mysql]# chgrp -R mysql .
[root@... mysql]# bin/mysqld_safe --user=mysql &
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
060321 12:10:28 mysqld ended [the pc was processing during some minutes, but I didn't got reply... So, I
press <ENTER>]
[1]+ Done bin/mysqld_safe –user=mysql
[root@panthro mysql]# The message created in log file is:
060321 12:12:21 mysqld started
060321 12:12:22 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060321 12:12:22 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 36808.
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
060321 12:12:22 InnoDB: Starting an apply batch of log records to the
database...
InnoDB: Progress in percents: 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 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
060321 12:12:22 InnoDB: Started; log sequence number 0 43655
060321 12:12:22 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file
'/var/run/mysqld/mysqld.pid' (Errcode: 13)
060321 12:12:22 [ERROR]
All reporters: Please, try to repeat again with latest 5.0.24a binaries. In case of same behaviour, please, send exact URL used to download.
I have reproduced this problem using the mysql-5.0.24a.tar.gz source distribution, building on FreeBSD 5.4-RELEASE. Specific problems:
1- `bin/mysql_install_db --user=mysql` reports no errors but does *not* create any files under /usr/local/mysql/var/mysql/ (meaning, the grants tables don't appear to exist) 2- `bin/mysqld_safe` errors out:
root@itx# bin/mysqld_safe
Starting mysqld daemon with databases from /usr/local/mysql/var
STOPPING server from pid file /usr/local/mysql/var/itx.sitefoundry.com.pid
061003 20:45:13 mysqld ended The log under mysql/var/[hostname].err shows many lines of InnoDB messages, and then:
061003 20:51:09 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to file '/usr/local/mysql/var/itx.sitefoundry.com.pid' (Errcode: 13)
061003 20:51:09 [ERROR] Can't start server: can't create PID file: Permission denied I've also tried passing mysqld_safe a different --pid-file with equally bad results: 061003 20:54:52 [ERROR] /usr/local/mysql/libexec/mysqld: Can't create/write to file '/var/run/mysqld' (Errcode: 13)
061003 20:54:52 [ERROR] Can't start server: can't create PID file: Permission denied
061003 20:54:52 mysqld ended
All reporters: Please, try to repeat again with latest 5.0.26 binaries.
I had this same problem while restoring a database from a backup to a new server. The problem is as originally guessed ... that is the mysql us being run with -user=mysql ... but the /var/run/mysql directory is owned by root. Do this chown mysql /var/run/mysql This solved my identical problem
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
I saw the same problem too and found that there was a my.cnf file already in /etc.So i knew that it was because i chose the standard packages when installing operating system, by doing this some files of mysql would be created.
Then i replaced /etc/my.cnf with mysql-install-directory/support-files/my-large.cnf,and go on in the following steps:
[root@... mysql]# scripts/mysql_install_db --user=mysql
[root@... mysql]# chown -R root .
[root@... mysql]# chown -R mysql data
[root@... mysql]# chgrp -R mysql .
[root@... mysql]# bin/mysqld_safe --user=mysql &
I saw the same problem too and found that there was a my.cnf file already in /etc.So i knew that it was because i chose the standard packages when installing operating system, by doing this some files of mysql would be created.
Then i replaced /etc/my.cnf with mysql-install-directory/support-files/my-large.cnf,and go on in the following steps:
[root@... mysql]# scripts/mysql_install_db --user=mysql
[root@... mysql]# chown -R root .
[root@... mysql]# chown -R mysql data
[root@... mysql]# chgrp -R mysql .
[root@... mysql]# bin/mysqld_safe --user=mysql &
Hi, I had the same issue. What i did is instead of the commane line: shown -R mysql . i used this: shown mysql full-path-to-mysql-binaries best luck.
Error with mysqld_safe的更多相关文章
- MySQL PXC构建一个新节点只需IST传输的方法
需求场景:原有的pxc环境数据量已经比较大,新买的服务器要加入此集群中,如何让其用IST的方式传输,而不是SST. PXC传输数据有两种方式: IST: Incremental State Trans ...
- Ubuntu中安装DiscuzX2
http://blog.csdn.net/kevin_ysu/article/details/7452938 一.Apache的安装 Apache作为一个功能强大的Web程序,自然是架建Web服务器的 ...
- 构建 MariaDB Galera Cluster 分布式数据库集群(二)
MariaDB的安装 构建 MariaDB Galera Cluster之前,首先安装MariaDB,本文使用的版本是10.1 1.环境准备 主机: MariaDB01(192.168.56.102) ...
- 10 个 MySQL 经典错误【转】
Top 1:Too many connections(连接数过多,导致连接不上数据库,业务无法正常进行) 问题还原 mysql> show variables like '%max_connec ...
- 【3.3】mysql中的Federated存储引擎,远程表,相当于sql server的linked server
MySQL中针对不同的功能需求提供了不同的存储引擎.所谓的存储引擎也就是MySQL下特定接口的具体实现. FEDERATED是其中一个专门针对远程数据库的实现.一般情况下在本地数据库中建表会在数据库目 ...
- mysql小白系列_02 mysql源码安装标准化
问题: 1.为什么数据目录和日志目录需要分开? 2.如何标准化配置多实例?(例如:一台物理主机上部署3306与3307两个实例) 3.详细描述MySQL编译安装的过程(截图安装步骤) 1.为什么数据目 ...
- Ubuntu mysql安装与使用
Ubuntu 下安装 mysql 运行下面的shell代码 #安装mysql sudo apt-get -y install mysql-server sudo apt-get -y install ...
- [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 160913 02:11:21 mysqld_safe mysqld from pid file /tmp/mysql.pid ended
-- :: [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 -- :: [Warning] InnoDB: New ...
- Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
centos7.5 安装mysql数据库报错 问题: [root@db04-54 scripts]# /etc/init.d/mysqld start /etc/init.d/mysqld: line ...
随机推荐
- Chromium-Dev一些缩写
备案权 tl;dr: && TL;DR; :"Too long;Don't read" PSA :"Publice Service Announcem ...
- iOS coreData
static int row=0; static const NSString *kStoryboardName = @"LRCoreDataViewController"; st ...
- 大约Android PopupWindow有用Spinner控件点击APP Crash案例整理!
场景异常,如下面: android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.V ...
- MyEclipse中将项目导出jar包,以及转化成EXE文件
1.对于项目如何导出jar文件,和生成exe,解答目录如下: 首先生成jar文件,单击项目名称CF-users(这是我的协同过滤项目文件名称)右击--->Export如下图: 单击下一步 Sel ...
- zoj 3829 Known Notation(2014在牡丹江区域赛k称号)
Known Notation Time Limit: 2 Seconds Memory Limit: 131072 KB Do you know reverse Polish notatio ...
- Codeforces 450 C. Jzzhu and Chocolate
//area=(n*m)/ ((x+1)*(k-x+1)) //1: x==0; //2: x=n-1 //3: x=m-1 # include <stdio.h> long long m ...
- Angular绑定数据时转义html标签
AngularJs在绑定数据时默认会以文本的形式出现在页面上,比如我现在有这样一段代码 <div ng-controller="testCtrl">{{data}}&l ...
- Open the Lock
Problem Description Now an emergent task for you is to open a password lock. The password is consist ...
- Facebook的ATOM Editor的底层Electron
Facebook的ATOM Editor的底层Electron 开源牛人 zcbenz 事情是这样的,微软推出了Visual Studio Code,我很好奇他怎么做跨平台的,所以就找找资料,在他的网 ...
- SettingsProvider该CRUD
转载请注明出处:http://blog.csdn.net/droyon/article/details/35558697 什么时候delete要么update时间.需要清空缓存并重新加载数据. 1.i ...